pub enum ChordWeight {
Length,
LengthByBeat,
LengthByBeatInMeasure,
Consonance,
}Expand description
How much a chord weighs in its measure: music21’s four weight
algorithms, one of which its ChordReducer hands to
computeMeasureChordWeights.
Variants§
Length
How long the chord sounds, and nothing else: music21’s
quarterLengthOnly, which is what computeMeasureChordWeights
weighs by when it is handed none.
LengthByBeat
That times how strong its beat is: quarterLengthBeatStrength.
LengthByBeatInMeasure
The same, except that the last chord of the measure counts as a
full beat: quarterLengthBeatStrengthMeasurePosition.
Consonance
The same again, a tenth of it where the chord is dissonant:
qlbsmpConsonance, which is the one a reduction weighs by.
Implementations§
Trait Implementations§
Source§impl Clone for ChordWeight
impl Clone for ChordWeight
impl Copy for ChordWeight
Source§impl Debug for ChordWeight
impl Debug for ChordWeight
Source§impl Default for ChordWeight
impl Default for ChordWeight
Source§impl<'de> Deserialize<'de> for ChordWeight
Available on crate feature serde only.
impl<'de> Deserialize<'de> for ChordWeight
Available on crate feature
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ChordWeight
Source§impl Hash for ChordWeight
impl Hash for ChordWeight
Source§impl PartialEq for ChordWeight
impl PartialEq for ChordWeight
Source§impl Serialize for ChordWeight
Available on crate feature serde only.
impl Serialize for ChordWeight
Available on crate feature
serde only.impl StructuralPartialEq for ChordWeight
Auto Trait Implementations§
impl Forget for ChordWeight
impl Freeze for ChordWeight
impl RefUnwindSafe for ChordWeight
impl Send for ChordWeight
impl Sync for ChordWeight
impl Unpin for ChordWeight
impl UnsafeUnpin for ChordWeight
impl UnwindSafe for ChordWeight
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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