music21.roman

Music21 class for dealing with Roman Numeral analysis

RomanNumeral

class music21.roman.RomanNumeral(figure: Union[str, int] = '', keyOrScale=None, *, caseMatters=True, updatePitches=True, sixthMinor=<Minor67Default.QUALITY: 1>, seventhMinor=<Minor67Default.QUALITY: 1>)

A RomanNumeral object is a specialized type of Harmony object that stores the function and scale degree of a chord within a Key.

If no Key is given then it exists as a theoretical, keyless RomanNumeral; e.g., V in any key. but when realized, keyless RomanNumerals are treated as if they are in C major).

>>> from music21 import roman
>>> V = roman.RomanNumeral('V')  # could also use 5
>>> V.quality
'major'
>>> V.inversion()
0
>>> V.forteClass
'3-11B'
>>> V.scaleDegree
5

Default key is C Major

>>> for p in V.pitches:
...     p
<music21.pitch.Pitch G4>
<music21.pitch.Pitch B4>
<music21.pitch.Pitch D5>
>>> neapolitan = roman.RomanNumeral('N6', 'c#')  # could also use 'bII6'
>>> neapolitan.key
<music21.key.Key of c# minor>
>>> neapolitan.isMajorTriad()
True
>>> neapolitan.scaleDegreeWithAlteration
(2, <accidental flat>)
>>> for p in neapolitan.pitches:  # default octaves
...     p
<music21.pitch.Pitch F#4>
<music21.pitch.Pitch A4>
<music21.pitch.Pitch D5>
>>> neapolitan2 = roman.RomanNumeral('bII6', 'g#')
>>> [str(p) for p in neapolitan2.pitches]
['C#5', 'E5', 'A5']
>>> neapolitan2.scaleDegree
2
>>> em = key.Key('e')
>>> dominantV = roman.RomanNumeral('V7', em)
>>> [str(p) for p in dominantV.pitches]
['B4', 'D#5', 'F#5', 'A5']
>>> minorV = roman.RomanNumeral('V43', em, caseMatters=False)
>>> [str(p) for p in minorV.pitches]
['F#4', 'A4', 'B4', 'D5']

In minor – VII and VI are assumed to refer to the flattened scale degree. vii, viio, viio7, viiø7 and vi, vio, vio7, viø7 refer to the sharpened scale degree. To get a minor triad on lowered 6 for instance, you will need to use ‘bvi’ while to get a major triad on raised 6, use ‘#VI’.

The actual rule is that if the chord implies minor, diminished, or half-diminished, an implied “#” is read before the figure. Anything else does not add the sharp. The lowered (natural minor) is the assumed basic chord.

>>> majorFlatSeven = roman.RomanNumeral('VII', em)
>>> [str(p) for p in majorFlatSeven.pitches]
['D5', 'F#5', 'A5']
>>> minorSharpSeven = roman.RomanNumeral('vii', em)
>>> [str(p) for p in minorSharpSeven.pitches]
['D#5', 'F#5', 'A#5']
>>> majorFlatSix = roman.RomanNumeral('VI', em)
>>> [str(p) for p in majorFlatSix.pitches]
['C5', 'E5', 'G5']
>>> minorSharpSix = roman.RomanNumeral('vi', em)
>>> [str(p) for p in minorSharpSix.pitches]
['C#5', 'E5', 'G#5']

These rules can be changed by passing in a sixthMinor or seventhMinor parameter set to a member of music21.roman.Minor67Default:

>>> majorSharpSeven = roman.RomanNumeral('VII', em, seventhMinor=roman.Minor67Default.SHARP)
>>> [str(p) for p in majorSharpSeven.pitches]
['D#5', 'F##5', 'A#5']

For instance, if you prefer a harmonic minor context where VI (or vi) always refers to the lowered 6 and viio (or VII) always refers to the raised 7, send along sixthMinor=roman.Minor67Default.FLAT and seventhMinor=roman.Minor67Default.SHARP

>>> dimHarmonicSeven = roman.RomanNumeral('viio', em, seventhMinor=roman.Minor67Default.SHARP)
>>> [str(p) for p in dimHarmonicSeven.pitches]
['D#5', 'F#5', 'A5']
>>> majHarmonicSeven = roman.RomanNumeral('bVII', em, seventhMinor=roman.Minor67Default.SHARP)
>>> [str(p) for p in majHarmonicSeven.pitches]
['D5', 'F#5', 'A5']
>>> majHarmonicSix = roman.RomanNumeral('VI', em, sixthMinor=roman.Minor67Default.FLAT)
>>> [str(p) for p in majHarmonicSix.pitches]
['C5', 'E5', 'G5']
>>> minHarmonicSix = roman.RomanNumeral('#vi', em, sixthMinor=roman.Minor67Default.FLAT)
>>> [str(p) for p in minHarmonicSix.pitches]
['C#5', 'E5', 'G#5']

See the docs for Minor67Default for more information on configuring sixth and seventh interpretation in minor along with the useful CAUTIONARY setting where CAUTIONARY sharp and flat accidentals are allowed but not required.

Either of these is the same way of getting a minor iii in a minor key:

>>> minoriii = roman.RomanNumeral('iii', em, caseMatters=True)
>>> [str(p) for p in minoriii.pitches]
['G4', 'B-4', 'D5']
>>> minoriiiB = roman.RomanNumeral('IIIb', em, caseMatters=False)
>>> [str(p) for p in minoriiiB.pitches]
['G4', 'B-4', 'D5']

caseMatters=False will prevent sixthMinor or seventhMinor from having effect. >>> vii = roman.RomanNumeral(‘viio’, ‘a’, caseMatters=False, … seventhMinor=roman.Minor67Default.QUALITY) >>> [str(p) for p in vii.pitches] [‘G5’, ‘B-5’, ‘D-6’]

Can also take a scale object, here we build a first-inversion chord on the raised-three degree of D-flat major, that is, F#-major (late Schubert would be proud.)

>>> sharp3 = roman.RomanNumeral('#III6', scale.MajorScale('D-'))
>>> sharp3.scaleDegreeWithAlteration
(3, <accidental sharp>)
>>> [str(p) for p in sharp3.pitches]
['A#4', 'C#5', 'F#5']
>>> sharp3.figure
'#III6'

Figures can be changed and pitches will change.

>>> sharp3.figure = 'V'
>>> [str(p) for p in sharp3.pitches]
['A-4', 'C5', 'E-5']
>>> leadingToneSeventh = roman.RomanNumeral(
...     'viio', scale.MajorScale('F'))
>>> [str(p) for p in leadingToneSeventh.pitches]
['E5', 'G5', 'B-5']

A little modal mixture:

>>> lessObviousDiminished = roman.RomanNumeral(
...     'vio', scale.MajorScale('c'))
>>> for p in lessObviousDiminished.pitches:
...     p
<music21.pitch.Pitch A4>
<music21.pitch.Pitch C5>
<music21.pitch.Pitch E-5>
>>> diminished7th = roman.RomanNumeral(
...     'vio7', scale.MajorScale('c'))
>>> for p in diminished7th.pitches:
...     p
<music21.pitch.Pitch A4>
<music21.pitch.Pitch C5>
<music21.pitch.Pitch E-5>
<music21.pitch.Pitch G-5>
>>> diminished7th1stInv = roman.RomanNumeral(
...     'vio65', scale.MajorScale('c'))
>>> for p in diminished7th1stInv.pitches:
...     p
<music21.pitch.Pitch C4>
<music21.pitch.Pitch E-4>
<music21.pitch.Pitch G-4>
<music21.pitch.Pitch A4>
>>> halfDim7th2ndInv = roman.RomanNumeral(
...     'ivø43', scale.MajorScale('F'))
>>> for p in halfDim7th2ndInv.pitches:
...     p
<music21.pitch.Pitch F-4>
<music21.pitch.Pitch A-4>
<music21.pitch.Pitch B-4>
<music21.pitch.Pitch D-5>
>>> alteredChordHalfDim3rdInv = roman.RomanNumeral(
...     'biiø42', scale.MajorScale('F'))
>>> [str(p) for p in alteredChordHalfDim3rdInv.pitches]
['F-4', 'G-4', 'B--4', 'D--5']
>>> alteredChordHalfDim3rdInv.intervalVector
[0, 1, 2, 1, 1, 1]
>>> alteredChordHalfDim3rdInv.commonName
'half-diminished seventh chord'
>>> alteredChordHalfDim3rdInv.romanNumeral
'-ii'
>>> alteredChordHalfDim3rdInv.romanNumeralAlone
'ii'

Tones may be omitted by putting the number in a bracketed [noX] clause. These numbers refer to the note above the root, not above the bass:

>>> openFifth = roman.RomanNumeral('V[no3]', key.Key('F'))
>>> openFifth.pitches
(<music21.pitch.Pitch C5>, <music21.pitch.Pitch G5>)
>>> openFifthInv = roman.RomanNumeral('V64[no3]', key.Key('F'))
>>> openFifthInv.pitches
(<music21.pitch.Pitch G4>, <music21.pitch.Pitch C5>)

Some theoretical traditions express a viio7 as a V9 chord with omitted root. Music21 allows that:

>>> fiveOhNine = roman.RomanNumeral('V9[no1]', key.Key('g'))
>>> [str(p) for p in fiveOhNine.pitches]
['F#5', 'A5', 'C6', 'E-6']

Putting [no] or [add] should never change the root

>>> fiveOhNine.root()
<music21.pitch.Pitch D5>

Tones may be added by putting a number (with an optional accidental) in a bracketed [addX] clause:

>>> susChord = roman.RomanNumeral('I[add4][no3]', key.Key('C'))
>>> susChord.pitches
(<music21.pitch.Pitch C4>, <music21.pitch.Pitch F4>, <music21.pitch.Pitch G4>)
>>> susChord.root()
<music21.pitch.Pitch C4>

Putting it all together:

>>> weirdChord = roman.RomanNumeral('V65[no5][add#6][b3]', key.Key('C'))
>>> [str(p) for p in weirdChord.pitches]
['B-4', 'E#5', 'F5', 'G5']
>>> weirdChord.root()
<music21.pitch.Pitch G5>

Other scales besides major and minor can be used. Just for kicks (no worries if this is goobley-gook):

>>> ots = scale.OctatonicScale('C2')
>>> romanNumeral = roman.RomanNumeral('I9', ots, caseMatters=False)
>>> [str(p) for p in romanNumeral.pitches]
['C2', 'E-2', 'G-2', 'A2', 'C3']
>>> romanNumeral2 = roman.RomanNumeral(
...     'V7#5b3', ots, caseMatters=False)
>>> [str(p) for p in romanNumeral2.pitches]
['G-2', 'A-2', 'C#3', 'E-3']
>>> romanNumeral = roman.RomanNumeral('v64/V', key.Key('e'))
>>> romanNumeral
<music21.roman.RomanNumeral v64/V in e minor>
>>> romanNumeral.figure
'v64/V'
>>> [str(p) for p in romanNumeral.pitches]
['C#5', 'F#5', 'A5']
>>> romanNumeral.secondaryRomanNumeral
<music21.roman.RomanNumeral V in e minor>

Dominant 7ths can be specified by putting d7 at end:

>>> r = roman.RomanNumeral('bVIId7', key.Key('B-'))
>>> r.figure
'bVIId7'
>>> [str(p) for p in r.pitches]
['A-5', 'C6', 'E-6', 'G-6']
>>> r = roman.RomanNumeral('VId7')
>>> r.figure
'VId7'
>>> r.key = key.Key('B-')
>>> [str(p) for p in r.pitches]
['G5', 'B5', 'D6', 'F6']
>>> r2 = roman.RomanNumeral('V42/V7/vi', key.Key('C'))
>>> [str(p) for p in r2.pitches]
['A4', 'B4', 'D#5', 'F#5']
>>> r2.secondaryRomanNumeral
<music21.roman.RomanNumeral V7/vi in C major>
>>> r2.secondaryRomanNumeral.secondaryRomanNumeral
<music21.roman.RomanNumeral vi in C major>

The I64 chord can also be specified as Cad64, which simply parses as I64:

>>> r = roman.RomanNumeral('Cad64', key.Key('C'))
>>> r
<music21.roman.RomanNumeral Cad64 in C major>
>>> [str(p) for p in r.pitches]
['G4', 'C5', 'E5']
>>> r = roman.RomanNumeral('Cad64', key.Key('c'))
>>> r
<music21.roman.RomanNumeral Cad64 in c minor>
>>> [str(p) for p in r.pitches]
['G4', 'C5', 'E-5']

Works also for secondary romans:

>>> r = roman.RomanNumeral('Cad64/V', key.Key('c'))
>>> r
<music21.roman.RomanNumeral Cad64/V in c minor>
>>> [str(p) for p in r.pitches]
['D5', 'G5', 'B5']

The RomanNumeral constructor accepts a keyword ‘updatePitches’ which is passed to harmony.Harmony. By default it is True, but can be set to False to initialize faster if pitches are not needed.

>>> r = roman.RomanNumeral('vio', em, updatePitches=False)
>>> r.pitches
()

RomanNumeral bases

RomanNumeral read-only properties

RomanNumeral.figureAndKey

Returns the figure and the key and mode as a string

>>> from music21 import roman
>>> rn = roman.RomanNumeral('V65/V', 'e')
>>> rn.figureAndKey
'V65/V in e minor'

Without a key, it is the same as figure:

>>> roman.RomanNumeral('V7').figureAndKey
'V7'
RomanNumeral.romanNumeral

Read-only property that returns either the romanNumeralAlone (e.g. just II) or the frontAlterationAccidental.modifier + romanNumeralAlone (e.g. #II)

>>> from music21 import roman
>>> rn = roman.RomanNumeral('#II7')
>>> rn.romanNumeral
'#II'
RomanNumeral.scaleDegreeWithAlteration

Returns a two element tuple of the scale degree and the accidental that alters the scale degree for things such as #ii or bV.

Note that vi and vii in minor have a frontAlterationAccidental of <sharp> even if it is not preceded by a # sign.

Has the same effect as setting .scaleDegree and .frontAlterationAccidental separately

>>> v = roman.RomanNumeral('V', 'C')
>>> v.scaleDegreeWithAlteration
(5, None)
>>> neapolitan = roman.RomanNumeral('N6', 'c#')
>>> neapolitan.scaleDegreeWithAlteration
(2, <accidental flat>)

Read-only properties inherited from Chord:

Read-only properties inherited from Music21Object:

Read-only properties inherited from ProtoM21Object:

RomanNumeral read/write properties

RomanNumeral.figure

Gives a string representation of the roman numeral, which is usually the same as what you passed in as a string:

>>> roman.RomanNumeral('bVII65/V', 'C').figure
'bVII65/V'

There are a few exceptions. If the RomanNumeral is initialized with an int, then it is converted to a string:

>>> roman.RomanNumeral(2).figure
'II'

A 0 used for o in a diminished seventh chord is converted to o, and the /o form of half-diminished is converted to ø:

>>> roman.RomanNumeral('vii07').figure
'viio7'
>>> roman.RomanNumeral('vii/o7').figure
'viiø7'

Changing this value will not change existing pitches.

Changed in v6.5 – empty RomanNumerals now have figure of ‘’ not None

RomanNumeral.functionalityScore

Return or set a number from 1 to 100 representing the relative functionality of this RN.figure (possibly given the mode, etc.).

Numbers are ordinal, not cardinal.

>>> from music21 import roman
>>> rn1 = roman.RomanNumeral('V7')
>>> rn1.functionalityScore
80
>>> rn2 = roman.RomanNumeral('vi6')
>>> rn2.functionalityScore
10
>>> rn2.functionalityScore = 99
>>> rn2.functionalityScore
99

For secondary dominants, the functionality scores are multiplied, reducing all but the first by 1/100th:

>>> rn3 = roman.RomanNumeral('V')
>>> rn3.functionalityScore
70
>>> rn4 = roman.RomanNumeral('vi')
>>> rn4.functionalityScore
40
>>> rn5 = roman.RomanNumeral('V/vi')
>>> rn5.functionalityScore
28
RomanNumeral.key

Gets or Sets the current Key (or Scale object) for a given RomanNumeral object.

If a new key is set, then the pitches will probably change:

>>> from music21 import roman
>>> r1 = roman.RomanNumeral('V')

(No key means an implicit C-major)

>>> r1.key is None
True
>>> [str(p) for p in r1.pitches]
['G4', 'B4', 'D5']

Change to A major

>>> r1.key = key.Key('A')
>>> [str(p) for p in r1.pitches]
['E5', 'G#5', 'B5']
>>> r1
<music21.roman.RomanNumeral V in A major>
>>> r1.key
<music21.key.Key of A major>
>>> r1.key = key.Key('e')
>>> [str(p) for p in r1.pitches]
['B4', 'D#5', 'F#5']
>>> r1
<music21.roman.RomanNumeral V in e minor>

Read/write properties inherited from Harmony:

Read/write properties inherited from Chord:

Read/write properties inherited from NotRest:

Read/write properties inherited from GeneralNote:

Read/write properties inherited from Music21Object:

RomanNumeral methods

RomanNumeral.adjustMinorVIandVIIByQuality(useScale)

Fix minor vi and vii to always be #vi and #vii if .caseMatters.

>>> rn = roman.RomanNumeral()
>>> rn.scaleDegree = 6
>>> rn.impliedQuality = 'minor'
>>> rn.adjustMinorVIandVIIByQuality(key.Key('c'))
>>> rn.frontAlterationTransposeInterval
<music21.interval.Interval A1>
>>> rn.frontAlterationAccidental
<accidental sharp>
>>> rn = roman.RomanNumeral()
>>> rn.scaleDegree = 6
>>> rn.impliedQuality = 'major'
>>> rn.adjustMinorVIandVIIByQuality(key.Key('c'))
>>> rn.frontAlterationTransposeInterval is None
True
>>> rn.frontAlterationAccidental is None
True

Changed in v.6.4: public function became hook to private function having the actual guts

RomanNumeral.bassScaleDegreeFromNotation(notationObject=None)

Given a notationObject from music21.figuredBass.notation.Notation return the scaleDegree of the bass.

>>> from music21 import figuredBass, roman
>>> fbn = figuredBass.notation.Notation('6,3')
>>> V = roman.RomanNumeral('V')
>>> V.bassScaleDegreeFromNotation(fbn)
7
>>> fbn2 = figuredBass.notation.Notation('#6,4')
>>> vi = roman.RomanNumeral('vi')
>>> vi.bassScaleDegreeFromNotation(fbn2)
3

Can figure it out directly from an existing RomanNumeral:

>>> ii65 = roman.RomanNumeral('ii65', 'C')
>>> ii65.bassScaleDegreeFromNotation()
4

Simple test:

>>> I = roman.RomanNumeral('I')
>>> I.bassScaleDegreeFromNotation()
1

A bit slow (6 seconds for 1000 operations, but not the bottleneck)

RomanNumeral.isMixture(evaluateSecondaryNumeral: bool = False)

Checks if a RomanNumeral is an instance of ‘modal mixture’ in which the chord is not diatonic in the key specified, but would be would be in the parallel (German: variant) major / minor and can therefore be thought of as a ‘mixture’ of major and minor modes, or as a ‘borrowing’ from the one to the other.

Examples include i in major or I in minor (sic).

Specifically, this method returns True for all and only the following cases in any inversion:

Major context (example of C major):

  • scale degree 1 and triad quality minor (minor tonic chord, c);

  • scale degree 2 and triad quality diminished (covers both iio and iiø7);

  • scale degree b3 and triad quality major (Eb);

  • scale degree 4 and triad quality minor (f);

  • scale degree 5 and triad quality minor (g, NB: potentially controversial);

  • scale degree b6 and triad quality major (Ab);

  • scale degree b7 and triad quality major (Bb); and

  • scale degree 7 and it’s a diminished seventh specifically (b-d-f-ab).

Minor context (example of c minor):

  • scale degree 1 and triad quality major (major tonic chord, C);

  • scale degree 2 and triad quality minor (d, not diminished);

  • scale degree #3 and triad quality minor (e);

  • scale degree 4 and triad quality major (F);

  • scale degree #6 and triad quality minor (a); and

  • scale degree 7 and it’s a half diminished seventh specifically (b-d-f-a).

This list is broadly consistent with (and limited to) borrowing between the major and natural minor, except for excluding V (G-B-D) and viio (B-D-F) in minor. There are several borderline caes and this in-/exclusion is all open to debate, of course. The choices here reflect this method’s primarily goal to aid anthologizing and pointing to clear cases of mixture in common practice Classical music. At least in that context, V and viio are not generally regarded as mixure.

By way of example usage, here are both major and minor versions of the tonic and subdominant triads in the major context.

>>> roman.RomanNumeral('I', 'D-').isMixture()
False
>>> roman.RomanNumeral('i', 'D-').isMixture()
True
>>> roman.RomanNumeral('IV', 'F').isMixture()
False
>>> roman.RomanNumeral('iv', 'F').isMixture()
True

For any cases extending beyond triad/seventh chords, major/minor keys, and the like, this method simply returns False.

So when the mode is not major or minor (including when it’s undefined), that’s False.

>>> rn = roman.RomanNumeral('iv', 'C')
>>> rn.key.mode
'major'
>>> rn.isMixture()
True
>>> rn.key.mode = 'hypomixolydian'
>>> rn.isMixture()
False

A scale for a key never returns True for mixture.

>>> rn = roman.RomanNumeral('i', scale.MajorScale('D'))  # mode undefined
>>> rn.isMixture()
False

Likewise, anything that’s not a triad or seventh will return False:

>>> rn = roman.romanNumeralFromChord(chord.Chord("C D E"))
>>> rn.isMixture()
False

Note that Augmented sixth chords do count as sevenths but never indicate modal mixture (not least because those augmented sixths are the same in both major and minor).

>>> rn = roman.RomanNumeral('Ger65')
>>> rn.isSeventh()
True
>>> rn.isMixture()
False

False is also returned for any case in which the triad quality is not diminished, minor, or major:

>>> rn = roman.RomanNumeral('bIII+')
>>> rn.quality
'augmented'
>>> rn.isMixture()
False

(That specific example of bIII+ in major is a borderline case that arguably ought to be included and may be added in future.)

Naturally, really extended usages such as scale degrees beyond 7 (in the Octatonic mode, for instance) also return False.

The evaluateSecondaryNumeral parameter allows users to chose whether to consider secondary Roman numerals (like V/vi) or to ignore them. When considered, exactly the same rules apply but recasting the comparison on the secondaryRomanNumeral. This is an extended usage that is open to debate and liable to change.

>>> roman.RomanNumeral('V/bVI', 'E-').isMixture()
False
>>> roman.RomanNumeral('V/bVI', 'E-').isMixture(evaluateSecondaryNumeral=True)
True

In case of secondary numeral chains, read the last one for mixture.

>>> roman.RomanNumeral('V/V/bVI', 'E-').isMixture(evaluateSecondaryNumeral=True)
True
RomanNumeral.isNeapolitan(require1stInversion: bool = True)

Music21’s Chord module offers methods for identifying chords of a particular type, such as isAugmentedSixth().

Some similar chord types are defined not only by the structure of a chord but by its relation to a key. The Neapolitan sixth is a notable example. A chord is a Neapolitan sixth if it is a major triad, in first inversion, and (here’s the key-dependent part) rooted on the flattened second scale degree.

>>> chd = chord.Chord(['F4', 'Ab4', 'Db5'])
>>> rn = roman.romanNumeralFromChord(chd, 'C')
>>> rn.isNeapolitan()
True

As this is key-dependent, changing the key changes the outcome.

>>> rn = roman.romanNumeralFromChord(chd, 'Db')
>>> rn.isNeapolitan()
False

The ‘N6’ shorthand is accepted.

>>> rn = roman.RomanNumeral('N6')
>>> rn.isNeapolitan()
True

Requiring first inversion is optional.

>>> rn = roman.RomanNumeral('bII')
>>> rn.isNeapolitan(require1stInversion=False)
True

Methods inherited from Harmony:

Methods inherited from Chord:

Methods inherited from NotRest:

Methods inherited from GeneralNote:

Methods inherited from Music21Object:

Methods inherited from ProtoM21Object:

RomanNumeral instance variables

RomanNumeral.addedSteps

Returns a list of the added steps, each as a tuple of modifier as a string (which might be empty) and a chord factor as an int.

>>> rn = roman.RomanNumeral('V7[addb6]', 'C')
>>> rn.addedSteps
[('-', 6)]
>>> rn.pitches
(<music21.pitch.Pitch G4>,
<music21.pitch.Pitch B4>,
<music21.pitch.Pitch D5>,
<music21.pitch.Pitch E-5>,
<music21.pitch.Pitch F5>)

You can add multiple added steps:

>>> strange = roman.RomanNumeral('V7[addb6][add#6][add-8]')
>>> strange.addedSteps
[('-', 6), ('#', 6), ('-', 8)]
>>> ' '.join([p.nameWithOctave for p in strange.pitches])
'G4 B4 D5 E-5 E#5 F5 G-5'

NOTE: The modifier name is currently changed from ‘b’ to ‘-‘, but this might change in a future version to match bracketedAlteration.

RomanNumeral.bracketedAlterations

Returns a list of the bracketed alterations, each as a tuple of modifier as a string and a chord factor as an int.

>>> rn = roman.RomanNumeral('V7[b5]')
>>> rn.bracketedAlterations
[('b', 5)]
>>> rn.pitches
(<music21.pitch.Pitch G4>,
<music21.pitch.Pitch B4>,
<music21.pitch.Pitch D-5>,
<music21.pitch.Pitch F5>)

NOTE: The bracketed alteration name is currently left as ‘b’, but this might change in a future version to match addedSteps.

The difference between a bracketed alteration and just putting b5 in is that, a bracketed alteration changes notes already present in a chord and does not imply that the normally present notes would be missing. Here, the presence of 7 and b5 means that no 3rd should appear.

>>> rn2 = roman.RomanNumeral('V7b5')
>>> rn2.bracketedAlterations
[]
>>> len(rn2.pitches)
3
>>> [p.name for p in rn2.pitches]
['G', 'D-', 'F']

Changed in v6.5 – always returns a list, even if it is empty.

RomanNumeral.caseMatters

Boolean to determine whether the case (upper or lowercase) of the figure determines whether it is major or minor. Defaults to True; not everything has been tested with False yet.

>>> roman.RomanNumeral('viiø7', 'd').caseMatters
True
RomanNumeral.figuresNotationObj

Returns a Notation object that represents the figures in a RomanNumeral

>>> rn = roman.RomanNumeral('V65')
>>> notationObj = rn.figuresNotationObj
>>> notationObj
<music21.figuredBass.notation.Notation 6,5>
>>> notationObj.numbers
(6, 5, 3)
>>> rn = roman.RomanNumeral('Ib75#3')
>>> notationObj = rn.figuresNotationObj
>>> notationObj.numbers
(7, 5, 3)
>>> notationObj.modifiers
(<modifier b <accidental flat>>,
<modifier None None>,
<modifier # <accidental sharp>>)
RomanNumeral.figuresWritten

Returns a string containing any figured-bass figures as passed in:

>>> roman.RomanNumeral('V65').figuresWritten
'65'
>>> roman.RomanNumeral('V').figuresWritten
''
>>> roman.RomanNumeral('Fr43', 'c').figuresWritten
'43'
>>> roman.RomanNumeral('I7#5b3').figuresWritten
'7#5b3'

Note that the o and ø symbols are quality designations and not figures:

>>> roman.RomanNumeral('viio6').figuresWritten
'6'
>>> roman.RomanNumeral('viiø7').figuresWritten
'7'
RomanNumeral.frontAlterationAccidental

An optional Accidental object representing the chromatic alteration of a RomanNumeral, if any

>>> roman.RomanNumeral('bII43/vi', 'C').frontAlterationAccidental
<accidental flat>
>>> roman.RomanNumeral('##IV').frontAlterationAccidental
<accidental double-sharp>

For most roman numerals this will be None:

>>> roman.RomanNumeral('V', 'f#').frontAlterationAccidental

Changing this value will not change existing pitches.

Changed in v6.5 – always returns a string, never None

RomanNumeral.frontAlterationString

A string representing the chromatic alteration of a RomanNumeral, if any

>>> roman.RomanNumeral('bII43/vi', 'C').frontAlterationString
'b'
>>> roman.RomanNumeral('V', 'f#').frontAlterationString
''

Changing this value will not change existing pitches.

Changed in v6.5 – always returns a string, never None

RomanNumeral.frontAlterationTransposeInterval

An optional Interval object representing the transposition of a chromatically altered chord from the normal scale degree:

>>> sharpFour = roman.RomanNumeral('#IV', 'C')
>>> sharpFour.frontAlterationTransposeInterval
<music21.interval.Interval A1>
>>> sharpFour.frontAlterationTransposeInterval.niceName
'Augmented Unison'

Flats, as in this Neapolitan (bII6) chord, are given as diminished unisons:

>>> roman.RomanNumeral('N6', 'C').frontAlterationTransposeInterval
<music21.interval.Interval d1>

Most RomanNumerals will have None and not a perfect unison for this value (this is for the speed of creating objects)

>>> intv = roman.RomanNumeral('V', 'e-').frontAlterationTransposeInterval
>>> intv is None
True

Changing this value will not change existing pitches.

N.B. the deprecated property .scaleOffset is identical to .frontAlterationTransposeInterval and will be removed in v7

RomanNumeral.impliedQuality

The quality of the chord implied by the figure:

>>> roman.RomanNumeral('V', 'C').impliedQuality
'major'
>>> roman.RomanNumeral('ii65', 'C').impliedQuality
'minor'
>>> roman.RomanNumeral('viio7', 'C').impliedQuality
'diminished'

The impliedQuality can differ from the actual quality if there are not enough notes to satisfy the implied quality, as in this half-diminished chord on vii which does not also have a seventh:

>>> incorrectSeventh = roman.RomanNumeral('vii/o', 'C')
>>> incorrectSeventh.impliedQuality
'half-diminished'
>>> incorrectSeventh.quality
'diminished'
>>> powerChordMinor = roman.RomanNumeral('v[no3]', 'C')
>>> powerChordMinor.impliedQuality
'minor'
>>> powerChordMinor.quality
'other'

If case does not matter then an empty quality is implied:

>>> roman.RomanNumeral('II', 'C', caseMatters=False).impliedQuality
''
RomanNumeral.impliedScale

If no key or scale is passed in as the second object, then impliedScale will be set to C major:

>>> roman.RomanNumeral('V').impliedScale
<music21.scale.MajorScale C major>

Otherwise this will be empty:

>>> roman.RomanNumeral('V', key.Key('D')).impliedScale
RomanNumeral.omittedSteps

A list of integers showing chord factors that have been specifically omitted:

>>> emptyNinth = roman.RomanNumeral('V9[no7][no5]', 'C')
>>> emptyNinth.omittedSteps
[7, 5]
>>> emptyNinth.pitches
(<music21.pitch.Pitch G4>,
<music21.pitch.Pitch B4>,
<music21.pitch.Pitch A5>)

Usually an empty list:

>>> roman.RomanNumeral('IV6').omittedSteps
[]
RomanNumeral.pivotChord

Defaults to None; if not None, stores another interpretation of the same RN in a different key; stores a RomanNumeral object.

While not enforced, for consistency the pivotChord should be the new interpretation going forward (to the right on the staff)

>>> rn = roman.RomanNumeral('V7/IV', 'C')
>>> rn.pivotChord is None
True
>>> rn.pivotChord = roman.RomanNumeral('V7', 'F')
RomanNumeral.primaryFigure

A string representing everything before the slash in a RomanNumeral with applied chords. In other roman numerals it is the same as figure:

>>> rn = roman.RomanNumeral('bII43/vi', 'C')
>>> rn.primaryFigure
'bII43'
>>> rnSimple = roman.RomanNumeral('V6', 'a')
>>> rnSimple.primaryFigure
'V6'

Changing this value will not change existing pitches.

RomanNumeral.romanNumeralAlone

Returns a string of just the roman numeral part (I-VII or i-vii) of the figure:

>>> roman.RomanNumeral('V6').romanNumeralAlone
'V'

Chromatic alterations and secondary numerals are omitted:

>>> rn = roman.RomanNumeral('#II7/vi', 'C')
>>> rn.romanNumeralAlone
'II'

Neapolitan chords are changed to ‘II’:

>>> roman.RomanNumeral('N6').romanNumeralAlone
'II'

Currently augmented-sixth chords return the “national” base. But this behavior may change in future versions:

>>> roman.RomanNumeral('It6').romanNumeralAlone
'It'
>>> roman.RomanNumeral('Ger65').romanNumeralAlone
'Ger'

This will be controversial in some circles, but it’s based on a root in isolation, and does not imply tonic quality:

>>> roman.RomanNumeral('Cad64').romanNumeralAlone
'I'
RomanNumeral.scaleCardinality

Stores how many notes are in the scale; defaults to 7 for diatonic, obviously.

>>> roman.RomanNumeral('IV', 'a').scaleCardinality
7

Probably you should not need to change this. And most code is untested with other cardinalities. But it is (in theory) possible to create roman numerals on octatonic scales, etc.

Changing this value will not change existing pitches.

RomanNumeral.scaleDegree

An int representing what degree of the scale the figure (or primary figure in the case of secondary/applied numerals) is on. Discounts any front alterations:

>>> roman.RomanNumeral('vi', 'E').scaleDegree
6

Note that this is 2, not 1.5 or 6 or 6.5 or something like that:

>>> roman.RomanNumeral('bII43/vi', 'C').scaleDegree
2

Empty RomanNumeral objects have the special scaleDegree of 0:

>>> roman.RomanNumeral().scaleDegree
0

Changing this value will not change existing pitches.

Changed in v6.5 – empty RomanNumeral objects get scaleDegree 0, not None.

RomanNumeral.secondaryRomanNumeral

An optional roman.RomanNumeral object that represents the part after the slash in a secondary/applied RomanNumeral object. For instance, in the roman numeral, C: V7/vi, the secondaryRomanNumeral would be the roman numeral C: vi. The key of the secondaryRomanNumeral is the key of the original RomanNumeral. In cases such as V/V/V, the secondaryRomanNumeral can itself have a secondaryRomanNumeral.

>>> rn = roman.RomanNumeral('V7/vi', 'C')
>>> rn.secondaryRomanNumeral
<music21.roman.RomanNumeral vi in C major>
RomanNumeral.secondaryRomanNumeralKey

An optional key.Key object for secondary/applied RomanNumeral that represents the key that the part of the figure before the slash will be interpreted in. For instance in the roman numeral, C: V7/vi, the secondaryRomanNumeralKey would be a minor, since the vi (submediant) refers to an a-minor triad, and thus the V7 part is to be read as the dominant seventh in a minor.

>>> rn = roman.RomanNumeral('V7/vi', 'C')
>>> rn.secondaryRomanNumeralKey
<music21.key.Key of a minor>
RomanNumeral.seventhMinor

How should vii, viio, and VII be parsed in minor? Defaults to Minor67Default.QUALITY.

This value should be passed into the constructor initially. Changing it after construction will not change the pitches.

RomanNumeral.sixthMinor

How should vi, vio and VI be parsed in minor? Defaults to Minor67Default.QUALITY.

This value should be passed into the constructor initially. Changing it after construction will not change the pitches.

RomanNumeral.useImpliedScale

A boolean indicating whether an implied scale is being used:

>>> roman.RomanNumeral('V').useImpliedScale
True
>>> roman.RomanNumeral('V', 'A').useImpliedScale
False

Instance variables inherited from Chord:

Instance variables inherited from NotRest:

Instance variables inherited from GeneralNote:

Instance variables inherited from Music21Object:

ChordFigureTuple

class music21.roman.ChordFigureTuple(aboveBass, alter, prefix, pitch)

FigureTuple

class music21.roman.FigureTuple(aboveBass, alter, prefix)

Minor67Default

class music21.roman.Minor67Default(value)

Enumeration that can be passed into RomanNumeral’s keyword arguments sixthMinor and seventhMinor to define how Roman numerals on the sixth and seventh scale degrees are parsed in minor.

Showing how sixthMinor affects the interpretation of vi:

>>> vi = lambda sixChord, quality: ' '.join(p.name for p in roman.RomanNumeral(
...                                   sixChord, 'c',
...                                   sixthMinor=quality).pitches)
>>> vi('vi', roman.Minor67Default.QUALITY)
'A C E'
>>> vi('vi', roman.Minor67Default.FLAT)
'A- C- E-'
>>> vi('vi', roman.Minor67Default.SHARP)
'A C E'
>>> vi('VI', roman.Minor67Default.QUALITY)
'A- C E-'
>>> vi('VI', roman.Minor67Default.FLAT)
'A- C E-'
>>> vi('VI', roman.Minor67Default.SHARP)
'A C# E'

For FLAT assumes lowered ^6 no matter what, while SHARP assumes raised ^6 no matter what. So #vi is needed in FLAT and bVI is needed in SHARP

>>> vi('#vi', roman.Minor67Default.FLAT)
'A C E'
>>> vi('bVI', roman.Minor67Default.SHARP)
'A- C E-'

CAUTIONARY ignores the # in #vi and the b in bVI:

>>> vi('#vi', roman.Minor67Default.CAUTIONARY)
'A C E'
>>> vi('vi', roman.Minor67Default.CAUTIONARY)
'A C E'
>>> vi('bVI', roman.Minor67Default.CAUTIONARY)
'A- C E-'
>>> vi('VI', roman.Minor67Default.CAUTIONARY)
'A- C E-'

Whereas QUALITY is closer to what a computer would produce, since vi is already sharpened, #vi raises it even more. And since VI is already flattened, bVI lowers it even further:

>>> vi('vi', roman.Minor67Default.QUALITY)
'A C E'
>>> vi('#vi', roman.Minor67Default.QUALITY)
'A# C# E#'
>>> vi('VI', roman.Minor67Default.QUALITY)
'A- C E-'
>>> vi('bVI', roman.Minor67Default.QUALITY)
'A-- C- E--'

To get these odd chords with CAUTIONARY, add another sharp or flat.

>>> vi('##vi', roman.Minor67Default.CAUTIONARY)
'A# C# E#'
>>> vi('bbVI', roman.Minor67Default.CAUTIONARY)
'A-- C- E--'

For other odd chords that are contrary to the standard minor interpretation in the “wrong” direction, the interpretation is the same as QUALITY

a major triad on raised 6?

>>> vi('#VI', roman.Minor67Default.QUALITY)
'A C# E'
>>> vi('#VI', roman.Minor67Default.CAUTIONARY)
'A C# E'

a minor triad on lowered 6?

>>> vi('bvi', roman.Minor67Default.QUALITY)
'A- C- E-'
>>> vi('bvi', roman.Minor67Default.CAUTIONARY)
'A- C- E-'

Functions

music21.roman.correctRNAlterationForMinor(figureTuple, keyObj)

Takes in a FigureTuple and a Key object and returns the same or a new FigureTuple correcting for the fact that, for instance, Ab in c minor is VI not vi. Works properly only if the note is the root of the chord.

Used in RomanNumeralFromChord

These return new FigureTuple objects

>>> ft5 = roman.FigureTuple(aboveBass=6, alter=-1, prefix='')
>>> ft5a = roman.correctRNAlterationForMinor(ft5, key.Key('c'))
>>> ft5a
FigureTuple(aboveBass=6, alter=-1, prefix='b')
>>> ft5a is ft5
False
>>> ft6 = roman.FigureTuple(aboveBass=6, alter=0, prefix='')
>>> roman.correctRNAlterationForMinor(ft6, key.Key('c'))
FigureTuple(aboveBass=6, alter=0, prefix='b')
>>> ft7 = roman.FigureTuple(aboveBass=7, alter=1, prefix='#')
>>> roman.correctRNAlterationForMinor(ft7, key.Key('c'))
FigureTuple(aboveBass=7, alter=0, prefix='')
>>> ft1 = roman.FigureTuple(aboveBass=6, alter=-1, prefix='b')

Does nothing for major:

>>> ft2 = roman.correctRNAlterationForMinor(ft1, key.Key('C'))
>>> ft2
FigureTuple(aboveBass=6, alter=-1, prefix='b')
>>> ft1 is ft2
True

Does nothing for steps other than 6 or 7:

>>> ft3 = roman.FigureTuple(aboveBass=4, alter=-1, prefix='b')
>>> ft4 = roman.correctRNAlterationForMinor(ft3, key.Key('c'))
>>> ft4
FigureTuple(aboveBass=4, alter=-1, prefix='b')
>>> ft3 is ft4
True
music21.roman.correctSuffixForChordQuality(chordObj, inversionString)

Correct a given inversionString suffix given a chord of various qualities.

>>> c = chord.Chord('E3 C4 G4')
>>> roman.correctSuffixForChordQuality(c, '6')
'6'
>>> c = chord.Chord('E3 C4 G-4')
>>> roman.correctSuffixForChordQuality(c, '6')
'o6'
music21.roman.expandShortHand(shorthand)

Expands shorthand notation into a list with all figures expanded:

>>> roman.expandShortHand('64')
['6', '4']
>>> roman.expandShortHand('973')
['9', '7', '3']
>>> roman.expandShortHand('11b3')
['11', 'b3']
>>> roman.expandShortHand('b13#9-6')
['b13', '#9', '-6']
>>> roman.expandShortHand('-')
['5', '-3']

Slashes don’t matter

>>> roman.expandShortHand('6/4')
['6', '4']

Note that this is not where abbreviations get expanded

>>> roman.expandShortHand('')
[]
>>> roman.expandShortHand('7')  # not 7, 5, 3
['7']
>>> roman.expandShortHand('4/3')  # not 6, 4, 3
['4', '3']

Note that this is [‘6’] not [‘6’, ‘3’]:

>>> roman.expandShortHand('6')
['6']

Returns a list of individual shorthands.

music21.roman.figureTupleSolo(pitchObj, keyObj, bass)

Return a single tuple for a pitch and key showing the interval above the bass, its alteration from a step in the given key, an alteration string, and the pitch object.

For instance, in C major, an A-3 above an F# bass would be:

>>> from music21 import roman
>>> roman.figureTupleSolo(
...     pitch.Pitch('A-3'),
...     key.Key('C'),
...     pitch.Pitch('F#2'),
...     )
FigureTuple(aboveBass=3, alter=-1.0, prefix='b')

Returns a namedtuple called a FigureTuple.

music21.roman.figureTuples(chordObject, keyObject)

Return a set of tuplets for each pitch showing the presence of a note, its interval above the bass its alteration (float) from a step in the given key, an alterationString, and the pitch object.

Note though that for roman numerals, the applicable key is almost always the root.

For instance, in C major, F# D A- C# would be:

>>> from music21 import roman
>>> roman.figureTuples(
...     chord.Chord(['F#2', 'D3', 'A-3', 'C#4']),
...     key.Key('C'),
...     )
[ChordFigureTuple(aboveBass=1, alter=1.0, prefix='#', pitch=<music21.pitch.Pitch F#2>),
 ChordFigureTuple(aboveBass=6, alter=0.0, prefix='', pitch=<music21.pitch.Pitch D3>),
 ChordFigureTuple(aboveBass=3, alter=-1.0, prefix='b', pitch=<music21.pitch.Pitch A-3>),
 ChordFigureTuple(aboveBass=5, alter=1.0, prefix='#', pitch=<music21.pitch.Pitch C#4>)]
>>> roman.figureTuples(
...     chord.Chord(['E3', 'C4', 'G4', 'B-5']),
...     key.Key('C'),
...     )
[ChordFigureTuple(aboveBass=1, alter=0.0, prefix='', pitch=<music21.pitch.Pitch E3>),
 ChordFigureTuple(aboveBass=6, alter=0.0, prefix='', pitch=<music21.pitch.Pitch C4>),
 ChordFigureTuple(aboveBass=3, alter=0.0, prefix='', pitch=<music21.pitch.Pitch G4>),
 ChordFigureTuple(aboveBass=5, alter=-1.0, prefix='b', pitch=<music21.pitch.Pitch B-5>)]
>>> roman.figureTuples(
...     chord.Chord(['C4', 'E4', 'G4', 'C#4']),
...     key.Key('C'),
...     )
[ChordFigureTuple(aboveBass=1, alter=0.0, prefix='', pitch=<music21.pitch.Pitch C4>),
 ChordFigureTuple(aboveBass=3, alter=0.0, prefix='', pitch=<music21.pitch.Pitch E4>),
 ChordFigureTuple(aboveBass=5, alter=0.0, prefix='', pitch=<music21.pitch.Pitch G4>),
 ChordFigureTuple(aboveBass=1, alter=1.0, prefix='#', pitch=<music21.pitch.Pitch C#4>)]
music21.roman.identifyAsTonicOrDominant(inChord: Union[list, tuple, music21.chord.Chord], inKey: music21.key.Key) → Union[str, bool]

Returns the roman numeral string expression (either tonic or dominant) that best matches the inChord. Useful when you know inChord is either tonic or dominant, but only two pitches are provided in the chord. If neither tonic nor dominant is possibly correct, False is returned

>>> from music21 import roman
>>> roman.identifyAsTonicOrDominant(['B2', 'F5'], key.Key('C'))
'V65'
>>> roman.identifyAsTonicOrDominant(['B3', 'G4'], key.Key('g'))
'i6'
>>> roman.identifyAsTonicOrDominant(['C3', 'B4'], key.Key('f'))
'V7'
>>> roman.identifyAsTonicOrDominant(['D3'], key.Key('f'))
False
music21.roman.postFigureFromChordAndKey(chordObj, keyObj=None)

Returns the post RN figure for a given chord in a given key.

If keyObj is none, it uses the root as a major key:

>>> from music21 import roman
>>> roman.postFigureFromChordAndKey(
...     chord.Chord(['F#2', 'D3', 'A-3', 'C#4']),
...     key.Key('C'),
...     )
'o6#5b3'

The method substitutes shorthand (e.g., ‘6’ not ‘63’)

>>> roman.postFigureFromChordAndKey(
...     chord.Chord(['E3', 'C4', 'G4']),
...     key.Key('C'),
...     )
'6'
>>> roman.postFigureFromChordAndKey(
...     chord.Chord(['E3', 'C4', 'G4', 'B-5']),
...     key.Key('F'),
...     )
'65'
>>> roman.postFigureFromChordAndKey(
...     chord.Chord(['E3', 'C4', 'G4', 'B-5']),
...     key.Key('C'),
...     )
'6b5'

We reduce common omissions from seventh chords to be ‘7’ instead of ‘75’, ‘73’, etc.

>>> roman.postFigureFromChordAndKey(
...     chord.Chord(['A3', 'E-4', 'G-4']),
...     key.Key('b-'),
...     )
'o7'

Returns string.

music21.roman.romanInversionName(inChord, inv=None)

Extremely similar to Chord’s inversionName() method, but returns string values and allows incomplete triads

music21.roman.romanNumeralFromChord(chordObj, keyObj: Union[music21.key.Key, str] = None, preferSecondaryDominants=False)

Takes a chord object and returns an appropriate chord name. If keyObj is omitted, the root of the chord is considered the key (if the chord has a major third, it’s major; otherwise it’s minor). preferSecondaryDominants does not currently do anything.

>>> rn = roman.romanNumeralFromChord(
...     chord.Chord(['E-3', 'C4', 'G-6']),
...     key.Key('g#'),
...     )
>>> rn
<music21.roman.RomanNumeral bivo6 in g# minor>

The pitches remain the same with the same octaves:

>>> for p in rn.pitches:
...     p
<music21.pitch.Pitch E-3>
<music21.pitch.Pitch C4>
<music21.pitch.Pitch G-6>
>>> romanNumeral2 = roman.romanNumeralFromChord(
...     chord.Chord(['E3', 'C4', 'G4', 'B-4', 'E5', 'G5']),
...     key.Key('F'),
...     )
>>> romanNumeral2
<music21.roman.RomanNumeral V65 in F major>

Note that vi and vii in minor signifies what you might think of alternatively as #vi and #vii:

>>> romanNumeral3 = roman.romanNumeralFromChord(
...     chord.Chord(['A4', 'C5', 'E-5']),
...     key.Key('c'),
...     )
>>> romanNumeral3
<music21.roman.RomanNumeral vio in c minor>
>>> romanNumeral4 = roman.romanNumeralFromChord(
...     chord.Chord(['A-4', 'C5', 'E-5']),
...     key.Key('c'),
...     )
>>> romanNumeral4
<music21.roman.RomanNumeral bVI in c minor>
>>> romanNumeral5 = roman.romanNumeralFromChord(
...     chord.Chord(['B4', 'D5', 'F5']),
...     key.Key('c'),
...     )
>>> romanNumeral5
<music21.roman.RomanNumeral viio in c minor>
>>> romanNumeral6 = roman.romanNumeralFromChord(
...     chord.Chord(['B-4', 'D5', 'F5']),
...     key.Key('c'),
...     )
>>> romanNumeral6
<music21.roman.RomanNumeral bVII in c minor>

Diminished and half-diminished seventh chords can omit the third and still be diminished: (n.b. we also demonstrate that chords can be created from a string):

>>> romanNumeralDim7 = roman.romanNumeralFromChord(
...     chord.Chord('A3 E-4 G-4'),
...     key.Key('b-'),
...     )
>>> romanNumeralDim7
<music21.roman.RomanNumeral viio7 in b- minor>

For reference, odder notes:

>>> romanNumeral7 = roman.romanNumeralFromChord(
...     chord.Chord(['A--4', 'C-5', 'E--5']),
...     key.Key('c'),
...     )
>>> romanNumeral7
<music21.roman.RomanNumeral bbVI in c minor>
>>> romanNumeral8 = roman.romanNumeralFromChord(
...     chord.Chord(['A#4', 'C#5', 'E#5']),
...     key.Key('c'),
...     )
>>> romanNumeral8
<music21.roman.RomanNumeral #vi in c minor>
>>> romanNumeral10 = roman.romanNumeralFromChord(
...     chord.Chord(['F#3', 'A3', 'E4', 'C5']),
...     key.Key('d'),
...     )
>>> romanNumeral10
<music21.roman.RomanNumeral #iiiø7 in d minor>

Augmented 6ths without key context

>>> roman.romanNumeralFromChord(
...     chord.Chord('E-4 G4 C#5'),
...     )
<music21.roman.RomanNumeral It6 in g minor>
>>> roman.romanNumeralFromChord(
...     chord.Chord('E-4 G4 B-4 C#5'),
...     )
<music21.roman.RomanNumeral Ger65 in g minor>
>>> roman.romanNumeralFromChord(
...     chord.Chord('E-4 G4 A4 C#5'),
...     )
<music21.roman.RomanNumeral Fr43 in g minor>
>>> roman.romanNumeralFromChord(
...     chord.Chord('E-4 G4 A#4 C#5'),
...     )
<music21.roman.RomanNumeral Sw43 in g minor>

With correct key context:

>>> roman.romanNumeralFromChord(
...     chord.Chord('E-4 G4 C#5'),
...     key.Key('G')
...     )
<music21.roman.RomanNumeral It6 in G major>

With incorrect key context does not find an augmented 6th chord:

>>> roman.romanNumeralFromChord(
...     chord.Chord('E-4 G4 C#5'),
...     key.Key('C')
...     )
<music21.roman.RomanNumeral #io6b3 in C major>

Former bugs that are now fixed:

>>> romanNumeral11 = roman.romanNumeralFromChord(
...     chord.Chord(['E4', 'G4', 'B4', 'D5']),
...     key.Key('C'),
...     )
>>> romanNumeral11
<music21.roman.RomanNumeral iii7 in C major>
>>> roman.romanNumeralFromChord(chord.Chord('A3 C4 E-4 G4'), key.Key('c'))
<music21.roman.RomanNumeral viø7 in c minor>
>>> roman.romanNumeralFromChord(chord.Chord('A3 C4 E-4 G4'), key.Key('B-'))
<music21.roman.RomanNumeral viiø7 in B- major>
>>> romanNumeral9 = roman.romanNumeralFromChord(
...     chord.Chord(['C4', 'E5', 'G5', 'C#6']),
...     key.Key('C'),
...     )
>>> romanNumeral9
<music21.roman.RomanNumeral I#853 in C major>

Not an augmented 6th:

>>> roman.romanNumeralFromChord(
...     chord.Chord('E4 G4 B-4 C#5')
...     )
<music21.roman.RomanNumeral io6b5b3 in c# minor>