Extract or replace an octave
Obtain an octave number from a period value or extract or replace a
note of a PTCell
object.
## S4 method for signature 'numeric' octave(x) ## S4 method for signature 'PTCell' octave(x) ## S4 replacement method for signature 'PTCell,numeric' octave(x) <- value
x |
Either a ( |
value |
A Note that the octave can only be set for |
Period values are used by ProTracker to set a playback sample rate
and in essence determine the key and octave in which a sound is played.
This method can be used to obtain the octave number associated with a
period value (according to the ProTracker period_table
,
assuming zero fineTune
). If the period value is not in the
period_table
, the octave number associated with the
period closest to this value in the table is returned.
The octave number can also be obtained or replaced for a
PTCell
object.
For octave
, a numeric
value representing the octave number
is returned.
For octave<-
, a copy of PTCell
object x
in which the
octave number is replaced by value
is returned.
Pepijn de Vries
Other period.operations:
noteToPeriod()
,
note()
,
periodToChar()
,
period_table
,
sampleRate
Other note.and.octave.operations:
noteToPeriod()
,
noteUp()
,
note()
,
periodToChar()
,
sampleRate
data("mod.intro") ## get the octave number of PTCell at pattern #3, track #2, ## row #1 from mod.intro (which is number 3): octave(PTCell(mod.intro, 1, 2, 3)) ## replace the octave number of PTCell at pattern #3, track #2, ## row #1 from mod.intro with 2: octave(PTCell(mod.intro, 1, 2, 3)) <- 2 ## get the octave numbers associated with the period ## values 200 up to 400: octave(200:400)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.