RomanNumeral

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=1]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjadext/tonality/../../abjad/system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; "abjad.system.AbjadValueObject.AbjadValueObject" [URL="../api/abjadext/tonality/../../abjad/system/AbjadValueObject.html#abjad.system.AbjadValueObject.AbjadValueObject", label="Abjad\nValue\nObject", target=_top]; "abjad.system.AbjadObject.AbjadObject" -> "abjad.system.AbjadValueObject.AbjadValueObject"; } subgraph "cluster_abjadext.tonality" { graph [label="abjadext.tonality"]; node [color=2]; "abjadext.tonality.RomanNumeral.RomanNumeral" [URL="../api/abjadext/tonality/RomanNumeral.html#abjadext.tonality.RomanNumeral.RomanNumeral", color=black, fontcolor=white, label="Roman\nNumeral", target=_top]; } subgraph cluster_builtins { graph [label=builtins]; node [color=3]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } "abjad.system.AbjadValueObject.AbjadValueObject" -> "abjadext.tonality.RomanNumeral.RomanNumeral"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjadext.tonality.RomanNumeral.RomanNumeral(symbol='V7')

Roman numeral.

Initializes from string:

>>> abjadext.tonality.RomanNumeral('bII6/4')
RomanNumeral('bII6/4')

Initializes from other Roman numeral:

>>> roman_numeral = abjadext.tonality.RomanNumeral('bII')

Attributes Summary

__eq__ Is true when argument is a Roman numeral with scale degree, quality, extent, inversion and suspension equal to those of this Roman numeral.
__hash__ Hashes Roman numeral.
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.

Special methods

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new 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.

>>> roman_numeral_1 = abjadext.tonality.RomanNumeral('I')
>>> roman_numeral_2 = abjadext.tonality.RomanNumeral('I')
>>> roman_numeral_3 = abjadext.tonality.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.

__hash__()

Hashes Roman numeral.

Returns integer.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Class & static methods

static 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.


Read-only properties

bass_scale_degree

Gets bass scale degree.

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

Returns scale degree.

extent

Gets extent.

>>> abjadext.tonality.RomanNumeral('bII').extent
ChordExtent(5)

Returns extent.

figured_bass_string

Gets figured bass string.

>>> abjadext.tonality.RomanNumeral('II6/5').figured_bass_string
'6/5'

Returns string.

inversion

Gets inversion.

>>> abjadext.tonality.RomanNumeral('bII').inversion
ChordInversion(0)

Returns nonnegative integer.

markup

Gets markup.

>>> markup = abjadext.tonality.RomanNumeral('bII').markup
>>> abjad.show(markup) 

Returns markup.

quality

Gets quality.

>>> abjadext.tonality.RomanNumeral('bII').quality
ChordQuality('major')

Returns chord quality.

root_scale_degree

Gets root scale degree.

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

Returns scale degree.

suspension

Gets suspension.

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

Returns suspension.

symbol

Gets symbolc of Roman numeral.

>>> abjadext.tonality.RomanNumeral('bII6/4').symbol
'bII6/4'
>>> abjadext.tonality.RomanNumeral('V7').symbol
'V7'

Returns string.