NumberedInversionEquivalentIntervalClass

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.NumberedIntervalClass.NumberedIntervalClass" [URL="../api/abjad/pitch/NumberedIntervalClass.html#abjad.pitch.NumberedIntervalClass.NumberedIntervalClass", label="Numbered\nInterval\nClass", target=_top]; "abjad.pitch.NumberedInversionEquivalentIntervalClass.NumberedInversionEquivalentIntervalClass" [URL="../api/abjad/pitch/NumberedInversionEquivalentIntervalClass.html#abjad.pitch.NumberedInversionEquivalentIntervalClass.NumberedInversionEquivalentIntervalClass", color=black, fontcolor=white, label="Numbered\nInversion\nEquivalent\nInterval\nClass", target=_top]; "abjad.pitch.IntervalClass.IntervalClass" -> "abjad.pitch.NumberedIntervalClass.NumberedIntervalClass"; "abjad.pitch.NumberedIntervalClass.NumberedIntervalClass" -> "abjad.pitch.NumberedInversionEquivalentIntervalClass.NumberedInversionEquivalentIntervalClass"; } 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.NumberedInversionEquivalentIntervalClass.NumberedInversionEquivalentIntervalClass(number=0)

Numbered inversion-equivalent interval-class.

Initializes from integer:

>>> abjad.NumberedInversionEquivalentIntervalClass(0)
NumberedInversionEquivalentIntervalClass(0)
>>> abjad.NumberedInversionEquivalentIntervalClass(1)
NumberedInversionEquivalentIntervalClass(1)

Initializes from float:

>>> abjad.NumberedInversionEquivalentIntervalClass(1.5)
NumberedInversionEquivalentIntervalClass(1.5)

Initializes from string:

>>> abjad.NumberedInversionEquivalentIntervalClass('1')
NumberedInversionEquivalentIntervalClass(1)

Attributes Summary

__abs__ Gets absolute value of numbered inversion-equivalent interval-class.
__lt__ Is true when argument is a numbered inversion-equivalent interval-class with a number less than this numbered inversion-equivalent interval-class.
__neg__ Negates numbered inversion-equivalent interval-class.
__str__ Gets string representation of numbered inversion-equivalent interval-class.

Special methods

__abs__()

Gets absolute value of numbered inversion-equivalent interval-class.

>>> abs(abjad.NumberedInversionEquivalentIntervalClass(0))
NumberedInversionEquivalentIntervalClass(0)
>>> abs(abjad.NumberedInversionEquivalentIntervalClass(1.5))
NumberedInversionEquivalentIntervalClass(1.5)

Returns new numbered inversion-equivalent interval-class.

(NumberedIntervalClass).__add__(argument)

Adds argument to numbered interval-class.

Returns new numbered interval-class.

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

(NumberedIntervalClass).__eq__(argument)

Is true when argument is a numbered interval-class with number equal to that of this numbered interval-class.

>>> interval_class_1 = abjad.NumberedIntervalClass(0)
>>> interval_class_2 = abjad.NumberedIntervalClass(0)
>>> interval_class_3 = abjad.NumberedIntervalClass(1)
>>> 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.

(NumberedIntervalClass).__float__()

Coerce to semitones as 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).

(NumberedIntervalClass).__hash__()

Hashes numbered interval-class.

Returns integer.

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

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

__lt__(argument)

Is true when argument is a numbered inversion-equivalent interval-class with a number less than this numbered inversion-equivalent interval-class.

__neg__()

Negates numbered inversion-equivalent interval-class.

>>> -abjad.NumberedInversionEquivalentIntervalClass(0)
NumberedInversionEquivalentIntervalClass(0)
>>> -abjad.NumberedInversionEquivalentIntervalClass(1.5)
NumberedInversionEquivalentIntervalClass(1.5)

Returns new numbered inversion-equivalent interval-class.

(NumberedIntervalClass).__radd__(argument)

Adds argument to numbered interval-class.

Returns new numbered interval-class.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.

__str__()

Gets string representation of numbered inversion-equivalent interval-class.

>>> str(abjad.NumberedInversionEquivalentIntervalClass(0))
'0'
>>> str(abjad.NumberedInversionEquivalentIntervalClass(1.5))
'1.5'

Returns string.

(NumberedIntervalClass).__sub__(argument)

Subtracts argument from numbered interval-class.

Returns new numbered interval-class.


Methods

(IntervalClass).transpose(pitch_carrier)

Transposes pitch_carrier by interval-class.

Returns new pitch carrier.


Class & static methods

classmethod (NumberedIntervalClass).from_pitch_carriers(pitch_carrier_1, pitch_carrier_2)

Makes numbered interval-class from pitch_carrier_1 and pitch_carrier_2.

>>> abjad.NumberedIntervalClass.from_pitch_carriers(
...     abjad.NamedPitch(-2),
...     abjad.NamedPitch(12),
...     )
NumberedIntervalClass(2)
>>> abjad.NumberedIntervalClass.from_pitch_carriers(
...     abjad.NamedPitch(0),
...     abjad.NamedPitch(12),
...     )
NumberedIntervalClass(12)
>>> abjad.NumberedIntervalClass.from_pitch_carriers(
...     abjad.NamedPitch(9),
...     abjad.NamedPitch(12),
...     )
NumberedIntervalClass(3)
>>> abjad.NumberedIntervalClass.from_pitch_carriers(
...     abjad.NamedPitch(12),
...     abjad.NamedPitch(9),
...     )
NumberedIntervalClass(-3)
>>> abjad.NumberedIntervalClass.from_pitch_carriers(
...     abjad.NamedPitch(12),
...     abjad.NamedPitch(12),
...     )
NumberedIntervalClass(0)
>>> abjad.NumberedIntervalClass.from_pitch_carriers(
...     abjad.NamedPitch(24),
...     abjad.NamedPitch(0),
...     )
NumberedIntervalClass(-12)
>>> abjad.NumberedIntervalClass.from_pitch_carriers(
...     abjad.NamedPitch(12),
...     abjad.NamedPitch(-2),
...     )
NumberedIntervalClass(-2)

Returns numbered interval-class.


Read-only properties

(NumberedIntervalClass).direction_number

Gets direction number of numbered interval-class.

Returns -1, 0 or 1.

(IntervalClass).number

Gets number of interval-class.

Returns number.