RomanNumeral

class tonalanalysistools.RomanNumeral(symbol='V7')

Roman numeral.

>>> from abjad.tools import tonalanalysistools

Initializes from string:

>>> tonalanalysistools.RomanNumeral('bII6/4')
RomanNumeral('bII6/4')

Initializes from other Roman numeral:

>>> roman_numeral = tonalanalysistools.RomanNumeral('bII')

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_abctools { graph [label=abctools]; "abjad.tools.abctools.AbjadObject.AbjadObject" [color=1, group=0, label=AbjadObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" [color=1, group=0, label=AbstractBase, shape=box]; "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" [color=1, group=0, label=AbjadValueObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.abctools.AbjadValueObject.AbjadValueObject"; "abjad.tools.abctools.AbjadObject.AbstractBase" -> "abjad.tools.abctools.AbjadObject.AbjadObject"; } subgraph cluster_tonalanalysistools { graph [label=tonalanalysistools]; "abjad.tools.tonalanalysistools.RomanNumeral.RomanNumeral" [color=black, fontcolor=white, group=2, label=<<B>RomanNumeral</B>>, shape=box, style="filled, rounded"]; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" -> "abjad.tools.tonalanalysistools.RomanNumeral.RomanNumeral"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Bases

Attribute summary

bass_scale_degree Gets bass scale degree.
extent Gets extent.
figured_bass_string Gets figured bass string.
from_scale_degree_quality_extent_and_inversion(…) Makes Roman numeral from scale_degree, quality, extent and inversion.
inversion Gets inversion.
markup Gets markup.
quality Gets quality.
root_scale_degree Gets root scale degree.
suspension Gets suspension.
symbol Gets symbolc of Roman numeral.
__copy__(*arguments) Copies Abjad value object.
__eq__(argument) Is true when argument is a Roman numeral with scale degree, quality, extent, inversion and suspension equal to those of this Roman numeral.
__format__([format_specification]) Formats Abjad object.
__hash__() Hashes Roman numeral.
__ne__(argument) Is true when Abjad object does not equal argument.
__repr__() Gets interpreter representation of Abjad object.

Read-only properties

RomanNumeral.bass_scale_degree

Gets bass scale degree.

>>> tonalanalysistools.RomanNumeral('bII6/4').bass_scale_degree
ScaleDegree('6')
>>> tonalanalysistools.RomanNumeral('V7').bass_scale_degree
ScaleDegree('5')

Returns scale degree.

RomanNumeral.extent

Gets extent.

>>> tonalanalysistools.RomanNumeral('bII').extent
ChordExtent(5)

Returns extent.

RomanNumeral.figured_bass_string

Gets figured bass string.

>>> tonalanalysistools.RomanNumeral('II6/5').figured_bass_string
'6/5'

Returns string.

RomanNumeral.inversion

Gets inversion.

>>> tonalanalysistools.RomanNumeral('bII').inversion
ChordInversion(0)

Returns nonnegative integer.

RomanNumeral.markup

Gets markup.

>>> markup = tonalanalysistools.RomanNumeral('bII').markup
>>> show(markup) 

Returns markup.

RomanNumeral.quality

Gets quality.

>>> tonalanalysistools.RomanNumeral('bII').quality
ChordQuality('major')

Returns chord quality.

RomanNumeral.root_scale_degree

Gets root scale degree.

>>> tonalanalysistools.RomanNumeral('bII').root_scale_degree
ScaleDegree('b2')
>>> tonalanalysistools.RomanNumeral('bII6/4').root_scale_degree
ScaleDegree('b2')

Returns scale degree.

RomanNumeral.suspension

Gets suspension.

>>> tonalanalysistools.RomanNumeral('bII6/4').suspension is None
True
>>> tonalanalysistools.RomanNumeral('V7').suspension is None
True

Returns suspension.

RomanNumeral.symbol

Gets symbolc of Roman numeral.

>>> tonalanalysistools.RomanNumeral('bII6/4').symbol
'bII6/4'
>>> tonalanalysistools.RomanNumeral('V7').symbol
'V7'

Returns string.

Class & static methods

static RomanNumeral.from_scale_degree_quality_extent_and_inversion(scale_degree, quality, extent, inversion)

Makes Roman numeral from scale_degree, quality, extent and inversion.

Returns new Roman numeral.

Special methods

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

RomanNumeral.__eq__(argument)

Is true when argument is a Roman numeral with scale degree, quality, extent, inversion and suspension equal to those of this Roman numeral. Otherwise false.

>>> roman_numeral_1 = tonalanalysistools.RomanNumeral('I')
>>> roman_numeral_2 = tonalanalysistools.RomanNumeral('I')
>>> roman_numeral_3 = tonalanalysistools.RomanNumeral('V7')
>>> roman_numeral_1 == roman_numeral_1
True
>>> roman_numeral_1 == roman_numeral_2
True
>>> roman_numeral_1 == roman_numeral_3
False
>>> roman_numeral_2 == roman_numeral_1
True
>>> roman_numeral_2 == roman_numeral_2
True
>>> roman_numeral_2 == roman_numeral_3
False
>>> roman_numeral_3 == roman_numeral_1
False
>>> roman_numeral_3 == roman_numeral_2
False
>>> roman_numeral_3 == roman_numeral_3
True

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

RomanNumeral.__hash__()

Hashes Roman numeral.

Returns integer.

(AbjadObject).__ne__(argument)

Is true when Abjad object does not equal argument. Otherwise false.

Returns true or false.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.