pub struct ChordStepModification { /* private fields */ }Expand description
One degree added to, taken from or altered in a chord symbol: music21’s
ChordStepModification, and MusicXML’s <degree>.
The interval is how far the degree is moved, usually an augmented unison one way or the other. An alteration given as a number of semitones is spelled as music21 spells it — up to three as that many augmentations of the unison, beyond that as the interval that many semitones make.
Implementations§
Source§impl ChordStepModification
impl ChordStepModification
Sourcepub fn new(
modification_type: ChordStepModificationType,
degree: u8,
alter: IntegerType,
) -> Result<Self>
pub fn new( modification_type: ChordStepModificationType, degree: u8, alter: IntegerType, ) -> Result<Self>
A modification of a degree by a number of semitones.
Sourcepub fn with_interval(
modification_type: ChordStepModificationType,
degree: u8,
interval: Interval,
) -> Self
pub fn with_interval( modification_type: ChordStepModificationType, degree: u8, interval: Interval, ) -> Self
A modification of a degree by an interval already in hand.
Sourcepub fn modification_type(&self) -> ChordStepModificationType
pub fn modification_type(&self) -> ChordStepModificationType
What the modification does.
Trait Implementations§
Source§impl Clone for ChordStepModification
impl Clone for ChordStepModification
Source§impl Debug for ChordStepModification
impl Debug for ChordStepModification
Source§impl<'de> Deserialize<'de> for ChordStepModification
Available on crate feature serde only.
impl<'de> Deserialize<'de> for ChordStepModification
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 ChordStepModification
impl PartialEq for ChordStepModification
Source§impl Serialize for ChordStepModification
Available on crate feature serde only.
impl Serialize for ChordStepModification
Available on crate feature
serde only.impl StructuralPartialEq for ChordStepModification
Auto Trait Implementations§
impl Freeze for ChordStepModification
impl RefUnwindSafe for ChordStepModification
impl Send for ChordStepModification
impl Sync for ChordStepModification
impl Unpin for ChordStepModification
impl UnsafeUnpin for ChordStepModification
impl UnwindSafe for ChordStepModification
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