ChordInversion

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.ChordInversion.ChordInversion" [URL="../api/abjadext/tonality/ChordInversion.html#abjadext.tonality.ChordInversion.ChordInversion", color=black, fontcolor=white, label="Chord\nInversion", 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.ChordInversion.ChordInversion"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjadext.tonality.ChordInversion.ChordInversion(number=0)

Chord inversion.

>>> abjadext.tonality.ChordInversion(1)
ChordInversion(1)

Attributes Summary

__eq__ Is true when argument is a chord inversion with number equal to that of this chord inversion.
__hash__ Hashes chord inversion.
extent_to_figured_bass_string Changes extent to figured bass string.
name Gets name.
number Number of chord inversion.
title Title of chord inversion.

Special methods

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

__eq__(argument)

Is true when argument is a chord inversion with number equal to that of this chord inversion.

>>> inversion_1 = abjadext.tonality.ChordInversion(0)
>>> inversion_2 = abjadext.tonality.ChordInversion(0)
>>> inversion_3 = abjadext.tonality.ChordInversion(1)
>>> inversion_1 == inversion_1
True
>>> inversion_1 == inversion_2
True
>>> inversion_1 == inversion_3
False
>>> inversion_2 == inversion_1
True
>>> inversion_2 == inversion_2
True
>>> inversion_2 == inversion_3
False
>>> inversion_3 == inversion_1
False
>>> inversion_3 == inversion_2
False
>>> inversion_3 == inversion_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 chord inversion.

Required to be explicitly redefined on Python 3 if __eq__ changes.

Returns integer.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Methods

extent_to_figured_bass_string(extent)

Changes extent to figured bass string.

>>> inversion = abjadext.tonality.ChordInversion(0)
>>> inversion.extent_to_figured_bass_string(5)
''
>>> inversion.extent_to_figured_bass_string(7)
'7'
>>> inversion = abjadext.tonality.ChordInversion(1)
>>> inversion.extent_to_figured_bass_string(5)
'6'
>>> inversion.extent_to_figured_bass_string(7)
'6/5'
>>> inversion = abjadext.tonality.ChordInversion(2)
>>> inversion.extent_to_figured_bass_string(5)
'6/4'
>>> inversion.extent_to_figured_bass_string(7)
'4/3'
>>> inversion = abjadext.tonality.ChordInversion(3)
>>> inversion.extent_to_figured_bass_string(7)
'4/2'

Returns string.


Read-only properties

name

Gets name.

>>> abjadext.tonality.ChordInversion(0).name
'root position'
>>> abjadext.tonality.ChordInversion(1).name
'first'
>>> abjadext.tonality.ChordInversion(2).name
'second'

Returns string.

number

Number of chord inversion.

>>> abjadext.tonality.ChordInversion(0).number
0
>>> abjadext.tonality.ChordInversion(1).number
1
>>> abjadext.tonality.ChordInversion(2).number
2

Returns nonnegative integer.

title

Title of chord inversion.

>>> abjadext.tonality.ChordInversion(0).title
'RootPosition'
>>> abjadext.tonality.ChordInversion(1).title
'FirstInversion'
>>> abjadext.tonality.ChordInversion(2).title
'SecondInversion'

Returns string.