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.Retrograde.Retrograde" [URL="../api/abjad/pitch/Retrograde.html#abjad.pitch.Retrograde.Retrograde", color=black, fontcolor=white, label=Retrograde, target=_top]; } 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="", label=object, target=_top]; } "abjad.system.AbjadValueObject.AbjadValueObject" -> "abjad.pitch.Retrograde.Retrograde"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.pitch.Retrograde.Retrograde(period=None)

Retrograde operator.

>>> abjad.Retrograde()

Object model of twelve-tone retrograde operator.

Attributes Summary

__add__ Composes retrograde and operator.
__call__ Calls retrograde on argument.
__radd__ Right-addition not defined on retrograde.
__str__ Gets string representation of operator.
period Gets optional period of retrograde.

Special methods


Composes retrograde and operator.

Example segment:

>>> items = [0, 2, 4, 5]
>>> segment = abjad.PitchClassSegment(items=items)

Example operators:

>>> retrograde = abjad.Retrograde()
>>> transposition = abjad.Transposition(n=3)

Transposition followed by retrograde:

>>> operator = retrograde + transposition
>>> str(operator)
>>> segment_ = operator(segment)

Same as above because retrograde and transposition commute:

>>> operator = transposition + retrograde
>>> str(operator)
>>> segment_ = operator(segment)

Returns compound operator:

>>> abjad.f(operator)

Calls retrograde on argument.

Gets retrograde pitch classes:

>>> retrograde = abjad.Retrograde()
>>> segment = abjad.PitchClassSegment([0, 1, 4, 7])
>>> retrograde(segment)
PitchClassSegment([7, 4, 1, 0])

Does not retrograde single pitches or pitch-classes:

>>> retrogresion = abjad.Retrograde()
>>> pitch_class = abjad.NumberedPitchClass(6)
>>> retrograde(pitch_class)

Periodic retrograde:



>>> retrograde = abjad.Retrograde(period=3)
>>> segment = abjad.PitchSegment("c' d' e' f' g' a' b' c''")
>>> retrograde(segment)
PitchSegment("e' d' c' a' g' f' c'' b'")

Returns new object with type equal to that of argument.


Copies Abjad value object.

Returns new Abjad value object.


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

Returns true or false.


Formats Abjad object.

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

Returns string.


Hashes Abjad value object.

Returns integer.


Right-addition not defined on retrograde.

>>> abjad.Retrograde().__radd__(abjad.Retrograde())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/josiah/Source/", line 188, in __radd__
    raise NotImplementedError(message)
NotImplementedError: right-addition not defined on Retrograde.

Raises not implemented error.


Gets interpreter representation of Abjad object.

Returns string.


Gets string representation of operator.

>>> str(abjad.Retrograde())

Read-only properties


Gets optional period of retrograde.


Deprecated. Use Expression followed by Retrograde instead.

>>> retrograde = abjad.Retrograde(period=3)
>>> retrograde.period

Returns integer or none.