NumberedInversionEquivalentIntervalClass

class pitchtools.NumberedInversionEquivalentIntervalClass(interval_class_token=None)

Numbered inversion-equivalent interval-class.

Example 1. Initializes from integer:

>>> pitchtools.NumberedInversionEquivalentIntervalClass(1)
NumberedInversionEquivalentIntervalClass(1)

Example 2. Initializes from string:

>>> pitchtools.NumberedInversionEquivalentIntervalClass('1')
NumberedInversionEquivalentIntervalClass(1)

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_abctools { graph [label=abctools]; "abjad.tools.abctools.AbjadObject.AbjadObject" [color=1, group=0, label=AbjadObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" [color=1, group=0, label=AbstractBase, shape=box]; "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" [color=1, group=0, label=AbjadValueObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.abctools.AbjadValueObject.AbjadValueObject"; "abjad.tools.abctools.AbjadObject.AbstractBase" -> "abjad.tools.abctools.AbjadObject.AbjadObject"; } subgraph cluster_pitchtools { graph [label=pitchtools]; "abjad.tools.pitchtools.IntervalClass.IntervalClass" [color=3, group=2, label=IntervalClass, shape=oval, style=bold]; "abjad.tools.pitchtools.NumberedIntervalClass.NumberedIntervalClass" [color=3, group=2, label=NumberedIntervalClass, shape=box]; "abjad.tools.pitchtools.NumberedInversionEquivalentIntervalClass.NumberedInversionEquivalentIntervalClass" [color=black, fontcolor=white, group=2, label=<<B>NumberedInversionEquivalentIntervalClass</B>>, shape=box, style="filled, rounded"]; "abjad.tools.pitchtools.IntervalClass.IntervalClass" -> "abjad.tools.pitchtools.NumberedIntervalClass.NumberedIntervalClass"; "abjad.tools.pitchtools.NumberedIntervalClass.NumberedIntervalClass" -> "abjad.tools.pitchtools.NumberedInversionEquivalentIntervalClass.NumberedInversionEquivalentIntervalClass"; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" -> "abjad.tools.pitchtools.IntervalClass.IntervalClass"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Attribute summary

direction_number Direction number of numbered interval-class.
direction_symbol Direction symbol of numbered interval class.
direction_word Direction word of numbered interval-class.
from_pitch_carriers(class_, pitch_carrier_1, ...) Makes numbered interval-class from pitch_carrier_1 and pitch_carrier_2.
number Number of interval-class.
__abs__() Absolute value of numbered inversion-equivalent interval-class.
__copy__() Copies numbered inversion-equivalent interval-class.
__eq__(arg) Is true when arg is a numbered interval-class with number equal to that of this numbered interval-class.
__float__() Changes numbered interval-class to float.
__format__([format_specification]) Formats Abjad object.
__hash__() Hashes numbered interval-class.
__int__() Changes numbered interval-class to integer.
__lt__(arg) Is true when arg is a numbered inversion-equivalent interval-class with a number less than this numbered inversion-equivalent interval-class.
__ne__(expr) Is true when Abjad object does not equal expr.
__neg__() Negates numbered inversion-equivalent interval-class.
__repr__() Gets interpreter representation of Abjad object.
__str__() String representation of numbered inversion-equivalent interval-class.

Read-only properties

(NumberedIntervalClass).direction_number

Direction number of numbered interval-class.

Returns -1, 0 or 1.

(NumberedIntervalClass).direction_symbol

Direction symbol of numbered interval class.

Returns string.

(NumberedIntervalClass).direction_word

Direction word of numbered interval-class.

Returns string.

(IntervalClass).number

Number of interval-class.

Returns number.

Class & static methods

(NumberedIntervalClass).from_pitch_carriers(class_, pitch_carrier_1, pitch_carrier_2)

Makes numbered interval-class from pitch_carrier_1 and pitch_carrier_2.

>>> pitchtools.NumberedIntervalClass.from_pitch_carriers(
...     NamedPitch(-2),
...     NamedPitch(12),
...     )
NumberedIntervalClass(2)

Returns numbered interval-class.

Special methods

NumberedInversionEquivalentIntervalClass.__abs__()

Absolute value of numbered inversion-equivalent interval-class.

Returns new numbered inversion-equivalent interval-class.

NumberedInversionEquivalentIntervalClass.__copy__()

Copies numbered inversion-equivalent interval-class.

Returns new numbered inversion-equivalent interval-class.

(NumberedIntervalClass).__eq__(arg)

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

Returns true or false.

(NumberedIntervalClass).__float__()

Changes numbered interval-class to float.

Returns float.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

(NumberedIntervalClass).__hash__()

Hashes numbered interval-class.

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

Returns integer.

(NumberedIntervalClass).__int__()

Changes numbered interval-class to integer.

Returns integer.

NumberedInversionEquivalentIntervalClass.__lt__(arg)

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

(AbjadObject).__ne__(expr)

Is true when Abjad object does not equal expr. Otherwise false.

Returns true or false.

NumberedInversionEquivalentIntervalClass.__neg__()

Negates numbered inversion-equivalent interval-class.

Returns new numbered inversion-equivalent interval-class.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.

NumberedInversionEquivalentIntervalClass.__str__()

String representation of numbered inversion-equivalent interval-class.

Returns string.