Skip to main content

Module roman

Module roman 

Source
Expand description

Roman numeral parsing and compact harmonic analysis.

Structs§

FigureTuple
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.
NumeralAlone
The numeral a figure opens with, and everything it implies.
PitchFigureTuple
A FigureTuple beside the pitch it describes: music21’s PitchFigureTuple.
RomanNumeral
A parsed Roman numeral in a key.

Enums§

ImpliedQuality
The quality a figure says its chord has, whatever the scale spells.
Minor67Default
How a figure on the sixth or seventh degree of a minor key decides between the natural and the raised degree: music21’s Minor67Default.

Constants§

FUNCTIONALITY_SCORES
music21’s functionalityScores: how strongly a figure implies its harmonic function, on a hundred-point scale, in music21’s order.

Functions§

adjust_minor_vi_and_vii_by_quality
The accidental a numeral on the sixth or seventh degree of a minor key ends up with, given how the key is read and the chord the figure asks for: music21’s adjustMinorVIandVIIByQuality.
analyze_chord
Performs functional Roman-numeral analysis in a key.
analyze_chord_with_root
Performs Roman-numeral analysis in a key using an explicit harmonic root.
bass_scale_degree_from_notation
Which scale degree a figured-bass column puts in the bass, for a chord whose root stands on degree.
correct_rn_alteration_for_minor
The figure of a chord’s root corrected for a minor key, where the sixth and seventh degrees are named against the natural minor: music21’s correctRNAlterationForMinor, in its cautionary reading.
correct_suffix_for_chord_quality
The inversion figure with the quality mark a chord’s fifth and seventh call for in front of it: music21’s correctSuffixForChordQuality. A diminished fifth writes o, an augmented one +, and a diminished fifth under a minor seventh ø; a figure that already carries the mark is left as it is.
expand_shorthand
music21’s expandShortHand: the figures of a column, one string each.
figure_tuples
One figure per pitch of the chord, each read above the chord’s bass: music21’s figureTuples.
identify_as_tonic_or_dominant
music21’s identifyAsTonicOrDominant, so G B D F in C major is V7 and A C E in A minor is i. A chord containing the tonic is the tonic, one containing the dominant is the dominant, and anything else is judged by how many of its notes the tonic and dominant sevenths share; None when neither wins.
match_pitches_to_quality
Respells the third, fifth and seventh of a chord to the quality asked for.
parse_numeral_alone
Reads the numeral off the front of a figure.
roman_inversion_name
The figured-bass suffix a Roman numeral takes for a chord’s inversion: music21’s romanInversionName, 6 and 64 for a triad, 7, 65, 43 and 42 for a seventh chord, and nothing otherwise. The inversion is the chord’s own unless one is given.
roman_numeral_from_chord
music21’s romanNumeralFromChord: the numeral a chord is in a key, written the way music21 writes it. With no key the chord’s root is the key, major where the chord has a major third and minor otherwise. The figure is read off the chord’s pitches above its bass, so a chord written without octaves sounds in octave 4 and G B D F in C major is V43. An empty chord is no numeral at all.
secondary_key
The key a secondary numeral establishes.
split_roman_accidental_prefix
Splits the accidentals written in front of a roman numeral off the rest of the figure, counting sharps as positive and flats as negative.
split_roman_prefix
Splits the leading roman numeral off a figure, returning the numeral and what follows it. Errors when the value does not begin with one.
split_secondary
Where music21 splits a secondary numeral off a figure.
take_added_steps
Takes the [addN] groups out of a figure, with the accidental each was written with.
take_bracketed_alterations
Takes the [#N] and [bN] groups out of a figure.
take_omitted_steps
Takes the [noN] groups out of a figure, leaving the rest of it.