Converts frequencies (Hz) to MIDI note numbers, optionally using stretched octaves. Non-integer MIDI note numbers are permitted as output.
freq_to_midi(frequency, stretched_octave = FALSE, tuning_ref_Hz = 440)
frequency | Numeric vector of frequencies (Hz). |
---|---|
stretched_octave | Logical scalar; whether or not to use a stretched octave. Default is |
tuning_ref_Hz | The tuning reference point in Hz, should correspond to the frequency of the A above middle C (typically 440 Hz) |
Numeric vector of frequencies in Hz