NamedInversionEquivalentIntervalClass

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.pitch" { graph [label="abjad.pitch"]; node [color=1]; "abjad.pitch.IntervalClass.IntervalClass" [URL="../api/abjad/pitch/IntervalClass.html#abjad.pitch.IntervalClass.IntervalClass", label="Interval\nClass", shape=oval, style=bold, target=_top]; "abjad.pitch.NamedIntervalClass.NamedIntervalClass" [URL="../api/abjad/pitch/NamedIntervalClass.html#abjad.pitch.NamedIntervalClass.NamedIntervalClass", label="Named\nInterval\nClass", target=_top]; "abjad.pitch.NamedInversionEquivalentIntervalClass.NamedInversionEquivalentIntervalClass" [URL="../api/abjad/pitch/NamedInversionEquivalentIntervalClass.html#abjad.pitch.NamedInversionEquivalentIntervalClass.NamedInversionEquivalentIntervalClass", color=black, fontcolor=white, label="Named\nInversion\nEquivalent\nInterval\nClass", target=_top]; "abjad.pitch.IntervalClass.IntervalClass" -> "abjad.pitch.NamedIntervalClass.NamedIntervalClass"; "abjad.pitch.NamedIntervalClass.NamedIntervalClass" -> "abjad.pitch.NamedInversionEquivalentIntervalClass.NamedInversionEquivalentIntervalClass"; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=2]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/pitch/../system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; "abjad.system.AbjadValueObject.AbjadValueObject" [URL="../api/abjad/pitch/../system/AbjadValueObject.html#abjad.system.AbjadValueObject.AbjadValueObject", label="Abjad\nValue\nObject", target=_top]; "abjad.system.AbjadObject.AbjadObject" -> "abjad.system.AbjadValueObject.AbjadValueObject"; } 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" -> "abjad.pitch.IntervalClass.IntervalClass"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.pitch.NamedInversionEquivalentIntervalClass.NamedInversionEquivalentIntervalClass(name='P1')

Named inversion-equivalent interval-class.

Initializes from string:

>>> abjad.NamedInversionEquivalentIntervalClass('-m14')
NamedInversionEquivalentIntervalClass('+M2')

Initializes from pair:

>>> abjad.NamedInversionEquivalentIntervalClass(('perfect', 1))
NamedInversionEquivalentIntervalClass('P1')
>>> abjad.NamedInversionEquivalentIntervalClass(('perfect', -1))
NamedInversionEquivalentIntervalClass('P1')
>>> abjad.NamedInversionEquivalentIntervalClass(('augmented', 4))
NamedInversionEquivalentIntervalClass('+A4')
>>> abjad.NamedInversionEquivalentIntervalClass(('augmented', -4))
NamedInversionEquivalentIntervalClass('+A4')
>>> abjad.NamedInversionEquivalentIntervalClass(('augmented', 11))
NamedInversionEquivalentIntervalClass('+A4')
>>> abjad.NamedInversionEquivalentIntervalClass(('augmented', -11))
NamedInversionEquivalentIntervalClass('+A4')

Initializes from other interval-class:

>>> interval_class = abjad.NamedInversionEquivalentIntervalClass(
...     'P1',
...     )
>>> abjad.NamedInversionEquivalentIntervalClass(interval_class)
NamedInversionEquivalentIntervalClass('P1')

Attributes Summary

__eq__ Is true when argument is a named inversion-equivalent interval-class with name equal to that of this named inversion-equivalent interval-class.
__hash__ Hashes named inversion-equivalent interval-class.
from_pitch_carriers Makes named inversion-equivalent interval-class from pitch_carrier_1 and pitch_carrier_2.

Special methods

(NamedIntervalClass).__abs__()

Gets absolute value of named interval-class.

>>> abs(abjad.NamedIntervalClass('-M9'))
NamedIntervalClass('+M2')

Returns new named interval-class.

(NamedIntervalClass).__add__(argument)

Adds argument to named interval-class.

Returns new named interval-class.

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

__eq__(argument)

Is true when argument is a named inversion-equivalent interval-class with name equal to that of this named inversion-equivalent interval-class.

>>> class_ = abjad.NamedInversionEquivalentIntervalClass
>>> interval_class_1 = class_('P1')
>>> interval_class_2 = class_('P1')
>>> interval_class_3 = class_('m2')
>>> interval_class_1 == interval_class_1
True
>>> interval_class_1 == interval_class_2
True
>>> interval_class_1 == interval_class_3
False
>>> interval_class_2 == interval_class_1
True
>>> interval_class_2 == interval_class_2
True
>>> interval_class_2 == interval_class_3
False
>>> interval_class_3 == interval_class_1
False
>>> interval_class_3 == interval_class_2
False
>>> interval_class_3 == interval_class_3
True

Returns true or false.

(NamedIntervalClass).__float__()

Coerce to float.

Returns float.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to '' or 'storage'. Interprets '' equal to 'storage'.

Returns string.

(IntervalClass).__ge__(other, NotImplemented=NotImplemented)

Return a >= b. Computed by @total_ordering from (not a < b).

(IntervalClass).__gt__(other, NotImplemented=NotImplemented)

Return a > b. Computed by @total_ordering from (not a < b) and (a != b).

__hash__()

Hashes named inversion-equivalent interval-class.

Returns integer.

(IntervalClass).__le__(other, NotImplemented=NotImplemented)

Return a <= b. Computed by @total_ordering from (a < b) or (a == b).

(NamedIntervalClass).__lt__(argument)

Is true when argument is a named interval class with a number greater than that of this named interval.

>>> interval_class_1 = abjad.NamedIntervalClass('P1')
>>> interval_class_2 = abjad.NamedIntervalClass('P1')
>>> interval_class_3 = abjad.NamedIntervalClass('m2')
>>> interval_class_1 < interval_class_1
False
>>> interval_class_1 < interval_class_2
False
>>> interval_class_1 < interval_class_3
True
>>> interval_class_2 < interval_class_1
False
>>> interval_class_2 < interval_class_2
False
>>> interval_class_2 < interval_class_3
True
>>> interval_class_3 < interval_class_1
False
>>> interval_class_3 < interval_class_2
False
>>> interval_class_3 < interval_class_3
False

Returns true or false.

(NamedIntervalClass).__radd__(argument)

Adds interval-class to argument.

Returns new named interval-class.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.

(NamedIntervalClass).__str__()

Gets string representation of named interval-class.

>>> str(abjad.NamedIntervalClass('-M9'))
'-M2'

Returns string.

(NamedIntervalClass).__sub__(argument)

Subtracts argument from named interval-class.

Returns new named interval-class.


Methods

(IntervalClass).transpose(pitch_carrier)

Transposes pitch_carrier by interval-class.

Returns new pitch carrier.


Class & static methods

classmethod from_pitch_carriers(pitch_carrier_1, pitch_carrier_2)

Makes named inversion-equivalent interval-class from pitch_carrier_1 and pitch_carrier_2.

>>> class_ = abjad.NamedInversionEquivalentIntervalClass
>>> class_.from_pitch_carriers(
...     abjad.NamedPitch(-2),
...     abjad.NamedPitch(12),
...     )
NamedInversionEquivalentIntervalClass('+M2')

Returns new named inversion-equivalent interval-class.


Read-only properties

(NamedIntervalClass).direction_number

Gets direction number of named interval-class.

>>> abjad.NamedIntervalClass('P1').direction_number
0
>>> abjad.NamedIntervalClass('+M2').direction_number
1
>>> abjad.NamedIntervalClass('-M2').direction_number
-1

Returns -1, 0 or 1.

(NamedIntervalClass).name

Gets name of named interval-class.

>>> abjad.NamedIntervalClass('-M9').name
'-M2'

Returns string.

(IntervalClass).number

Gets number of interval-class.

Returns number.

(NamedIntervalClass).quality

Gets quality of named interval-class.

Returns string.