Expand description
Lead-sheet chord-symbol parsing.
Structs§
- Chord
Alteration - A chord-symbol alteration such as
b5or#11. - Chord
Step Modification - One degree added to, taken from or altered in a chord symbol: music21’s
ChordStepModification, and MusicXML’s<degree>. - Chord
Symbol - Parsed chord symbol.
- Chord
Symbol Figure - A chord named as a lead-sheet symbol, in the parts music21’s
chordSymbolFigureFromChordwrites 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. - Chord
Voicing - A chord of one of music21’s kinds as music21 voices it: its pitches, and
the root and bass music21 holds as objects of their own. Those move with
the chord where it holds them and not where it does not, so they need
not be the first note of their name, nor a note of the chord at all:
Ab10/F#soundsF#2 Ab3 C#4 E4over a root of A3. - Music21
Chord Type - A chord type from music21’s
harmony.CHORD_TYPEStable.
Enums§
- Chord
Quality - Tertian quality parsed from a chord symbol.
- Chord
Step Modification Type - What a
ChordStepModificationdoes to the chord: music21’smodType.
Constants§
- CHORD_
KIND_ ALIASES - The other names music21 takes for three of its kinds, as MusicXML writes
them: music21’s
CHORD_ALIASES.
Functions§
- abbreviations_
for_ kind - Every abbreviation music21 accepts for a chord kind: music21’s
getAbbreviationListGivenChordType, sodominant-seventhgives7anddom7.Nonefor an unknown kind. - alter_
to_ chord_ symbol_ string - How a lead-sheet symbol writes an alteration of so many semitones: a
bfor each semitone down and a#for each one up, so-1isb,2is##and nought is nothing. music21’salterToChordSymbolString. - chord_
symbol_ durations - How long each chord symbol of a stream is held: its position in
Stream::leavesand the quarter length from it to the next symbol, the last to the end of the stream. This is the readingrealize_chord_symbol_durationswrites, for a caller that keeps something of its own beside each element. - chord_
symbol_ figure_ from_ chord - Names a chord as a lead-sheet symbol: music21’s
chordSymbolFigureFromChord, soC E G B-isC7,E G CisC/Eand a loneCisCpedal. Notes the kind cannot account for are listed afteradd, and beside them the notes the kind expects but the chord lacks afteromit, as music21 writes them.Nonewhen no kind fits, where music21 returns the sentence “Chord Symbol Cannot Be Identified”; an empty chord gives an empty string. The parts the figure is written from areChordSymbolFigure. - chord_
symbol_ from_ chord - A
ChordSymbolread off a chord: music21’schordSymbolFromChord,chord_symbol_figure_from_chordparsed back.Nonewhen no kind fits. - chord_
symbol_ kind_ from_ chord - The kind of chord a figure is written with: what music21 answers beside
the figure when
chordSymbolFigureFromChordis asked to include the chord type, soC E Gismajorand a loneCispedal. - current_
abbreviation_ for_ kind - The abbreviation music21 writes a chord kind with: its
getCurrentAbbreviationFor, the first ofabbreviations_for_kind. - inversion_
is_ valid_ for_ kind - Whether a chord of this kind can stand in this inversion: music21’s
ChordSymbol.inversionIsValid, which reads the kind and not the notes — so a dominant seventh with a ninth added still inverts as a seventh. - known_
chord_ symbol_ types - Returns every chord type this crate knows from music21’s harmony tables.
- notation_
for_ kind - The scale-degree notation of a chord kind: music21’s
getNotationStringGivenChordType,1,3,5,-7fordominant-seventh. - realize_
chord_ symbol_ durations - Gives every chord symbol in a stream the time it holds for: music21’s
realizeChordSymbolDurations. - resolve_
kind_ alias - The kind an alias stands for, or the kind itself where it is none.
- sound_
chord_ kind - The pitches a chord of one of music21’s kinds sounds on a root, with a
bass and chord-step modifications: music21’s
ChordSymbol._updatePitchesrun over the state MusicXML hands it, rather than over a figure. - sound_
chord_ notation - The same with the kind’s notation handed over rather than looked up:
music21’s table can be added to while a program runs
(
addNewChordSymbol), and a kind added there is sounded from the notation it was added with. - voice_
chord_ notation - The same, with the root and bass as music21 is left holding them: its
_updatePitchesin full.