Extract or replace the loop length of a PTSample.
Usage
# S4 method for class 'PTSample'
loopLength(sample)
# S4 method for class 'PTSample'
loopLength(sample) <- valueArguments
- sample
A
PTSamplefor which the loop length needs to be extracted or replace.- value
An even
numericvalue giving the loop length in samples ranging from 2 up to 131070 (It can be 0 when the sample is empty). The sum of theloopStartandloopLengthshould not exceed thesampleLength.Use a
valueof eithercharacter"off"orlogicalFALSE, in order to turn off the loop all together.
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.
Details
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.
See also
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()