pub struct Rules {Show 19 fields
pub forbid_incomplete_possibilities: bool,
pub upper_parts_max_semitone_separation: Option<IntegerType>,
pub forbid_voice_crossing: bool,
pub forbid_parallel_fifths: bool,
pub forbid_parallel_octaves: bool,
pub forbid_hidden_fifths: bool,
pub forbid_hidden_octaves: bool,
pub forbid_voice_overlap: bool,
pub part_movement_limits: Vec<(usize, IntegerType)>,
pub resolve_dominant_seventh_properly: bool,
pub resolve_diminished_seventh_properly: bool,
pub resolve_augmented_sixth_properly: bool,
pub doubled_root_in_dim7: bool,
pub apply_single_possib_rules_to_resolution: bool,
pub apply_consecutive_possib_rules_to_resolution: bool,
pub restrict_doublings_in_italian_a6_resolution: bool,
pub upper_parts_remain_same: bool,
pub part_pitch_limits: Vec<(usize, Pitch)>,
pub parts_to_check: Vec<usize>,
}Expand description
The rules a realization keeps, each on or off: which voicings of one chord are acceptable, which moves from one chord to the next are, and how the chords that must resolve a particular way are resolved.
Every rule starts out as music21’s does.
Fields§
§forbid_incomplete_possibilities: boolRefuse a voicing that leaves out a note of its chord.
upper_parts_max_semitone_separation: Option<IntegerType>How far apart, in semitones, the upper parts may lie; None lets
them lie anywhere.
forbid_voice_crossing: boolRefuse a voicing where a part sings above a part over it.
forbid_parallel_fifths: boolRefuse parallel fifths.
forbid_parallel_octaves: boolRefuse parallel octaves.
Refuse hidden fifths between the outer parts.
Refuse hidden octaves between the outer parts.
forbid_voice_overlap: boolRefuse a part moving past where a neighbouring part was.
part_movement_limits: Vec<(usize, IntegerType)>How far each part named may move, in semitones: (part, semitones),
counting the highest part as one.
resolve_dominant_seventh_properly: boolResolve a dominant seventh as a dominant seventh resolves.
resolve_diminished_seventh_properly: boolResolve a diminished seventh as a diminished seventh resolves.
resolve_augmented_sixth_properly: boolResolve an augmented sixth as an augmented sixth resolves.
doubled_root_in_dim7: boolResolve a diminished seventh to the tonic with its root doubled, rather than its third, where the inversions do not decide it.
apply_single_possib_rules_to_resolution: boolHold a special resolution to the rules for single voicings too.
apply_consecutive_possib_rules_to_resolution: boolHold a special resolution to the rules for moving between voicings too.
restrict_doublings_in_italian_a6_resolution: boolIn resolving an Italian sixth, let the root resolve only once and the third not be doubled.
upper_parts_remain_same: boolKeep every part but the bass where it was: music21’s
_upperPartsRemainSame, which a realizer sets for a bass note that
only moves.
part_pitch_limits: Vec<(usize, Pitch)>Hold each part named to a pitch: (part, pitch), counting the
highest part as one. music21’s _partPitchLimits.
parts_to_check: Vec<usize>The parts that must keep their pitch from one voicing to the next:
music21’s _partsToCheck.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rules
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Rules
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Rules
Auto Trait Implementations§
impl Freeze for Rules
impl RefUnwindSafe for Rules
impl Send for Rules
impl Sync for Rules
impl Unpin for Rules
impl UnsafeUnpin for Rules
impl UnwindSafe for Rules
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more