Skip to main content

measure_chord_weights

Function measure_chord_weights 

Source
pub fn measure_chord_weights(
    chords: &[WeighedChord<'_>],
    algorithm: ChordWeight,
) -> Vec<(Vec<u8>, FloatType)>
Expand description

How much each chord of a measure weighs, keyed by the pitch classes it sounds and in the order the chords were met: music21’s computeMeasureChordWeights.

Two chords of the same classes weigh as one, which is what makes a chord struck again over a moving bass count towards the chord already sounding rather than as a chord of its own. The classes are sorted, so two voicings of them are the one chord.