| loopLength | R Documentation |
Extract or replace the loop length of a PTSample.
## S4 method for signature 'PTSample'
loopLength(sample)
## S4 replacement method for signature 'PTSample'
loopLength(sample) <- value
sample |
A |
value |
An even Use a |
PTSamples can have loops, marked by a starting position
and length of the loop (in samples), for more details see the
PTSample. This method can be used to extract
the loop length or safely replace its value.
For loopLength the loop length (in samples), represented by
an even integer value ranging from 0 up to 131070, is returned.
For loopLength<- A PTSample sample, updated
with the loop length value, is returned.
Pepijn de Vries
Other loop.methods:
loopSample(),
loopStart(),
loopState()
Other sample.operations:
PTSample-class,
PTSample-method,
fineTune(),
loopSample(),
loopStart(),
loopState(),
name,
playSample(),
read.sample(),
sampleLength(),
volume(),
waveform(),
write.sample()
data("mod.intro")
## get the loop length of the
## first sample of mod.intro:
loopLength(PTSample(mod.intro, 1))
## Let's change the length of
## the loop to 200
loopLength(PTSample(mod.intro, 1)) <- 200
## Let's turn off the loop all together:
loopLength(PTSample(mod.intro, 1)) <- FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.