pub struct FigureTuple {
pub deg_from_ref_pitch: u8,
pub alter: FloatType,
pub prefix: String,
}Expand description
Reads a chord as the tonic or the dominant of a key, with its inversion:
A pitch as a figure over a reference pitch: the scale step it stands
above the reference, how far it is altered from the key’s own spelling of
that degree, and the accidental written in front of a figure for it.
music21’s FigureTuple.
Fields§
§deg_from_ref_pitch: u8The generic step above the reference pitch, 1 to 7.
alter: FloatTypeSemitones away from the key’s own spelling of the degree.
prefix: StringThe accidental written in front of a figure for it: #, b, ##
and so on, or nothing.
Implementations§
Source§impl FigureTuple
impl FigureTuple
Sourcepub fn from_pitch_and_reference(
pitch: &Pitch,
key: &Key,
reference: &Pitch,
) -> Result<Self>
pub fn from_pitch_and_reference( pitch: &Pitch, key: &Key, reference: &Pitch, ) -> Result<Self>
The figure of pitch above reference in key: music21’s
FigureTuple.fromPitchAndReference. An A-3 above an F#2 bass in C
major is a third above the bass and a semitone below the A C major
has, so it is 3, altered by -1, written b. A minor key is read
as the natural minor.
Trait Implementations§
Source§impl Clone for FigureTuple
impl Clone for FigureTuple
Source§fn clone(&self) -> FigureTuple
fn clone(&self) -> FigureTuple
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FigureTuple
impl Debug for FigureTuple
Source§impl<'de> Deserialize<'de> for FigureTuple
Available on crate feature serde only.
impl<'de> Deserialize<'de> for FigureTuple
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>,
Source§impl PartialEq for FigureTuple
impl PartialEq for FigureTuple
Source§impl Serialize for FigureTuple
Available on crate feature serde only.
impl Serialize for FigureTuple
serde only.impl StructuralPartialEq for FigureTuple
Auto Trait Implementations§
impl Freeze for FigureTuple
impl RefUnwindSafe for FigureTuple
impl Send for FigureTuple
impl Sync for FigureTuple
impl Unpin for FigureTuple
impl UnsafeUnpin for FigureTuple
impl UnwindSafe for FigureTuple
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