ChordQuality

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

class abjadext.tonality.ChordQuality.ChordQuality(quality_string='major')

Chord quality.

Initializes from string:

>>> abjadext.tonality.ChordQuality('major')
ChordQuality('major')

Initializes from other chord quality:

>>> quality = abjadext.tonality.ChordQuality('major')
>>> abjadext.tonality.ChordQuality(quality)
ChordQuality('major')

Attributes Summary

__eq__ Is true when argument is a chord quality with quality string equal to that of this chord quality.
__hash__ Hashes chord quality.
__str__ Gets string representation of chord quality.
is_uppercase Is true when chord quality is uppercase.
quality_string Gets quality string.

Special methods

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

__eq__(argument)

Is true when argument is a chord quality with quality string equal to that of this chord quality.

>>> quality_1 = abjadext.tonality.ChordQuality('major')
>>> quality_2 = abjadext.tonality.ChordQuality('major')
>>> quality_3 = abjadext.tonality.ChordQuality('dominant')
>>> quality_1 == quality_1
True
>>> quality_1 == quality_2
True
>>> quality_1 == quality_3
False
>>> quality_2 == quality_1
True
>>> quality_2 == quality_2
True
>>> quality_2 == quality_3
False
>>> quality_3 == quality_1
False
>>> quality_3 == quality_2
False
>>> quality_3 == quality_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 quality.

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

Returns integer.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.

__str__()

Gets string representation of chord quality.

>>> quality = abjadext.tonality.ChordQuality('major')
>>> str(quality)
'major'

Returns string.


Read-only properties

is_uppercase

Is true when chord quality is uppercase.

>>> abjadext.tonality.ChordQuality('major').is_uppercase
True
>>> abjadext.tonality.ChordQuality('minor').is_uppercase
False

Returns true or false.

quality_string

Gets quality string.

>>> abjadext.tonality.ChordQuality('major').quality_string
'major'
>>> abjadext.tonality.ChordQuality('minor').quality_string
'minor'

Returns string.