Learn R Programming

sequenceR (version 1.0.1)

getNotes: Frequencies-to-notes function

Description

Get notes (in scientific pitch notation) from frequencies. The note with the closest frequency is returned.

Usage

getNotes(frequencies, minOctave = 0, maxOctave = 8, option = "b")

Value

a character vector of notes

Arguments

frequencies

numeric vector, frequencies in Hz

minOctave

integer, smallest (lowest-pitched) octave

maxOctave

integer, largest (highest-pitched) octave

option

character, use 'b' or '#' in note names?

Examples

Run this code
# example code
getNotes(seq(440,10000,100))
getNotes(seq(440,10000,100),maxOctave=10,option='#')

Run the code above in your browser using DataLab