A Rules object is provided as an input to a Segment, and controls the application of methods designed to filter out undesired possibilities in a single Segment or undesired progressions between two consecutive Segments.
The rules are categorized in an identical manner to methods in possibility:
>>> from music21.figuredBass import rules
>>> fbRules = rules.Rules()
>>> fbRules.forbidParallelFifths = False
>>> fbRules.upperPartsMaxSemitoneSeparation = None
Rules attributes
- forbidIncompletePossibilities¶
- True by default. If True, isIncomplete() is applied to all possibA, and all those possibilities for which the method returns False are retained.
- forbidVoiceCrossing¶
- True by default. If True, voiceCrossing() is applied to all possibA, and all those possibilities for which the method returns False are retained.
- upperPartsMaxSemitoneSeparation¶
- 12 by default. A number, in semitones, representing the maxSemitoneSeparation argument provided to upperPartsWithinLimit(). Method is applied to all possibA, and all those possibilities for which the method returns True are retained.
- forbidHiddenFifths¶
- True by default. If True, hiddenFifth() is applied to all (possibA, possibB) pairs, and all those pairs for which the method returns False are retained.
- forbidHiddenOctaves¶
- True by default. If True, hiddenOctave() is applied to all (possibA, possibB) pairs, and all those pairs for which the method returns False are retained.
- forbidParallelFifths¶
- True by default. If True, parallelFifths() is applied to all (possibA, possibB) pairs, and all those pairs for which the method returns False are retained.
- forbidParallelOctaves¶
- True by default. If True, parallelOctaves() is applied to all (possibA, possibB) pairs, and all those pairs for which the method returns False are retained.
- forbidVoiceOverlap¶
- True by default. If True, voiceOverlap() is applied to all (possibA, possibB) pairs, and all those pairs for which the method returns False are retained.
- partMovementLimits¶
- [] (empty list) by default. Contains (partNumber, maxSeparation) pairs provided as arguments to partMovementsWithinLimits(). Method is applied to all (possibA, possibB) pairs, and all those pairs for which the method returns True are retained.
- applyConsecutivePossibRulesToResolution¶
- False by default. If True, consecutive possibility rules are applied between (specialPossib, resPossib) pairs.
- applySinglePossibRulesToResolution¶
- False by default. If True, single possibility rules are applied to resolution possibilities.
- doubledRootInDim7¶
- False by default. If True, Diminished seventh resolutions to the tonic will contain a doubled root, as opposed to a doubled third. Rule is ignored (determined in context) if segmentChord is in first inversion.
- resolveAugmentedSixthProperly¶
- True by default. If True, Segments whose segmentChord spells out an augmented sixth chord are resolved properly by using resolveAugmentedSixthSegment().
- resolveDiminishedSeventhProperly¶
- True by default. If True, Segments whose segmentChord spells out a fully-diminished seventh chord are resolved properly by using resolveDiminishedSeventhSegment().
- resolveDominantSeventhProperly¶
- True by default. If True, Segments whose segmentChord spells out a dominant seventh chord are resolved properly by using resolveDominantSeventhSegment().
- restrictDoublingsInItalianA6Resolution¶
- True by default. If True, then doublings in the It+6 chord are limited to the tonic, or fifth. Setting this to False allows doubling of the root or third, most likely through parallel unisons if forbidParallelOctaves is set to True.