Extract or replace the default volume of a PTSample.
Usage
# S4 method for class 'PTSample'
volume(sample)
# S4 method for class 'PTSample,numeric'
volume(sample) <- valueArguments
- sample
A
PTSamplefor which the default volume needs to be extracted or replace.- value
A
numericvalue ranging from 0 up to 64, representing the volume level.
Value
For volume the volume value, represented by an
integer value ranging from 0 up to 64, is returned.
For volume<- A PTSample sample, updated
with the volume value, is returned.
Details
PTSamples have a default playback volume, ranging from
0 (silent) up to 64 (maximum volume). This method can be used
to extract this value, or to safely replace it.
See also
Other sample.operations:
PTSample-class,
PTSample-method,
fineTune(),
loopLength(),
loopSample(),
loopStart(),
loopState(),
name,
playSample(),
read.sample(),
sampleLength(),
waveform(),
write.sample()