Skip to main content

pitch_frequencies_to_objects

Function pitch_frequencies_to_objects 

Source
pub fn pitch_frequencies_to_objects(
    frequencies: &[FloatType],
    scale: Option<&Scale>,
) -> Result<(Vec<Pitch>, Vec<FloatType>)>
Expand description

The pitches of a list of frequencies, each the nearest pitch of scale (C major on C4 where none is given), with each run of one name put in the run’s average octave, and the frequencies so placed: music21’s pitchFrequenciesToObjects.

As in music21, a run’s octave goes to the pitches from the one before it to the one before its last, the very first run’s to the last pitch, and the last pitch is never counted in a run.

§Errors

As normalize_input_frequency.