Obtain or replace the name of a PTModule or PTSample
## S4 method for signature 'PTSample' name(x) ## S4 replacement method for signature 'PTSample,character' name(x) <- value ## S4 method for signature 'PTModule' name(x) ## S4 replacement method for signature 'PTModule,character' name(x) <- value
The name of a PTModule
and
PTSample
is stored as a vector
of
raw
data with a length of 20 or 22 respectively. This method
provides the means for getting the name as a character
string
or to safely redefine the name of a PTModule
or
PTSample
object. To do so,
the provided name (value
) is converted to a raw
vector
of length 20 or 22 respectively. Long names may therefore get clipped.
For name<-
, object x
with an updated name is returned.
Pepijn de Vries
Other character.operations:
as.character()
,
periodToChar()
,
rawToCharNull()
,
sampleRate
Other sample.operations:
PTSample-class
,
PTSample-method
,
fineTune()
,
loopLength()
,
loopSample()
,
loopStart()
,
loopState()
,
playSample()
,
read.sample()
,
sampleLength()
,
volume()
,
waveform()
,
write.sample()
data("mod.intro") ## get the name of mod.intro: name(mod.intro) ## I don't like the name, let's change it: name(mod.intro) <- "I like this name better" ## Note that the provided name was too long and is truncated: name(mod.intro) ## print all sample names in the module: unlist(lapply(as.list(1:31), function(x) name(PTSample(mod.intro, x))))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.