pub struct ChordSymbolFigure {
pub root: String,
pub kind: &'static str,
pub abbreviation: &'static str,
pub bass: Option<String>,
pub additions: Vec<String>,
pub omissions: Vec<String>,
}Expand description
A chord named as a lead-sheet symbol, in the parts music21’s
chordSymbolFigureFromChord writes it from: the root, the kind and its
abbreviation, the bass where it is not the root, and the notes the kind
does not account for.
Display writes the figure as music21 writes it — C7, E-m7/G-,
CaddD- — and Self::written_with writes it with another abbreviation
for the kind.
Fields§
§root: StringThe root the figure is written on.
A suspended second in inversion is read as a suspended fourth on its bass, as music21 reads it, so for that chord this is the bass.
kind: &'static strmusic21’s name for the kind, dominant-seventh.
abbreviation: &'static strThe abbreviation music21 writes the kind with, 7.
bass: Option<String>The bass, where it is not the root.
additions: Vec<String>The notes of the chord the kind does not account for.
omissions: Vec<String>The notes the kind expects that the chord lacks. music21 writes these only beside additions: a chord that leaves out a note of its kind is still that kind, and says nothing about it.
Implementations§
Source§impl ChordSymbolFigure
impl ChordSymbolFigure
Sourcepub fn from_chord(chord: &Chord) -> Option<Self>
pub fn from_chord(chord: &Chord) -> Option<Self>
The figure of a chord, or None for an empty chord, a microtonal one,
or one no kind in music21’s table fits.
Sourcepub fn from_chord_with_root(chord: &Chord, root: &Pitch) -> Option<Self>
pub fn from_chord_with_root(chord: &Chord, root: &Pitch) -> Option<Self>
The figure with the root fixed by the caller rather than inferred, which is how music21 names the augmented sixths.
Sourcepub fn written_with(&self, abbreviation: &str) -> String
pub fn written_with(&self, abbreviation: &str) -> String
The figure written with another abbreviation for its kind, which is
how music21 writes it after changeAbbreviationFor.
Trait Implementations§
Source§impl Clone for ChordSymbolFigure
impl Clone for ChordSymbolFigure
Source§fn clone(&self) -> ChordSymbolFigure
fn clone(&self) -> ChordSymbolFigure
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 ChordSymbolFigure
impl Debug for ChordSymbolFigure
Source§impl Display for ChordSymbolFigure
impl Display for ChordSymbolFigure
impl Eq for ChordSymbolFigure
Source§impl PartialEq for ChordSymbolFigure
impl PartialEq for ChordSymbolFigure
impl StructuralPartialEq for ChordSymbolFigure
Auto Trait Implementations§
impl Freeze for ChordSymbolFigure
impl RefUnwindSafe for ChordSymbolFigure
impl Send for ChordSymbolFigure
impl Sync for ChordSymbolFigure
impl Unpin for ChordSymbolFigure
impl UnsafeUnpin for ChordSymbolFigure
impl UnwindSafe for ChordSymbolFigure
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