pub enum EnharmonicFix {
Accidental(Option<Accidental>),
Played,
}Expand description
What becomes of one note read where the performance plays another
spelling of it: the write music21’s EnharmonicFixer makes for one
change.
music21 writes in two ways, and which it is matters to a caller holding the pitch: its first four cases set the accidental on the pitch the note already has, and its fifth hands the note the pitch played whole.
Variants§
Accidental(Option<Accidental>)
The accidental written on the note read becomes this one, or none at all where music21 drops it.
Played
The note read takes the pitch played whole, which is music21’s case for a reading that missed a key signature.
Trait Implementations§
Source§impl Clone for EnharmonicFix
impl Clone for EnharmonicFix
Source§impl Debug for EnharmonicFix
impl Debug for EnharmonicFix
Source§impl<'de> Deserialize<'de> for EnharmonicFix
Available on crate feature serde only.
impl<'de> Deserialize<'de> for EnharmonicFix
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
Source§impl PartialEq for EnharmonicFix
impl PartialEq for EnharmonicFix
Source§impl Serialize for EnharmonicFix
Available on crate feature serde only.
impl Serialize for EnharmonicFix
Available on crate feature
serde only.impl StructuralPartialEq for EnharmonicFix
Auto Trait Implementations§
impl Forget for EnharmonicFix
impl Freeze for EnharmonicFix
impl RefUnwindSafe for EnharmonicFix
impl Send for EnharmonicFix
impl Sync for EnharmonicFix
impl Unpin for EnharmonicFix
impl UnsafeUnpin for EnharmonicFix
impl UnwindSafe for EnharmonicFix
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