Skip to main content

normalize_input_frequency

Function normalize_input_frequency 

Source
pub fn normalize_input_frequency(
    frequency: FloatType,
    thresholds: &[FloatType],
    pitches: &[Pitch],
) -> Result<(FloatType, Pitch)>
Expand description

The scale pitch a frequency falls nearest, put in the octave it sounds in, and the frequency of that pitch as the scale has it: music21’s normalizeInputFrequency, with thresholds and pitches from prepare_thresholds.

§Errors

A frequency that is not a finite number above nought, or no pitches.