midi_to_freq: Convert MIDI note numbers to frequencies

View source: R/scales.R

midi_to_freqR Documentation

Convert MIDI note numbers to frequencies

Description

Converts MIDI note numbers to frequencies (Hz), optionally using stretched octaves. Corresponds to Equation 1 of Parncutt & Strasburger (1994), but with Hz instead of kHz.

Usage

midi_to_freq(midi, stretched_octave = FALSE, tuning_ref_Hz = 440)

Arguments

midi

Numeric vector of MIDI note numbers

stretched_octave

Logical scalar; whether or not to use a stretched octave. Default is FALSE

tuning_ref_Hz

The tuning reference point in Hz, should correspond to the frequency of the A above middle C (typically 440 Hz)

Value

Numeric vector of frequencies in Hz


pmcharrison/hrep documentation built on Feb. 18, 2024, 2:33 a.m.