Skip to main content

Module checker

Module checker 

Source
Expand description

Finding where a written-out score breaks the voice-leading rules: music21’s figuredBass.checker.

Where super::possibility says whether a voicing breaks a rule, this says which parts do, numbered from one, the highest. A part that is resting holds REST_PS in its place and is passed over by every rule.

The consecutive rules find their candidates by interval alone and leave the deciding to a VoiceLeadingQuartet; candidates and breaks_rule are the two halves, so a caller keeping a table of quartets already decided, as music21 does, asks only for the new ones.

Enums§

ConsecutiveRule
The rules over two possibilities in a row.

Constants§

REST_PS
The pitch space a resting part is given in a possibility: music21’s POSSIBILITY_REST_PS.

Functions§

breaks_rule
Whether the lower part moving from lower.0 to lower.1 against the higher moving from higher.0 to higher.1 breaks the rule, as music21’s VoiceLeadingQuartet decides it.
candidates
The pairs of parts, as part numbers, whose move from a to b stands at the rule’s interval and so needs breaks_rule to decide it. For a hidden rule that is the outer parts or nothing.
is_rest
Whether a pitch stands for a resting part.
violations
Every pair of parts, as part numbers, that breaks the rule moving from a to b: music21’s checker.parallelFifths and its three siblings.
voice_crossings
Every pair of parts, as part numbers, where a higher part sings below a lower one: music21’s checker.voiceCrossing.