Extracts the ProTracker period value for a specific note.
Arguments
- note
character
string representing a note and octave for which the ProTracker period value needs to be determined- finetune
integer
value ranging from -8 up to 7. A value used to tune an audio sample.
Value
Returns the numeric
ProTracker period value for a corresponding
note, octave and fineTune()
. Returns 0 if a note could not be found in the
table.
Details
ProTracker uses a period_table to link period values to certain octaves and notes. This function serves to look up corresponding period values for specific notes and octaves.
See also
Other period.operations:
note()
,
octave()
,
periodToChar()
,
period_table
,
sampleRate
Other note.and.octave.operations:
noteUp()
,
note()
,
octave()
,
periodToChar()
,
sampleRate
Examples
## Determine the period value corresponding with note 'A-3':
noteToPeriod("A-3")
#> [1] 127
## get the period values for notes 'A-3' and 'A#3' with finetune at -1:
noteToPeriod(c("A-3", "A#3"), -1)
#> [1] 128 121
## get the period values for note 'A-3' with finetune at 0 and 1:
noteToPeriod("A-3", 0:1)
#> [1] 127 126