Pitch

abstract class pitchtools.Pitch

Abstract pitch.

>>> import abjad

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.NamedPitch.NamedPitch" [color=3, group=2, label=NamedPitch, shape=box]; "abjad.tools.pitchtools.NumberedPitch.NumberedPitch" [color=3, group=2, label=NumberedPitch, shape=box]; "abjad.tools.pitchtools.Pitch.Pitch" [color=black, fontcolor=white, group=2, label=<<B>Pitch</B>>, shape=oval, style="filled, rounded"]; "abjad.tools.pitchtools.Pitch.Pitch" -> "abjad.tools.pitchtools.NamedPitch.NamedPitch"; "abjad.tools.pitchtools.Pitch.Pitch" -> "abjad.tools.pitchtools.NumberedPitch.NumberedPitch"; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" -> "abjad.tools.pitchtools.Pitch.Pitch"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Bases

Attribute summary

arrow Gets arrow of pitch.
from_hertz(hertz) Creates pitch from hertz.
from_pitch_carrier(pitch_carrier) Makes new pitch from pitch_carrier.
get_name([locale]) Gets name of pitch according to locale.
hertz Gets frequency of pitch in Hertz.
invert([axis]) Inverts pitch about axis.
multiply([n]) Multiplies pitch by n.
name Gets name of pitch.
number Gets number of pitch.
octave Gets octave of pitch.
pitch_class Gets pitch-class of pitch.
transpose(n) Transposes pitch by index n.
__copy__(*arguments) Copies Abjad value object.
__eq__(argument) Is true when all initialization values of Abjad value object equal the initialization values of argument.
__float__() Coerce to float.
__format__([format_specification]) Formats pitch.
__ge__(other[, NotImplemented]) Return a >= b.
__gt__(other[, NotImplemented]) Return a > b.
__hash__() Hashes Abjad value object.
__illustrate__() Illustrates pitch.
__le__(other[, NotImplemented]) Return a <= b.
__lt__(argument) Is true when pitch is less than argument.
__ne__(argument) Is true when Abjad object does not equal argument.
__repr__() Gets interpreter representation of Abjad object.

Read-only properties

abstract Pitch.arrow

Gets arrow of pitch.

abstract Pitch.hertz

Gets frequency of pitch in Hertz.

Returns float.

abstract Pitch.name

Gets name of pitch.

Returns string.

abstract Pitch.number

Gets number of pitch.

Returns number.

abstract Pitch.octave

Gets octave of pitch.

Returns octave.

abstract Pitch.pitch_class

Gets pitch-class of pitch.

Returns pitch-class.

Methods

abstract Pitch.get_name(locale=None)

Gets name of pitch according to locale.

Returns string.

abstract Pitch.invert(axis=None)

Inverts pitch about axis.

Interprets axis of none equal to middle C.

Returns new pitch.

abstract Pitch.multiply(n=1)

Multiplies pitch by n.

Returns new pitch.

abstract Pitch.transpose(n)

Transposes pitch by index n.

Returns new pitch.

Class & static methods

abstract classmethod Pitch.from_hertz(hertz)

Creates pitch from hertz.

Returns new pitch.

abstract classmethod Pitch.from_pitch_carrier(pitch_carrier)

Makes new pitch from pitch_carrier.

Returns new pitch.

Special methods

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

Pitch.__float__()

Coerce to float.

Returns float.

Pitch.__format__(format_specification='')

Formats pitch.

Set format_specification to ‘’, ‘lilypond’ or ‘storage’.

Returns string.

Pitch.__ge__(other, NotImplemented=NotImplemented)

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

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

Pitch.__illustrate__()

Illustrates pitch.

Returns LilyPond file.

Pitch.__le__(other, NotImplemented=NotImplemented)

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

abstract Pitch.__lt__(argument)

Is true when pitch is less than argument.

Returns true or false.

(AbjadObject).__ne__(argument)

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

Returns true or false.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.