getNotes: Frequencies-to-notes function

View source: R/utilities.R

getNotesR Documentation

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")

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?

Value

a character vector of notes

Examples

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

benRenard/sequenceR documentation built on Jan. 11, 2025, 2:33 a.m.