Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

periodToChar

Get the note and octave from period table


Description

These functions return the note and octave that is closest to the provided period value.

Usage

periodToChar(period)

Arguments

period

integer value of a period value.

Details

ProTracker uses a period_table to link period values to certain octaves and notes. This function serves to look up corresponding notes and octaves for specific period values.

Value

periodToChar returns a character representing the combination of octave and note that is closest to period in the ProTracker period table.

Author(s)

Pepijn de Vries

See Also

Other character.operations: as.character(), name, rawToCharNull(), sampleRate

Other period.operations: noteToPeriod(), note(), octave(), period_table, sampleRate

Other note.and.octave.operations: noteToPeriod(), noteUp(), note(), octave(), sampleRate

Examples

## Note C# in octave 3 is closest to a period of 200 in the table:
periodToChar(200)
## try with a range of period values:
periodToChar(200:400)

ProTrackR

Manipulate and Play 'ProTracker' Modules

v0.3.7
GPL-3
Authors
Pepijn de Vries [aut, cre, dtc]
Initial release
2020-02-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.