Expand description
A score reduced to the chords it is made of: music21’s
analysis.reduceChords.
reduce_chords is music21’s ChordReducer.run. It reads the score’s
notes as spans of time – a part, a stretch, and the notes sounding in
it – drops the spans of no length and, if asked, the notes above the
bass of a dissonant moment. Each measure of the first part is then cut
into slices wherever a note starts or stops, and the slices sounding
the same pitch classes are weighed together: how long each lasts, times
how strong the beat it starts on is (the last sounding slice counting
its length alone), times a tenth if it is dissonant. The few heaviest
are kept, each lasting until the next kept slice of other classes. A
chord that is the same as the first chord of the next measure is tied
to it, and the reduction gets the clef that best fits its notes.
Structs§
- Kept
Chord - One chord a reduction keeps: which of the measure’s chords it is, where it goes and how long it sounds.
- Measure
Slice - One stretch of a measure between two places where a note starts or
stops: music21’s
MeasureSlice, its verticality read as where it stands and what sounds there. - Reduction
Options - What a reduction is asked for: music21’s arguments to
ChordReducer.run. - Slice
Weigher - What a slice of a measure weighs, given its quarter length, the meter’s
accent where it starts, whether it is the last sounding slice of the
measure and whether it is consonant: music21’s
weightAlgorithm. - Weighed
Chord - One chord of a measure as the weighing reads it: where it stands, what it is, and how strong the beat it stands on is.
Enums§
- Chord
Weight - How much a chord weighs in its measure: music21’s four weight
algorithms, one of which its
ChordReducerhands tocomputeMeasureChordWeights.
Functions§
- interval_
class_ set - Every interval class between two of the notes, 1 to 6, each once and
in order: music21’s
_getIntervalClassSet, which is howis_consonantreads the notes and the chords a reduction allows or forbids. - is_
consonant - Whether notes sound consonant: music21’s
isConsonant. Notes whoseinterval_class_setis one of theforbiddensets are dissonant, and those whose set is one of theallowableconsonant; any others are as consonant as their chord is. Each set is read as a set, in any order. - keep_
heaviest_ slices - The slices to keep of a measure’s, lengthened: music21’s
keepHeaviestSlices. - measure_
chord_ weights - 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. - measure_
slices - The stretch of
treefromstarttoendcut wherever a timespan starts or stops, each slice with where it starts fromstart, how long it lasts, and what sounds there: music21’smeasureSlices.time_pointshands over the tree’sall_time_pointswhere many measures are cut from one tree. - reduce_
chords - A score reduced to its chords: music21’s
ChordReducer.run, which hands back a score of one part, the first part’s measures holding the chords. - reduce_
measure_ to_ n_ chords - A measure reduced to the few chords weighing most in it: music21’s
reduceMeasureToNChords, built onreduced_measure_places. - reduced_
measure_ places - Which chords of a measure a reduction keeps, and where: music21’s
reduceMeasureToNChordsread as places rather than as a stream. - slice_
weight - What a slice weighs by default: music21’s
sliceWeight. Its quarter length times its accent, or its quarter length alone if it is the last sounding slice, times a tenth unless it is consonant. - slice_
weights - What each set of sorted pitch classes sounding among
slicesweighs, in the order they are met: music21’ssliceWeights.