#[non_exhaustive]pub struct ReductionOptions {
pub maximum_number_of_chords: usize,
pub closed_position: bool,
pub force_octave: Option<IntegerType>,
pub allowable_chords: Vec<Chord>,
pub forbidden_chords: Vec<Chord>,
pub remove_dissonances: bool,
pub weight_algorithm: SliceWeigher,
}Expand description
What a reduction is asked for: music21’s arguments to ChordReducer.run.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.maximum_number_of_chords: usizeHow many chords a measure may keep: music21’s
maximumNumberOfChords, three by default.
closed_position: boolWhether every chord is written in closed position afterwards:
music21’s closedPosition.
force_octave: Option<IntegerType>The octave a chord in closed position has its lowest note in, or
its own octave with None: music21’s forceOctave, 4 by default.
allowable_chords: Vec<Chord>Chords whose interval classes count as consonant however they
sound: music21’s allowableChords.
forbidden_chords: Vec<Chord>Chords whose interval classes count as dissonant however they
sound: music21’s forbiddenChords.
remove_dissonances: boolWhether the notes above the bass of a dissonant moment go before
the measures are weighed: music21’s removeDissonances, off by
default.
weight_algorithm: SliceWeigherWhat each slice of a measure weighs: music21’s weightAlgorithm,
slice_weight by default.
Trait Implementations§
Source§impl Clone for ReductionOptions
impl Clone for ReductionOptions
Source§impl Debug for ReductionOptions
impl Debug for ReductionOptions
Auto Trait Implementations§
impl !RefUnwindSafe for ReductionOptions
impl !UnwindSafe for ReductionOptions
impl Forget for ReductionOptions
impl Freeze for ReductionOptions
impl Send for ReductionOptions
impl Sync for ReductionOptions
impl Unpin for ReductionOptions
impl UnsafeUnpin for ReductionOptions
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,
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