Learn R Programming

ProTrackR (version 0.4.4)

noteToPeriod: Extract period value for a specific note

Description

Extracts the ProTracker period value for a specific note.

Usage

noteToPeriod(note = "C-3", finetune = 0)

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.

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.

Author

Pepijn de Vries

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

Run this code
## Determine the period value corresponding with note 'A-3':
noteToPeriod("A-3")

## get the period values for notes 'A-3' and 'A#3' with finetune at -1:
noteToPeriod(c("A-3", "A#3"), -1)

## get the period values for note 'A-3' with finetune at 0 and 1:
noteToPeriod("A-3", 0:1)

Run the code above in your browser using DataLab