ChordExtent

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

class abjadext.tonality.ChordExtent.ChordExtent(number=5)

Chord extent.

Initializes from number:

>>> abjadext.tonality.ChordExtent(7)
ChordExtent(7)

Initializes from other chord extent:

>>> extent = abjadext.tonality.ChordExtent(7)
>>> abjadext.tonality.ChordExtent(extent)
ChordExtent(7)

Defined equal to outer interval of any root-position chord.


Attributes Summary

__eq__ Is true when argument is a chord extent with number equal to that of this chord extent.
__hash__ Hashes chord extent.
name Gets name.
number Gets number.

Special methods

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

__eq__(argument)

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

>>> extent_1 = abjadext.tonality.ChordExtent(5)
>>> extent_2 = abjadext.tonality.ChordExtent(5)
>>> extent_3 = abjadext.tonality.ChordExtent(7)
>>> extent_1 == extent_1
True
>>> extent_1 == extent_2
True
>>> extent_1 == extent_3
False
>>> extent_2 == extent_1
True
>>> extent_2 == extent_2
True
>>> extent_2 == extent_3
False
>>> extent_3 == extent_1
False
>>> extent_3 == extent_2
False
>>> extent_3 == extent_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 extent.

Returns integer.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Read-only properties

name

Gets name.

>>> abjadext.tonality.ChordExtent(5).name
'triad'
>>> abjadext.tonality.ChordExtent(7).name
'seventh'

Returns string.

number

Gets number.

>>> abjadext.tonality.ChordExtent(7).number
7

Returns nonnegative integer.