Skip to main content

pitch_class_distribution

Function pitch_class_distribution 

Source
pub fn pitch_class_distribution<'a>(
    notes: impl IntoIterator<Item = (&'a [Pitch], FloatType)>,
) -> Option<[FloatType; 12]>
Expand description

How long each pitch class sounds: for each note, its pitches and its length in quarter notes, every pitch counting for the whole length. Nothing when there are no notes. music21’s _getPitchClassDistribution, a quarter tone rounding to the even class as music21’s pitchClass does.