note2freq: Convert musical notes to frequencies

View source: R/note2freq.R

note2freqR Documentation

Convert musical notes to frequencies

Description

Convert notes to frequencies

Usage

note2freq(
  note,
  tuning = c("12ET", "custom"),
  custom.ratios = c(1, 16/15, 9/8, 6/5, 5/4, 4/3, 45/32, 3/2, 8/5, 5/3, 9/5, 15/8, 2),
  A4 = 440,
  custom.root = "C",
  default.octave = 4
)

Arguments

note

String: Note(s) to convert to frequencies

tuning

String: "12ET": 12-note equal temperament, "custom": Intonation defined by customRatios

custom.ratios

Numeric, vector, length 13: Custom ratios for a 12-note scale, starting with 1 (root) and ending in 2 (octave) to use when tuning = "custom". The A4 note will be set to A4 Hz and the rest of the frequencies will be built based on these ratios and the customRoot

A4

Float: Frequency for A4 in Hz. Default = 440

custom.root

String: Root note for just intonation (tuning = "custom"). Default = "C"

default.octave

Integer: If note is provided without octave number (e.g. "C"), default to this octave. Default = 4

Author(s)

E.D. Gennatas

Examples

note2freq(buildScale("B4", "minor"))

music documentation built on July 11, 2022, 1:06 a.m.