| name | R Documentation |
The name of both a PTModule and
PTSample are stored as raw data.
This method returns the name as a character string, or it can
be used to assign a new name to 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
x |
A |
value |
A |
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, the name of the PTModule or
PTSample object as a character string is returned.
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))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.