Interval

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.Interval.Interval" [URL="../api/abjad/pitch/Interval.html#abjad.pitch.Interval.Interval", color=black, fontcolor=white, label=Interval, shape=oval, style="bold, filled", target=_top]; "abjad.pitch.NamedInterval.NamedInterval" [URL="../api/abjad/pitch/NamedInterval.html#abjad.pitch.NamedInterval.NamedInterval", label="Named\nInterval", target=_top]; "abjad.pitch.NumberedInterval.NumberedInterval" [URL="../api/abjad/pitch/NumberedInterval.html#abjad.pitch.NumberedInterval.NumberedInterval", label="Numbered\nInterval", target=_top]; "abjad.pitch.Interval.Interval" -> "abjad.pitch.NamedInterval.NamedInterval"; "abjad.pitch.Interval.Interval" -> "abjad.pitch.NumberedInterval.NumberedInterval"; } 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.Interval.Interval"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

abstract class abjad.pitch.Interval.Interval(argument)

Abstract interval.


Attributes Summary

__abs__ Gets absolute value of interval.
__float__ Coerce to semitones as float.
__ge__ Return a >= b.
__gt__ Return a > b.
__le__ Return a <= b.
__lt__ Is true when interval is less than argument.
__neg__ Negates interval.
__str__ Gets string representation of interval.
cents Gets cents of interval.
direction_number Gets direction number of interval
interval_class Gets interval-class of interval.
number Gets number of interval.
octaves Gets octaves of interval.
semitones Gets semitones of interval.
transpose Transposes pitch_carrier by interval.

Special methods

abstract __abs__()

Gets absolute value of interval.

Returns new interval.

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

(AbjadValueObject).__eq__(argument)

Is true when all initialization values of Abjad value object equal the initialization values of argument.

Returns true or false.

__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.

__ge__(other, NotImplemented=NotImplemented)

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

__gt__(other, NotImplemented=NotImplemented)

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

(AbjadValueObject).__hash__()

Hashes Abjad value object.

Returns integer.

__le__(other, NotImplemented=NotImplemented)

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

abstract __lt__(argument)

Is true when interval is less than argument.

Returns true or false.

abstract __neg__()

Negates interval.

Returns interval.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.

__str__()

Gets string representation of interval.

Returns string.


Methods

transpose(pitch_carrier)

Transposes pitch_carrier by interval.

Returns new pitch carrier.


Read-only properties

cents

Gets cents of interval.

Returns nonnegative number.

abstract direction_number

Gets direction number of interval

Returns integer.

abstract interval_class

Gets interval-class of interval.

Returns interval-class.

abstract number

Gets number of interval.

Returns integer.

abstract octaves

Gets octaves of interval.

Returns nonnegative number.

abstract semitones

Gets semitones of interval.

Returns integer or float.