indicators

Indicators.

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.indicators" { graph [label="abjad.indicators"]; node [color=1]; "abjad.indicators.Arpeggio" [URL="../api/abjad/indicators.html#abjad.indicators.Arpeggio", color=black, fontcolor=white, label=Arpeggio, target=_top]; "abjad.indicators.Articulation" [URL="../api/abjad/indicators.html#abjad.indicators.Articulation", color=black, fontcolor=white, label=Articulation, target=_top]; "abjad.indicators.BarLine" [URL="../api/abjad/indicators.html#abjad.indicators.BarLine", color=black, fontcolor=white, label="Bar\nLine", target=_top]; "abjad.indicators.BeamCount" [URL="../api/abjad/indicators.html#abjad.indicators.BeamCount", color=black, fontcolor=white, label="Beam\nCount", target=_top]; "abjad.indicators.BendAfter" [URL="../api/abjad/indicators.html#abjad.indicators.BendAfter", color=black, fontcolor=white, label="Bend\nAfter", target=_top]; "abjad.indicators.BreathMark" [URL="../api/abjad/indicators.html#abjad.indicators.BreathMark", color=black, fontcolor=white, label="Breath\nMark", target=_top]; "abjad.indicators.Clef" [URL="../api/abjad/indicators.html#abjad.indicators.Clef", color=black, fontcolor=white, label=Clef, target=_top]; "abjad.indicators.ColorFingering" [URL="../api/abjad/indicators.html#abjad.indicators.ColorFingering", color=black, fontcolor=white, label="Color\nFingering", target=_top]; "abjad.indicators.Fermata" [URL="../api/abjad/indicators.html#abjad.indicators.Fermata", color=black, fontcolor=white, label=Fermata, target=_top]; "abjad.indicators.Glissando" [URL="../api/abjad/indicators.html#abjad.indicators.Glissando", color=black, fontcolor=white, label=Glissando, target=_top]; "abjad.indicators.InstrumentName" [URL="../api/abjad/indicators.html#abjad.indicators.InstrumentName", color=black, fontcolor=white, label="Instrument\nName", target=_top]; "abjad.indicators.KeyCluster" [URL="../api/abjad/indicators.html#abjad.indicators.KeyCluster", color=black, fontcolor=white, label="Key\nCluster", target=_top]; "abjad.indicators.KeySignature" [URL="../api/abjad/indicators.html#abjad.indicators.KeySignature", color=black, fontcolor=white, label="Key\nSignature", target=_top]; "abjad.indicators.LaissezVibrer" [URL="../api/abjad/indicators.html#abjad.indicators.LaissezVibrer", color=black, fontcolor=white, label="Laissez\nVibrer", target=_top]; "abjad.indicators.LilyPondLiteral" [URL="../api/abjad/indicators.html#abjad.indicators.LilyPondLiteral", color=black, fontcolor=white, label="Lily\nPond\nLiteral", target=_top]; "abjad.indicators.Markup" [URL="../api/abjad/indicators.html#abjad.indicators.Markup", color=black, fontcolor=white, label=Markup, target=_top]; "abjad.indicators.MetronomeMark" [URL="../api/abjad/indicators.html#abjad.indicators.MetronomeMark", color=black, fontcolor=white, label="Metronome\nMark", target=_top]; "abjad.indicators.Mode" [URL="../api/abjad/indicators.html#abjad.indicators.Mode", color=black, fontcolor=white, label=Mode, target=_top]; "abjad.indicators.Ottava" [URL="../api/abjad/indicators.html#abjad.indicators.Ottava", color=black, fontcolor=white, label=Ottava, target=_top]; "abjad.indicators.RehearsalMark" [URL="../api/abjad/indicators.html#abjad.indicators.RehearsalMark", color=black, fontcolor=white, label="Rehearsal\nMark", target=_top]; "abjad.indicators.Repeat" [URL="../api/abjad/indicators.html#abjad.indicators.Repeat", color=black, fontcolor=white, label=Repeat, target=_top]; "abjad.indicators.RepeatTie" [URL="../api/abjad/indicators.html#abjad.indicators.RepeatTie", color=black, fontcolor=white, label="Repeat\nTie", target=_top]; "abjad.indicators.ShortInstrumentName" [URL="../api/abjad/indicators.html#abjad.indicators.ShortInstrumentName", color=black, fontcolor=white, label="Short\nInstrument\nName", target=_top]; "abjad.indicators.StaffChange" [URL="../api/abjad/indicators.html#abjad.indicators.StaffChange", color=black, fontcolor=white, label="Staff\nChange", target=_top]; "abjad.indicators.StartBeam" [URL="../api/abjad/indicators.html#abjad.indicators.StartBeam", color=black, fontcolor=white, label="Start\nBeam", target=_top]; "abjad.indicators.StartGroup" [URL="../api/abjad/indicators.html#abjad.indicators.StartGroup", color=black, fontcolor=white, label="Start\nGroup", target=_top]; "abjad.indicators.StartHairpin" [URL="../api/abjad/indicators.html#abjad.indicators.StartHairpin", color=black, fontcolor=white, label="Start\nHairpin", target=_top]; "abjad.indicators.StartPhrasingSlur" [URL="../api/abjad/indicators.html#abjad.indicators.StartPhrasingSlur", color=black, fontcolor=white, label="Start\nPhrasing\nSlur", target=_top]; "abjad.indicators.StartPianoPedal" [URL="../api/abjad/indicators.html#abjad.indicators.StartPianoPedal", color=black, fontcolor=white, label="Start\nPiano\nPedal", target=_top]; "abjad.indicators.StartSlur" [URL="../api/abjad/indicators.html#abjad.indicators.StartSlur", color=black, fontcolor=white, label="Start\nSlur", target=_top]; "abjad.indicators.StartTextSpan" [URL="../api/abjad/indicators.html#abjad.indicators.StartTextSpan", color=black, fontcolor=white, label="Start\nText\nSpan", target=_top]; "abjad.indicators.StartTrillSpan" [URL="../api/abjad/indicators.html#abjad.indicators.StartTrillSpan", color=black, fontcolor=white, label="Start\nTrill\nSpan", target=_top]; "abjad.indicators.StemTremolo" [URL="../api/abjad/indicators.html#abjad.indicators.StemTremolo", color=black, fontcolor=white, label="Stem\nTremolo", target=_top]; "abjad.indicators.StopBeam" [URL="../api/abjad/indicators.html#abjad.indicators.StopBeam", color=black, fontcolor=white, label="Stop\nBeam", target=_top]; "abjad.indicators.StopGroup" [URL="../api/abjad/indicators.html#abjad.indicators.StopGroup", color=black, fontcolor=white, label="Stop\nGroup", target=_top]; "abjad.indicators.StopHairpin" [URL="../api/abjad/indicators.html#abjad.indicators.StopHairpin", color=black, fontcolor=white, label="Stop\nHairpin", target=_top]; "abjad.indicators.StopPhrasingSlur" [URL="../api/abjad/indicators.html#abjad.indicators.StopPhrasingSlur", color=black, fontcolor=white, label="Stop\nPhrasing\nSlur", target=_top]; "abjad.indicators.StopPianoPedal" [URL="../api/abjad/indicators.html#abjad.indicators.StopPianoPedal", color=black, fontcolor=white, label="Stop\nPiano\nPedal", target=_top]; "abjad.indicators.StopSlur" [URL="../api/abjad/indicators.html#abjad.indicators.StopSlur", color=black, fontcolor=white, label="Stop\nSlur", target=_top]; "abjad.indicators.StopTextSpan" [URL="../api/abjad/indicators.html#abjad.indicators.StopTextSpan", color=black, fontcolor=white, label="Stop\nText\nSpan", target=_top]; "abjad.indicators.StopTrillSpan" [URL="../api/abjad/indicators.html#abjad.indicators.StopTrillSpan", color=black, fontcolor=white, label="Stop\nTrill\nSpan", target=_top]; "abjad.indicators.Tie" [URL="../api/abjad/indicators.html#abjad.indicators.Tie", color=black, fontcolor=white, label=Tie, target=_top]; "abjad.indicators.TimeSignature" [URL="../api/abjad/indicators.html#abjad.indicators.TimeSignature", color=black, fontcolor=white, label="Time\nSignature", target=_top]; "abjad.indicators.VoiceNumber" [URL="../api/abjad/indicators.html#abjad.indicators.VoiceNumber", color=black, fontcolor=white, label="Voice\nNumber", target=_top]; } subgraph cluster_builtins { graph [label=builtins]; node [color=2]; "builtins.object" [URL="https://docs.python.org/3.10/library/functions.html#object", label=object, target=_top]; } "builtins.object" -> "abjad.indicators.Arpeggio" [minlen=1]; "builtins.object" -> "abjad.indicators.Articulation" [minlen=2]; "builtins.object" -> "abjad.indicators.BarLine" [minlen=3]; "builtins.object" -> "abjad.indicators.BeamCount" [minlen=4]; "builtins.object" -> "abjad.indicators.BendAfter" [minlen=5]; "builtins.object" -> "abjad.indicators.BreathMark" [minlen=6]; "builtins.object" -> "abjad.indicators.Clef" [minlen=7]; "builtins.object" -> "abjad.indicators.ColorFingering" [minlen=1]; "builtins.object" -> "abjad.indicators.Fermata" [minlen=2]; "builtins.object" -> "abjad.indicators.Glissando" [minlen=3]; "builtins.object" -> "abjad.indicators.InstrumentName" [minlen=4]; "builtins.object" -> "abjad.indicators.KeyCluster" [minlen=5]; "builtins.object" -> "abjad.indicators.KeySignature" [minlen=6]; "builtins.object" -> "abjad.indicators.LaissezVibrer" [minlen=7]; "builtins.object" -> "abjad.indicators.LilyPondLiteral" [minlen=1]; "builtins.object" -> "abjad.indicators.Markup" [minlen=2]; "builtins.object" -> "abjad.indicators.MetronomeMark" [minlen=3]; "builtins.object" -> "abjad.indicators.Mode" [minlen=4]; "builtins.object" -> "abjad.indicators.Ottava" [minlen=5]; "builtins.object" -> "abjad.indicators.RehearsalMark" [minlen=6]; "builtins.object" -> "abjad.indicators.Repeat" [minlen=7]; "builtins.object" -> "abjad.indicators.RepeatTie" [minlen=1]; "builtins.object" -> "abjad.indicators.ShortInstrumentName" [minlen=2]; "builtins.object" -> "abjad.indicators.StaffChange" [minlen=3]; "builtins.object" -> "abjad.indicators.StartBeam" [minlen=4]; "builtins.object" -> "abjad.indicators.StartGroup" [minlen=5]; "builtins.object" -> "abjad.indicators.StartHairpin" [minlen=6]; "builtins.object" -> "abjad.indicators.StartPhrasingSlur" [minlen=7]; "builtins.object" -> "abjad.indicators.StartPianoPedal" [minlen=1]; "builtins.object" -> "abjad.indicators.StartSlur" [minlen=2]; "builtins.object" -> "abjad.indicators.StartTextSpan" [minlen=3]; "builtins.object" -> "abjad.indicators.StartTrillSpan" [minlen=4]; "builtins.object" -> "abjad.indicators.StemTremolo" [minlen=5]; "builtins.object" -> "abjad.indicators.StopBeam" [minlen=6]; "builtins.object" -> "abjad.indicators.StopGroup" [minlen=7]; "builtins.object" -> "abjad.indicators.StopHairpin" [minlen=1]; "builtins.object" -> "abjad.indicators.StopPhrasingSlur" [minlen=2]; "builtins.object" -> "abjad.indicators.StopPianoPedal" [minlen=3]; "builtins.object" -> "abjad.indicators.StopSlur" [minlen=4]; "builtins.object" -> "abjad.indicators.StopTextSpan" [minlen=5]; "builtins.object" -> "abjad.indicators.StopTrillSpan" [minlen=6]; "builtins.object" -> "abjad.indicators.Tie" [minlen=7]; "builtins.object" -> "abjad.indicators.TimeSignature" [minlen=1]; "builtins.object" -> "abjad.indicators.VoiceNumber" [minlen=2]; }


Classes

Arpeggio

Arpeggio.

Articulation

Articulation.

BarLine

Bar line.

BeamCount

LilyPond \setLeftBeamCount, \setRightBeamCount command.

BendAfter

Fall or doit.

BreathMark

Breath mark.

Clef

Clef.

ColorFingering

Color fingering.

Fermata

Fermata.

Glissando

LilyPond \glissando command.

InstrumentName

LilyPond \instrumentName setting.

KeyCluster

Key cluster.

KeySignature

Key signature.

LaissezVibrer

Laissez vibrer.

LilyPondLiteral

LilyPond literal.

Markup

LilyPond markup.

MetronomeMark

MetronomeMark.

Mode

Mode.

Ottava

LilyPond \ottava command.

RehearsalMark

Rehearsal mark.

Repeat

Repeat.

RepeatTie

LilyPond \repeatTie command.

ShortInstrumentName

LilyPond \shortInstrumentName command.

StaffChange

Staff change.

StartBeam

LilyPond [ command.

StartGroup

LilyPond \startGroup command.

StartHairpin

Hairpin indicator.

StartPhrasingSlur

LilyPond ( command.

StartPianoPedal

LilyPond \sustainOn, \sostenutoOn, \unaCorda commands.

StartSlur

LilyPond ( command.

StartTextSpan

LilyPond \startTextSpan command.

StartTrillSpan

LilyPond \startTrillSpan command.

StemTremolo

Stem tremolo.

StopBeam

LilyPond ] command.

StopGroup

LilyPond \stopGroup command.

StopHairpin

LilyPond \! command.

StopPhrasingSlur

LilyPond \) command.

StopPianoPedal

LilyPond \sostenutoOff, \sustainOff, \treCorde commands.

StopSlur

LilyPond ) command.

StopTextSpan

LilyPond \stopTextSpan command.

StopTrillSpan

LilyPond \stopTrillSpan command.

Tie

LilyPond ~ command.

TimeSignature

Time signature.

VoiceNumber

LilyPond \voiceOne, \voiceTwo, \voiceThree, \voiceFour, \oneVoice commands.

class abjad.indicators.Arpeggio(direction=None)[source]

Arpeggio.

Without direction arrow:

>>> chord = abjad.Chord("<c' e' g' c''>4")
>>> arpeggio = abjad.Arpeggio()
>>> abjad.attach(arpeggio, chord)
>>> staff = abjad.Staff([chord])
>>> abjad.show(staff)  

With direction arrow:

>>> chord = abjad.Chord("<c' e' g' c''>4")
>>> arpeggio = abjad.Arpeggio(direction=abjad.DOWN)
>>> abjad.attach(arpeggio, chord)
>>> staff = abjad.Staff([chord])
>>> abjad.show(staff)  

Tweaks:

>>> chord = abjad.Chord("<c' e' g' c''>4")
>>> arpeggio = abjad.Arpeggio()
>>> bundle = abjad.bundle(arpeggio, r"- \tweak color #blue")
>>> abjad.attach(bundle, chord)
>>> staff = abjad.Staff([chord])
>>> abjad.show(staff)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

post_event


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.Articulation(name)[source]

Articulation.

>>> abjad.Articulation("staccato")
Articulation(name='staccato')
>>> abjad.Articulation(".")
Articulation(name='.')

Use direction=abjad.UP like this:

>>> note = abjad.Note("c'4")
>>> articulation = abjad.Articulation("staccato")
>>> abjad.attach(articulation, note, direction=abjad.UP)
>>> abjad.show(note)  

Use direction=abjad.DOWN like this:

>>> note = abjad.Note("c'4")
>>> articulation = abjad.Articulation("staccato")
>>> abjad.attach(articulation, note, direction=abjad.DOWN)
>>> abjad.show(note)  

Use dataclasses.replace() like this:

>>> import dataclasses
>>> articulation = abjad.Articulation(".")
>>> dataclasses.replace(articulation)
Articulation(name='.')

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

post_event

shortcut_to_word


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.BarLine(abbreviation='|', site='after')[source]

Bar line.

Final bar line:

>>> staff = abjad.Staff("c'4 d'4 e'4 f'4", name="Staff")
>>> score = abjad.Score([staff], name="Score")
>>> bar_line = abjad.BarLine("|.")
>>> abjad.attach(bar_line, staff[-1])
>>> abjad.show(staff)  

Specify repeat bars like this:

>>> staff = abjad.Staff("c'4 d' e' f' g' a' b' c''", name="Staff")
>>> score = abjad.Score([staff], name="Score")
>>> abjad.attach(abjad.BarLine(".|:"), staff[3])
>>> abjad.attach(abjad.BarLine(":|."), staff[-1])
>>> abjad.show(staff)  

This allows you to bypass LilyPond’s \volta command.


Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

LilyPond fails to error on unknown bar-line abbreviation, so we check here.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

known_abbreviations


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]

LilyPond fails to error on unknown bar-line abbreviation, so we check here.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.BeamCount(left=0, right=0)[source]

LilyPond \setLeftBeamCount, \setRightBeamCount command.

>>> abjad.BeamCount()
BeamCount(left=0, right=0)

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.BendAfter(bend_amount=-4)[source]

Fall or doit.

A fall:

>>> note = abjad.Note("c'4")
>>> bend = abjad.BendAfter(-4)
>>> abjad.attach(bend, note)
>>> abjad.show(note)  

A doit:

>>> note = abjad.Note("c'4")
>>> bend = abjad.BendAfter(2)
>>> abjad.attach(bend, note)
>>> abjad.show(note)  

Tweaks:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> bend_after = abjad.BendAfter(-4)
>>> bundle = abjad.bundle(bend_after, r"- \tweak color #blue")
>>> abjad.attach(bundle, staff[0])
>>> abjad.show(staff)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

post_event

site

time_orientation


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.BreathMark[source]

Breath mark.

>>> voice = abjad.Voice("c'8 d' e' f' g' a' b' c''")
>>> staff = abjad.Staff([voice])
>>> abjad.beam(voice[:4])
>>> abjad.beam(voice[4:])
>>> abjad.attach(abjad.BreathMark(), voice[3])
>>> abjad.attach(abjad.BreathMark(), voice[7])
>>> abjad.show(staff)  

REGRESSION. Abjad parses LilyPond’s \breathe command correctly:

>>> staff = abjad.Staff(r"c'4 d' e' f' \breathe")
>>> abjad.show(staff)  

Tweaks:

>>> note = abjad.Note("c'4")
>>> breath = abjad.BreathMark()
>>> bundle = abjad.bundle(breath, r"\tweak color #blue")
>>> abjad.attach(bundle, note)
>>> staff = abjad.Staff([note])
>>> abjad.show(staff)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

site

time_orientation


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.Clef(name='treble', hide=False)[source]

Clef.

Some available clefs:

>>> staff = abjad.Staff("c'8 d'8 e'8 f'8 g'8 a'8 b'8 c''8")
>>> clef = abjad.Clef("treble")
>>> abjad.attach(clef, staff[0])
>>> clef = abjad.Clef("alto")
>>> abjad.attach(clef, staff[1])
>>> clef = abjad.Clef("bass")
>>> abjad.attach(clef, staff[2])
>>> clef = abjad.Clef("treble^8")
>>> abjad.attach(clef, staff[3])
>>> clef = abjad.Clef("bass_8")
>>> abjad.attach(clef, staff[4])
>>> clef = abjad.Clef("tenor")
>>> abjad.attach(clef, staff[5])
>>> clef = abjad.Clef("bass^15")
>>> abjad.attach(clef, staff[6])
>>> clef = abjad.Clef("percussion")
>>> abjad.attach(clef, staff[7])
>>> abjad.show(staff)  

Clefs can be tagged:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> abjad.attach(abjad.Clef("treble"), staff[0], tag=abjad.Tag("+PARTS"))
>>> abjad.show(staff)  
>>> string = abjad.lilypond(staff, tags=True)
>>> print(string)
\new Staff
{
      %! +PARTS
    \clef "treble"
    c'4
    d'4
    e'4
    f'4
}

LilyPond can not handle simultaneous clefs:

>>> voice_1 = abjad.Voice("e'8 g' f' a' g' b'")
>>> voice_2 = abjad.Voice("c'4. c,8 b,, a,,")
>>> staff = abjad.Staff([voice_1, voice_2], simultaneous=True)
>>> abjad.attach(abjad.Clef("treble"), voice_1[0], context="Voice")
>>> command = abjad.VoiceNumber(1)
>>> abjad.attach(command, voice_1[0])
>>> voice_1.consists_commands.append("Clef_engraver")
>>> abjad.attach(abjad.Clef("treble"), voice_2[0], context="Voice")
>>> abjad.attach(abjad.Clef("bass"), voice_2[1], context="Voice")
>>> command = abjad.VoiceNumber(2)
>>> abjad.attach(command, voice_2[0])
>>> voice_2.consists_commands.append("Clef_engraver")
>>> staff.remove_commands.append("Clef_engraver")
>>> abjad.show(staff)  

But Abjad components work fine:

>>> for leaf in abjad.select.leaves(voice_1):
...     leaf, abjad.get.effective(leaf, abjad.Clef)
... 
(Note("e'8"), Clef(name='treble', hide=False))
(Note("g'8"), Clef(name='treble', hide=False))
(Note("f'8"), Clef(name='treble', hide=False))
(Note("a'8"), Clef(name='treble', hide=False))
(Note("g'8"), Clef(name='treble', hide=False))
(Note("b'8"), Clef(name='treble', hide=False))
>>> for leaf in abjad.select.leaves(voice_2):
...     leaf, abjad.get.effective(leaf, abjad.Clef)
... 
(Note("c'4."), Clef(name='treble', hide=False))
(Note('c,8'), Clef(name='bass', hide=False))
(Note('b,,8'), Clef(name='bass', hide=False))
(Note('a,,8'), Clef(name='bass', hide=False))

Middle-C position:

>>> abjad.Clef("treble").middle_c_position()
StaffPosition(number=-6)
>>> abjad.Clef("alto").middle_c_position()
StaffPosition(number=0)

Set hide=True when clef should not appear in output (but should still determine effective clef).

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> abjad.attach(abjad.Clef("treble"), staff[0])
>>> abjad.attach(abjad.Clef("alto", hide=True), staff[2])
>>> abjad.show(staff)  
>>> string = abjad.lilypond(staff)
>>> print(string)
\new Staff
{
    \clef "treble"
    c'4
    d'4
    e'4
    f'4
}
>>> for leaf in abjad.iterate.leaves(staff):
...     leaf, abjad.get.effective(leaf, abjad.Clef)
... 
(Note("c'4"), Clef(name='treble', hide=False))
(Note("d'4"), Clef(name='treble', hide=False))
(Note("e'4"), Clef(name='alto', hide=True))
(Note("f'4"), Clef(name='alto', hide=True))

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

clef_name_to_middle_c_position

context

from_pitches

Makes clef from pitches.

middle_c_position

Gets middle C position.

persistent

redraw

site

to_pitch

Changes staff_position to pitch.

to_staff_position

Changes pitch to staff position.


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).


Methods

middle_c_position()[source]

Gets middle C position.

to_pitch(staff_position)[source]

Changes staff_position to pitch.

Treble clef:

>>> clef = abjad.Clef("treble")
>>> for n in range(-6, 6):
...     staff_position = abjad.StaffPosition(n)
...     pitch = clef.to_pitch(staff_position)
...     print(f"{staff_position!r:25}{pitch!r}")
... 
StaffPosition(number=-6) NamedPitch("c'")
StaffPosition(number=-5) NamedPitch("d'")
StaffPosition(number=-4) NamedPitch("e'")
StaffPosition(number=-3) NamedPitch("f'")
StaffPosition(number=-2) NamedPitch("g'")
StaffPosition(number=-1) NamedPitch("a'")
StaffPosition(number=0)  NamedPitch("b'")
StaffPosition(number=1)  NamedPitch("c''")
StaffPosition(number=2)  NamedPitch("d''")
StaffPosition(number=3)  NamedPitch("e''")
StaffPosition(number=4)  NamedPitch("f''")
StaffPosition(number=5)  NamedPitch("g''")

Bass clef:

>>> clef = abjad.Clef("bass")
>>> for n in range(-6, 6):
...     staff_position = abjad.StaffPosition(n)
...     pitch = clef.to_pitch(staff_position)
...     print(f"{staff_position!r:25}{pitch!r}")
... 
StaffPosition(number=-6) NamedPitch('e,')
StaffPosition(number=-5) NamedPitch('f,')
StaffPosition(number=-4) NamedPitch('g,')
StaffPosition(number=-3) NamedPitch('a,')
StaffPosition(number=-2) NamedPitch('b,')
StaffPosition(number=-1) NamedPitch('c')
StaffPosition(number=0)  NamedPitch('d')
StaffPosition(number=1)  NamedPitch('e')
StaffPosition(number=2)  NamedPitch('f')
StaffPosition(number=3)  NamedPitch('g')
StaffPosition(number=4)  NamedPitch('a')
StaffPosition(number=5)  NamedPitch('b')

Alto clef:

>>> clef = abjad.Clef("alto")
>>> for n in range(-6, 6):
...     staff_position = abjad.StaffPosition(n)
...     pitch = clef.to_pitch(staff_position)
...     print(f"{staff_position!r:25}{pitch!r}")
... 
StaffPosition(number=-6) NamedPitch('d')
StaffPosition(number=-5) NamedPitch('e')
StaffPosition(number=-4) NamedPitch('f')
StaffPosition(number=-3) NamedPitch('g')
StaffPosition(number=-2) NamedPitch('a')
StaffPosition(number=-1) NamedPitch('b')
StaffPosition(number=0)  NamedPitch("c'")
StaffPosition(number=1)  NamedPitch("d'")
StaffPosition(number=2)  NamedPitch("e'")
StaffPosition(number=3)  NamedPitch("f'")
StaffPosition(number=4)  NamedPitch("g'")
StaffPosition(number=5)  NamedPitch("a'")

Percussion clef:

>>> clef = abjad.Clef("percussion")
>>> for n in range(-6, 6):
...     staff_position = abjad.StaffPosition(n)
...     pitch = clef.to_pitch(staff_position)
...     print(f"{staff_position!r:25}{pitch!r}")
... 
StaffPosition(number=-6) NamedPitch('d')
StaffPosition(number=-5) NamedPitch('e')
StaffPosition(number=-4) NamedPitch('f')
StaffPosition(number=-3) NamedPitch('g')
StaffPosition(number=-2) NamedPitch('a')
StaffPosition(number=-1) NamedPitch('b')
StaffPosition(number=0)  NamedPitch("c'")
StaffPosition(number=1)  NamedPitch("d'")
StaffPosition(number=2)  NamedPitch("e'")
StaffPosition(number=3)  NamedPitch("f'")
StaffPosition(number=4)  NamedPitch("g'")
StaffPosition(number=5)  NamedPitch("a'")
Return type:

NamedPitch

to_staff_position(pitch)[source]

Changes pitch to staff position.

Changes C#5 to absolute staff position:

>>> pitch = abjad.NamedPitch("C#5")
>>> abjad.Clef("alto").to_staff_position(pitch)
StaffPosition(number=7)
>>> abjad.Clef("treble").to_staff_position(pitch)
StaffPosition(number=1)
>>> abjad.Clef("bass").to_staff_position(pitch)
StaffPosition(number=13)

Labels absolute staff position:

>>> string = "g16 a b c' d' e' f' g' a' b' c'' d'' e'' f'' g'' a''"
>>> staff = abjad.Staff(string)
>>> clef = abjad.Clef("alto")
>>> for note in staff:
...     staff_position = clef.to_staff_position(note.written_pitch)
...     markup = abjad.Markup(rf"\markup {staff_position.number}")
...     abjad.attach(markup, note)
... 
>>> abjad.override(staff).TextScript.staff_padding = 5
>>> abjad.show(staff)  

Labels staff position in bass clef:

>>> string = "g,16 a, b, c d e f g a b c' d' e' f' g' a'"
>>> staff = abjad.Staff(string)
>>> clef = abjad.Clef("bass")
>>> for note in staff:
...     staff_position = clef.to_staff_position(note.written_pitch)
...     markup = abjad.Markup(rf"\markup {staff_position.number}")
...     abjad.attach(markup, note)
... 
>>> abjad.attach(abjad.Clef("bass"), staff[0])
>>> abjad.override(staff).TextScript.staff_padding = 5
>>> abjad.show(staff)  
Return type:

StaffPosition


Class & static methods

classmethod from_pitches(pitches)[source]

Makes clef from pitches.

>>> notes = abjad.makers.make_notes(list(range(-12, -6)), [(1, 4)])
>>> staff = abjad.Staff(notes)
>>> pitches = abjad.iterate.pitches(staff)
>>> abjad.Clef.from_pitches(pitches)
Clef(name='bass', hide=False)

Chooses between treble and bass based on minimal number of ledger lines.

Return type:

Clef

class abjad.indicators.ColorFingering(number)[source]

Color fingering.

>>> fingering = abjad.ColorFingering(1)
>>> note = abjad.Note("c'4")
>>> abjad.attach(fingering, note, direction=abjad.UP)
>>> abjad.show(note)  

Tweaks:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> fingering = abjad.ColorFingering(1)
>>> bundle = abjad.bundle(fingering, r"- \tweak color #blue")
>>> abjad.attach(bundle, staff[0], direction=abjad.UP)
>>> abjad.show(staff)  

Color fingerings indicate alternate woodwind fingerings by amount of pitch of timbre deviation.


Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

directed

markup

Gets markup of color fingering.

post_event

site


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).


Read-only properties

markup

Gets markup of color fingering.

First color fingering:

>>> fingering = abjad.ColorFingering(1)
>>> string = abjad.lilypond(fingering.markup)
>>> print(string)
\markup { \override #'(circle-padding . 0.25) \circle \finger 1 }
class abjad.indicators.Fermata(command='fermata')[source]

Fermata.

A short fermata:

>>> score = abjad.Score([abjad.Staff([abjad.Note("c'4")])])
>>> fermata = abjad.Fermata(command="shortfermata")
>>> abjad.attach(fermata, score[0][0])
>>> abjad.show(score)  

A fermata:

>>> score = abjad.Score([abjad.Staff([abjad.Note("c'4")])])
>>> fermata = abjad.Fermata()
>>> abjad.attach(fermata, score[0][0])
>>> abjad.show(score)  

A long fermata:

>>> score = abjad.Score([abjad.Staff([abjad.Note("c'4")])])
>>> fermata = abjad.Fermata("longfermata")
>>> abjad.attach(fermata, score[0][0])
>>> abjad.show(score)  

A very long fermata:

>>> score = abjad.Score([abjad.Staff([abjad.Note("c'4")])])
>>> fermata = abjad.Fermata("verylongfermata")
>>> abjad.attach(fermata, score[0][0])
>>> abjad.show(score)  

Tweaks:

>>> note = abjad.Note("c'4")
>>> staff = abjad.Staff([note], name="Staff")
>>> score = abjad.Score([staff], name="Score")
>>> fermata = abjad.Fermata()
>>> bundle = abjad.bundle(fermata, r"- \tweak color #blue")
>>> abjad.attach(bundle, note)
>>> abjad.show(score)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

allowable_commands

context

post_event

site


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.Glissando(zero_padding=False)[source]

LilyPond \glissando command.

>>> voice = abjad.Voice("c'4 d' e' f'", name="Voice")
>>> glissando = abjad.Glissando()
>>> bundle = abjad.bundle(glissando, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> abjad.show(voice)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

persistent

post_event


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.InstrumentName(markup, *, context='Staff')[source]

LilyPond \instrumentName setting.

Set instrument name to markup like this:

>>> staff = abjad.Staff("c'4 d'4 e'4 f'4")
>>> markup = abjad.Markup(r"\markup Cellos")
>>> instrument_name = abjad.InstrumentName(markup)
>>> abjad.attach(instrument_name, staff[0])
>>> abjad.show(staff)  

Set instrument name to custom-defined function like this:

>>> staff = abjad.Staff("c'4 d'4 e'4 f'4")
>>> instrument_name = abjad.InstrumentName(r"\my_instrument_name")
>>> abjad.attach(instrument_name, staff[0])
>>> string = abjad.lilypond(staff)
>>> print(string)
\new Staff
{
    \set Staff.instrumentName = \my_instrument_name
    c'4
    d'4
    e'4
    f'4
}

Equality testing:

>>> name_1 = abjad.InstrumentName(r"\markup Harp", context="PianoStaff")
>>> name_2 = abjad.InstrumentName(r"\markup Harp", context="PianoStaff")
>>> name_3 = abjad.InstrumentName(r"\markup Harp", context="Staff")
>>> name_1 == name_1
True
>>> name_1 == name_2
True
>>> name_1 == name_3
False
>>> name_2 == name_1
True
>>> name_2 == name_2
True
>>> name_2 == name_3
False
>>> name_3 == name_1
False
>>> name_3 == name_2
False
>>> name_3 == name_3
True

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

site


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.KeyCluster(include_flat_markup=True, include_natural_markup=True)[source]

Key cluster.

Includes flat markup:

>>> chord = abjad.Chord("<c' e' g' b' d'' f''>8")
>>> key_cluster = abjad.KeyCluster(include_flat_markup=True)
>>> abjad.attach(key_cluster, chord, direction=abjad.UP)
>>> staff = abjad.Staff([chord])
>>> abjad.show(staff)  

Includes natural markup:

>>> chord = abjad.Chord("<c' e' g' b' d'' f''>8")
>>> key_cluster = abjad.KeyCluster(include_natural_markup=True)
>>> abjad.attach(key_cluster, chord, direction=abjad.UP)
>>> staff = abjad.Staff([chord])
>>> abjad.show(staff)  

Key cluster output includes overrides instead of tweaks:

>>> chord = abjad.Chord("<c' e' g' b' d'' f''>8")
>>> key_cluster = abjad.KeyCluster()
>>> abjad.attach(key_cluster, chord, direction=abjad.UP)
>>> string = abjad.lilypond(chord)
>>> print(string)
\once \override Accidental.stencil = ##f
\once \override AccidentalCautionary.stencil = ##f
\once \override Arpeggio.X-offset = #-2
\once \override NoteHead.stencil = #ly:text-interface::print
\once \override NoteHead.text =
\markup \filled-box #'(-0.6 . 0.6) #'(-0.7 . 0.7) #0.25
<c' e' g' b' d'' f''>8
^ \markup \center-align \concat { \natural \flat }

The reason for this is that chords contain multiple note-heads: if key cluster formatted tweaks instead of overrides, the five format commands shown above would need to be duplicated immediately before each note-head.


Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

directed


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.KeySignature(tonic=NamedPitchClass('c'), mode=Mode(name='major'))[source]

Key signature.

>>> staff = abjad.Staff("e'8 fs'8 gs'8 a'8")
>>> key_signature = abjad.KeySignature(
...     abjad.NamedPitchClass("e"), abjad.Mode("major")
... )
>>> abjad.attach(key_signature, staff[0])
>>> abjad.show(staff)  
>>> staff = abjad.Staff("e'8 fs'8 g'8 a'8")
>>> key_signature = abjad.KeySignature(
...     abjad.NamedPitchClass("e"), abjad.Mode("minor")
... )
>>> abjad.attach(key_signature, staff[0])
>>> abjad.show(staff)  

Tweaks:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> key_signature = abjad.KeySignature(
...     abjad.NamedPitchClass("e"), abjad.Mode("minor")
... )
>>> bundle = abjad.bundle(key_signature, r"\tweak color #blue")
>>> abjad.attach(bundle, staff[0])
>>> abjad.show(staff)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

name

Gets name of key signature.

persistent

redraw


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).


Read-only properties

name

Gets name of key signature.

>>> abjad.KeySignature(abjad.NamedPitchClass("e"), abjad.Mode("major")).name
'E major'
>>> abjad.KeySignature(abjad.NamedPitchClass("e"), abjad.Mode("minor")).name
'e minor'
class abjad.indicators.LaissezVibrer[source]

Laissez vibrer.

>>> chord = abjad.Chord("<c' e' g' c''>4")
>>> laissez_vibrer = abjad.LaissezVibrer()
>>> abjad.attach(laissez_vibrer, chord)
>>> abjad.show(chord)  

Tweaks:

>>> note = abjad.Note("c'4")
>>> lv = abjad.LaissezVibrer()
>>> bundle = abjad.bundle(lv, r"- \tweak color #blue")
>>> abjad.attach(bundle, note)
>>> abjad.show(note)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

post_event

site

time_orientation


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.LilyPondLiteral(argument='', *, site='before', directed=False)[source]

LilyPond literal.

Dotted slur:

>>> voice = abjad.Voice("c'8 d'8 e'8 f'8")
>>> abjad.slur(voice[:])
>>> literal = abjad.LilyPondLiteral(r"\slurDotted", site="before")
>>> abjad.attach(literal, voice[0])
>>> abjad.show(voice)  

Use the absolute before and absolute after format sites like this:

>>> voice = abjad.Voice("c'8 d'8 e'8 f'8")
>>> abjad.slur(voice[:])
>>> literal = abjad.LilyPondLiteral(r"\slurDotted", site="before")
>>> abjad.attach(literal, voice[0])
>>> literal = abjad.LilyPondLiteral("", site="absolute_before")
>>> abjad.attach(literal, voice[0])
>>> literal = abjad.LilyPondLiteral(
...     "% before all formatting",
...     site="absolute_before",
... )
>>> abjad.attach(literal, voice[0])
>>> literal = abjad.LilyPondLiteral("", site="absolute_after")
>>> abjad.attach(literal, voice[-1])
>>> abjad.show(voice)  

LilyPond literals can be tagged:

>>> voice = abjad.Voice("c'8 d'8 e'8 f'8")
>>> abjad.slur(voice[:])
>>> literal = abjad.LilyPondLiteral(r"\slurDotted", site="before")
>>> abjad.attach(literal, voice[0], tag=abjad.Tag("+PARTS"))
>>> abjad.show(voice)  
>>> string = abjad.lilypond(voice, tags=True)
>>> print(string)
\new Voice
{
      %! +PARTS
    \slurDotted
    c'8
    (
    d'8
    e'8
    f'8
    )
}

Multiline input is allowed:

>>> voice = abjad.Voice("c'8 d'8 e'8 f'8")
>>> abjad.slur(voice[:])
>>> lines = [
...     r"\stopStaff",
...     r"\startStaff",
...     r"\once \override Staff.StaffSymbol.color = #red",
... ]
>>> literal = abjad.LilyPondLiteral(lines, site="before")
>>> abjad.attach(literal, voice[2], tag=abjad.Tag("+PARTS"))
>>> abjad.show(voice)  
>>> string = abjad.lilypond(voice, tags=True)
>>> print(string)
\new Voice
{
    c'8
    (
    d'8
      %! +PARTS
    \stopStaff
      %! +PARTS
    \startStaff
      %! +PARTS
    \once \override Staff.StaffSymbol.color = #red
    e'8
    f'8
    )
}

REGRESSION. Duplicate literals are allowed:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> literal = abjad.LilyPondLiteral("% text", site="before")
>>> abjad.attach(literal, staff[0])
>>> literal = abjad.LilyPondLiteral("% text", site="before")
>>> abjad.attach(literal, staff[0])
>>> string = abjad.lilypond(staff)
>>> print(string)
\new Staff
{
    % text
    % text
    c'4
    d'4
    e'4
    f'4
}

Directed literal:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> literal = abjad.LilyPondLiteral(r"\f", directed=True, site="after")
>>> bundle = abjad.bundle(
...     literal,
...     r"- \tweak color #blue",
...     r"- \tweak DynamicLineSpanner.staff-padding 5",
... )
>>> abjad.attach(bundle, staff[0])
>>> abjad.show(staff)  

Nondirected literal:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> literal = abjad.LilyPondLiteral(
...     r"\breathe",
...     directed=False,
...     site="after",
... )
>>> bundle = abjad.bundle(literal, r"\tweak color #blue")
>>> abjad.attach(bundle, staff[0])
>>> abjad.show(staff)  

Proper use of the directed property entails searching the LilyPond docs to understand whether LilyPond treats any particular command as directed or not. Most LilyPond commands are directed. LilyPond insists that a few commands (include \breathe, \key, \mark) must not be directed.

Tweaks:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> literal = abjad.LilyPondLiteral(r"\f", directed=True, site="after")
>>> bundle = abjad.bundle(literal, r"- \tweak color #blue")
>>> abjad.attach(bundle, staff[0])
>>> abjad.show(staff)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

allowable_sites

can_attach_to_containers

format_leaf_children

post_event

Is true when literal is directed.


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).


Read-only properties

post_event

Is true when literal is directed.

class abjad.indicators.Markup(string)[source]

LilyPond markup.

>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> markup = abjad.Markup(r'\markup \italic "Allegro assai"')
>>> abjad.attach(markup, staff[0], direction=abjad.UP)
>>> abjad.show(staff)  

Tweaks:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> markup = abjad.Markup(r'\markup \bold "Allegro assai"')
>>> bundle = abjad.bundle(markup, r"- \tweak color #blue")
>>> abjad.attach(bundle, staff[0], direction=abjad.UP)
>>> abjad.show(staff)  

Markup can be tagged:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> markup = abjad.Markup(r"\markup \italic Allegro")
>>> abjad.attach(markup, staff[0], direction=abjad.UP, tag=abjad.Tag("RED:M1"))
>>> abjad.show(staff)  
>>> string = abjad.lilypond(staff, tags=True)
>>> print(string)
\new Staff
{
    c'4
      %! M1
      %! RED
    ^ \markup \italic Allegro
    d'4
    e'4
    f'4
}

Tagged markup can be deactivated:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> markup = abjad.Markup(r"\markup \italic Allegro")
>>> abjad.attach(
...     markup,
...     staff[0],
...     deactivate=True,
...     direction=abjad.UP,
...     tag=abjad.Tag("RED:M1"),
... )
>>> abjad.show(staff)  
>>> string = abjad.lilypond(staff, tags=True)
>>> print(string)
\new Staff
{
    c'4
      %! M1
      %! RED
    %@% ^ \markup \italic Allegro
    d'4
    e'4
    f'4
}

REGRESSION: markup 1 doesn’t disappear after markup 2 is attached:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> markup_1 = abjad.Markup(r"\markup \italic Allegro")
>>> markup_2 = abjad.Markup(r'\markup \italic "non troppo"')
>>> abjad.attach(markup_1, staff[0], direction=abjad.UP)
>>> abjad.attach(markup_2, staff[0], direction=abjad.UP)
>>> abjad.show(staff)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

directed

post_event


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.MetronomeMark(reference_duration=None, units_per_minute=None, textual_indication=None, custom_markup=None, decimal=False, hide=False)[source]

MetronomeMark.

Initializes integer-valued metronome mark:

>>> score = abjad.Score()
>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> score.append(staff)
>>> mark = abjad.MetronomeMark(abjad.Duration(1, 4), 90)
>>> abjad.attach(mark, staff[0])
>>> abjad.show(score)  

Initializes rational-valued metronome mark:

>>> import fractions
>>> score = abjad.Score()
>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> score.append(staff)
>>> mark = abjad.MetronomeMark(abjad.Duration(1, 4), fractions.Fraction(272, 3))
>>> abjad.attach(mark, staff[0])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', score])
>>> abjad.show(lilypond_file)  

Overrides rational-valued metronome mark with decimal string:

>>> score = abjad.Score()
>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> score.append(staff)
>>> mark = abjad.MetronomeMark(
...     abjad.Duration(1, 4),
...     fractions.Fraction(272, 3),
...     decimal="90.66",
... )
>>> abjad.attach(mark, staff[0])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', score])
>>> abjad.show(lilypond_file)  

Overrides rational-valued metronome mark with exact decimal:

>>> score = abjad.Score()
>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> score.append(staff)
>>> mark = abjad.MetronomeMark(
...     abjad.Duration(1, 4),
...     fractions.Fraction(901, 10),
...     decimal=True,
... )
>>> abjad.attach(mark, staff[0])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', score])
>>> abjad.show(lilypond_file)  

Initializes from text, duration and range:

>>> score = abjad.Score()
>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> score.append(staff)
>>> mark = abjad.MetronomeMark(abjad.Duration(1, 4), (120, 133), "Quick")
>>> abjad.attach(mark, staff[0])
>>> abjad.show(score)  

Custom markup:

>>> import fractions
>>> markup = abjad.MetronomeMark.make_tempo_equation_markup(
...     abjad.Duration(1, 4),
...     67.5,
... )
>>> mark = abjad.MetronomeMark(
...     reference_duration=abjad.Duration(1, 4),
...     units_per_minute=fractions.Fraction(135, 2),
...     custom_markup=markup,
... )
>>> staff = abjad.Staff("c'4 d'4 e'4 f'4")
>>> score = abjad.Score([staff])
>>> abjad.attach(mark, staff[0])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', score])
>>> abjad.show(lilypond_file)  

Decimal overrides:

>>> import fractions
>>> mark = abjad.MetronomeMark(abjad.Duration(1, 4), fractions.Fraction(272, 3))
>>> mark.decimal
False
>>> mark = abjad.MetronomeMark(
...     abjad.Duration(1, 4),
...     fractions.Fraction(272, 3),
...     decimal="90.66",
... )
>>> mark.decimal
'90.66'
>>> mark = abjad.MetronomeMark(
...     abjad.Duration(1, 4),
...     fractions.Fraction(901, 10),
...     decimal=True,
... )
>>> mark.decimal
True

Set hide=True when metronome mark should not appear in output (but should still determine effective metronome mark):

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> score = abjad.Score([staff])
>>> metronome_mark_1 = abjad.MetronomeMark(abjad.Duration(1, 4), 72)
>>> abjad.attach(metronome_mark_1, staff[0])
>>> metronome_mark_2 = abjad.MetronomeMark(
...     textual_indication="Allegro",
...     hide=True,
... )
>>> abjad.attach(metronome_mark_2, staff[2])
>>> abjad.show(score)  
>>> string = abjad.lilypond(score)
>>> print(string)
\new Score
<<
    \new Staff
    {
        \tempo 4=72
        c'4
        d'4
        e'4
        f'4
    }
>>
>>> for leaf in abjad.iterate.leaves(staff):
...     prototype = abjad.MetronomeMark
...     leaf, abjad.get.effective(leaf, prototype)
... 
(Note("c'4"), MetronomeMark(reference_duration=Duration(1, 4), units_per_minute=72, textual_indication=None, custom_markup=None, decimal=False, hide=False))
(Note("d'4"), MetronomeMark(reference_duration=Duration(1, 4), units_per_minute=72, textual_indication=None, custom_markup=None, decimal=False, hide=False))
(Note("e'4"), MetronomeMark(reference_duration=None, units_per_minute=None, textual_indication='Allegro', custom_markup=None, decimal=False, hide=True))
(Note("f'4"), MetronomeMark(reference_duration=None, units_per_minute=None, textual_indication='Allegro', custom_markup=None, decimal=False, hide=True))

Equality testing:

>>> mark_1 = abjad.MetronomeMark(abjad.Duration(3, 32), 52)
>>> mark_2 = abjad.MetronomeMark(abjad.Duration(3, 32), 52)
>>> mark_1 == mark_2
True
>>> mark_2 == mark_1
True
>>> mark_1 = abjad.MetronomeMark(abjad.Duration(3, 32), 52)
>>> mark_2 = abjad.MetronomeMark(abjad.Duration(6, 32), 104)
>>> mark_1 == mark_2
False
>>> mark_2 == mark_1
False
>>> mark_1 = abjad.MetronomeMark(abjad.Duration(3, 32), 52, "Langsam")
>>> mark_2 = abjad.MetronomeMark(abjad.Duration(3, 32), 52, "Langsam")
>>> mark_3 = abjad.MetronomeMark(abjad.Duration(3, 32), 52, "Slow")
>>> mark_1 == mark_2
True
>>> mark_1 == mark_3
False

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return a >= b.

__gt__

Return a > b.

__hash__

Return hash(self).

__le__

Return a <= b.

__lt__

Is true when argument is a metronome mark with quarters per minute greater than that of this metronome mark.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

duration_to_milliseconds

Gets millisecond value of duration under a given metronome mark.

is_imprecise

Is true if metronome mark is entirely textual or if metronome mark's units_per_minute is a range.

make_tempo_equation_markup

Makes tempo equation markup.

mutates_offsets_in_seconds

parameter

persistent

quarters_per_minute

Gets metronome mark quarters per minute.

site


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

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

overridden __gt__(other)

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

overridden __hash__()

Return hash(self).

overridden __le__(other)

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

overridden __lt__(argument)[source]

Is true when argument is a metronome mark with quarters per minute greater than that of this metronome mark.

Return type:

bool

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).


Methods

duration_to_milliseconds(duration)[source]

Gets millisecond value of duration under a given metronome mark.

Dotted sixteenth lasts 1500 msec at quarter equals 60:

>>> mark = abjad.MetronomeMark(abjad.Duration(1, 4), 60)
>>> mark.duration_to_milliseconds((3, 8))
Duration(1500, 1)
Return type:

Duration


Class & static methods

static make_tempo_equation_markup(reference_duration, units_per_minute, *, decimal=False)[source]

Makes tempo equation markup.

Integer-valued metronome mark:

>>> markup = abjad.MetronomeMark.make_tempo_equation_markup((1, 4), 90)
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', markup])
>>> abjad.show(lilypond_file)  

Float-valued metronome mark:

>>> markup = abjad.MetronomeMark.make_tempo_equation_markup((1, 4), 90.1)
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', markup])
>>> abjad.show(lilypond_file)  

Rational-valued metronome mark:

>>> import fractions
>>> markup = abjad.MetronomeMark.make_tempo_equation_markup(
...     abjad.Duration(1, 4),
...     fractions.Fraction(272, 3),
... )
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', markup])
>>> abjad.show(lilypond_file)  
Return type:

Markup


Read-only properties

is_imprecise

Is true if metronome mark is entirely textual or if metronome mark’s units_per_minute is a range.

Imprecise metronome marks:

>>> duration = abjad.Duration(1, 4)
>>> abjad.MetronomeMark(textual_indication="Langsam").is_imprecise
True
>>> abjad.MetronomeMark(duration, (35, 50), "Langsam").is_imprecise
True
>>> abjad.MetronomeMark(duration, (35, 50)).is_imprecise
True

Precise metronome marks:

>>> abjad.MetronomeMark(duration, 60).is_imprecise
False
>>> abjad.MetronomeMark(duration, 60, "Langsam").is_imprecise
False
quarters_per_minute

Gets metronome mark quarters per minute.

>>> mark = abjad.MetronomeMark(abjad.Duration(1, 8), 52)
>>> mark.quarters_per_minute
Fraction(104, 1)

Gives tuple when metronome mark units_per_minute is a range.

Gives none when metronome mark is imprecise.

Gives fraction otherwise.

class abjad.indicators.Mode(name='major')[source]

Mode.

>>> abjad.Mode("major")
Mode(name='major')

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

intervals

Gets intervals in mode.


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).


Methods

intervals()[source]

Gets intervals in mode.

>>> for _ in abjad.Mode("major").intervals():
...     _
... 
NamedInterval('+M2')
NamedInterval('+M2')
NamedInterval('+m2')
NamedInterval('+M2')
NamedInterval('+M2')
NamedInterval('+M2')
NamedInterval('+m2')
>>> for _ in abjad.Mode("dorian").intervals():
...     _
... 
NamedInterval('+M2')
NamedInterval('+m2')
NamedInterval('+M2')
NamedInterval('+M2')
NamedInterval('+M2')
NamedInterval('+m2')
NamedInterval('+M2')
class abjad.indicators.Ottava(n=0, *, site='before')[source]

LilyPond \ottava command.

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> ottava = abjad.Ottava(n=1)
>>> abjad.attach(ottava, staff[0])
>>> ottava = abjad.Ottava(n=0, site="after")
>>> abjad.attach(ottava, staff[-1])
>>> abjad.show(staff)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

persistent


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.RehearsalMark(markup=None, number=None)[source]

Rehearsal mark.

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> score = abjad.Score([staff])
>>> mark = abjad.RehearsalMark(number=1)
>>> abjad.attach(mark, staff[0])
>>> scheme = "#format-mark-box-alphabet"
>>> abjad.setting(score).markFormatter = scheme
>>> abjad.show(score)  

Tweaks:

>>> note = abjad.Note("c'4")
>>> staff = abjad.Staff([note])
>>> score = abjad.Score([staff], name="Score")
>>> mark = abjad.RehearsalMark(markup="A")
>>> bundle = abjad.bundle(mark, r"\tweak color #blue")
>>> abjad.attach(bundle, note)
>>> abjad.show(score)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

from_string

Makes rehearsal mark from string.


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).


Class & static methods

static from_string(string)[source]

Makes rehearsal mark from string.

>>> abjad.RehearsalMark.from_string("A")
RehearsalMark(markup=None, number=1)
>>> abjad.RehearsalMark.from_string("AA")
RehearsalMark(markup=None, number=27)
>>> abjad.RehearsalMark.from_string("AB")
RehearsalMark(markup=None, number=28)
>>> abjad.RehearsalMark.from_string("BA")
RehearsalMark(markup=None, number=53)
>>> abjad.RehearsalMark.from_string("BB")
RehearsalMark(markup=None, number=54)
Return type:

RehearsalMark

class abjad.indicators.Repeat(repeat_count=2, repeat_type='volta')[source]

Repeat.

Volta repeat:

>>> container = abjad.Container("c'4 d'4 e'4 f'4")
>>> staff = abjad.Staff([container])
>>> score = abjad.Score([staff])
>>> repeat = abjad.Repeat()
>>> abjad.attach(repeat, container)
>>> abjad.show(score)  

Unfold repeat:

>>> container = abjad.Container("c'4 d'4 e'4 f'4")
>>> staff = abjad.Staff([container])
>>> score = abjad.Score([staff])
>>> repeat = abjad.Repeat(repeat_type="unfold")
>>> abjad.attach(repeat, container)
>>> abjad.show(score)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

can_attach_to_containers

context

format_leaf_children

site


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.RepeatTie[source]

LilyPond \repeatTie command.

>>> voice = abjad.Voice("c'4 c' d' d'", name="Voice")
>>> repeat_tie = abjad.RepeatTie()
>>> bundle = abjad.bundle(repeat_tie, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[1])
>>> abjad.show(voice)  
>>> abjad.get.indicators(voice[1], abjad.RepeatTie)
[RepeatTie()]
>>> wrapper = abjad.get.indicator(voice[1], abjad.RepeatTie, unwrap=False)
>>> wrapper.get_item()
Bundle(indicator=RepeatTie(), tweaks=(Tweak(string='- \\tweak color #blue', tag=None),))
>>> for leaf in voice:
...     leaf, abjad.get.logical_tie(leaf)
... 
(Note("c'4"), LogicalTie(items=[Note("c'4"), Note("c'4")]))
(Note("c'4"), LogicalTie(items=[Note("c'4"), Note("c'4")]))
(Note("d'4"), LogicalTie(items=[Note("d'4")]))
(Note("d'4"), LogicalTie(items=[Note("d'4")]))

With direction unset:

>>> voice = abjad.Voice("c'4 c'4 c''4 c''4", name="Voice")
>>> tie = abjad.RepeatTie()
>>> bundle = abjad.bundle(tie, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[1])
>>> tie = abjad.RepeatTie()
>>> bundle = abjad.bundle(tie, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[3])
>>> abjad.show(voice)  

With direction=abjad.UP:

>>> voice = abjad.Voice("c'4 c'4 c''4 c''4", name="Voice")
>>> tie = abjad.RepeatTie()
>>> bundle = abjad.bundle(tie, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[1], direction=abjad.UP)
>>> tie = abjad.RepeatTie()
>>> bundle = abjad.bundle(tie, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[3], direction=abjad.UP)
>>> abjad.show(voice)  

With direction=abjad.DOWN:

>>> voice = abjad.Voice("c'4 c'4 c''4 c''4", name="Voice")
>>> tie = abjad.RepeatTie()
>>> bundle = abjad.bundle(tie, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[1], direction=abjad.DOWN)
>>> tie = abjad.RepeatTie()
>>> bundle = abjad.bundle(tie, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[3], direction=abjad.DOWN)
>>> abjad.show(voice)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

directed

post_event


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.ShortInstrumentName(markup, *, context='Staff', site='before')[source]

LilyPond \shortInstrumentName command.

Set \shortInstrumentName to markup like this:

>>> staff = abjad.Staff("c'4 d'4 e'4 f'4")
>>> short_instrument_name = abjad.ShortInstrumentName(r"\markup Vc.")
>>> abjad.attach(short_instrument_name, staff[0])
>>> abjad.show(staff)  

Set \shortInstrumentName to custom function like this:

>>> staff = abjad.Staff("c'4 d'4 e'4 f'4")
>>> short_instrument_name = abjad.ShortInstrumentName(r"\my_custom_function")
>>> abjad.attach(short_instrument_name, staff[0])

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

latent

persistent

redraw


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StaffChange(staff_name)[source]

Staff change.

>>> staff_group = abjad.StaffGroup()
>>> staff_group.lilypond_type = "PianoStaff"
>>> rh_staff = abjad.Staff("c'8 d'8 e'8 f'8", name="RH_Staff")
>>> lh_staff = abjad.Staff("s2", name="LH_Staff")
>>> staff_group.extend([rh_staff, lh_staff])
>>> staff_change = abjad.StaffChange("LH_Staff")
>>> abjad.attach(staff_change, rh_staff[2])
>>> abjad.show(staff_group)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

format_leaf_children

site

time_orientation


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StartBeam[source]

LilyPond [ command.

>>> voice = abjad.Voice("c'8 d' e' f'")
>>> start_beam = abjad.StartBeam()
>>> bundle = abjad.bundle(start_beam, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_beam = abjad.StopBeam()
>>> abjad.attach(stop_beam, voice[-1])
>>> abjad.show(voice)  

With direction=abjad.DOWN:

>>> voice = abjad.Voice("c'8 d' e' f'")
>>> start_beam = abjad.StartBeam()
>>> bundle = abjad.bundle(start_beam, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0], direction=abjad.DOWN)
>>> stop_beam = abjad.StopBeam()
>>> abjad.attach(stop_beam, voice[-1])
>>> abjad.show(voice)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

directed

parameter

persistent

post_event

spanner_start


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StartGroup[source]

LilyPond \startGroup command.

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_group = abjad.StartGroup()
>>> bundle = abjad.bundle(start_group, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_group = abjad.StopGroup()
>>> abjad.attach(stop_group, voice[-1])
>>> abjad.show(voice)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

nestable_spanner

persistent

post_event

spanner_start


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StartHairpin(shape='<')[source]

Hairpin indicator.

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> abjad.attach(abjad.Dynamic("p"), voice[0])
>>> abjad.attach(abjad.StartHairpin("<"), voice[0])
>>> abjad.attach(abjad.Dynamic("f"), voice[-1])
>>> abjad.override(voice).DynamicLineSpanner.staff_padding = 4.5
>>> abjad.show(voice)  

Crescendo:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> abjad.attach(abjad.Dynamic("p"), voice[0])
>>> abjad.attach(abjad.StartHairpin("<"), voice[0])
>>> abjad.attach(abjad.Dynamic("f"), voice[-1])
>>> abjad.override(voice).DynamicLineSpanner.staff_padding = 4.5
>>> abjad.show(voice)  

Crescendo dal niente:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> abjad.attach(abjad.Dynamic("niente", hide=True), voice[0])
>>> abjad.attach(abjad.StartHairpin("o<"), voice[0])
>>> abjad.attach(abjad.Dynamic("f"), voice[-1])
>>> abjad.override(voice).DynamicLineSpanner.staff_padding = 4.5
>>> abjad.show(voice)  

Subito crescendo:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> abjad.attach(abjad.Dynamic("p"), voice[0])
>>> abjad.attach(abjad.StartHairpin("<|"), voice[0])
>>> abjad.attach(abjad.Dynamic("f"), voice[-1])
>>> abjad.override(voice).DynamicLineSpanner.staff_padding = 4.5
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  

Subito crescendo dal niente:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> abjad.attach(abjad.Dynamic("niente", hide=True), voice[0])
>>> abjad.attach(abjad.StartHairpin("o<|"), voice[0])
>>> abjad.attach(abjad.Dynamic("f"), voice[-1])
>>> abjad.override(voice).DynamicLineSpanner.staff_padding = 4.5
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  

Diminuendo:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> abjad.attach(abjad.Dynamic("f"), voice[0])
>>> abjad.attach(abjad.StartHairpin(">"), voice[0])
>>> abjad.attach(abjad.Dynamic("p"), voice[-1])
>>> abjad.override(voice).DynamicLineSpanner.staff_padding = 4.5
>>> abjad.show(voice)  

Diminuendo al niente:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> abjad.attach(abjad.Dynamic("f"), voice[0])
>>> abjad.attach(abjad.StartHairpin(">o"), voice[0])
>>> abjad.attach(abjad.Dynamic("niente", command=r"\!"), voice[-1])
>>> abjad.override(voice).DynamicLineSpanner.staff_padding = 4.5
>>> abjad.show(voice)  

Subito diminuendo:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> abjad.attach(abjad.Dynamic("f"), voice[0])
>>> abjad.attach(abjad.StartHairpin("|>"), voice[0])
>>> abjad.attach(abjad.Dynamic("p"), voice[-1])
>>> abjad.override(voice).DynamicLineSpanner.staff_padding = 4.5
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  

Subito diminuendo al niente:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> abjad.attach(abjad.Dynamic("f"), voice[0])
>>> abjad.attach(abjad.StartHairpin("|>o"), voice[0])
>>> abjad.attach(abjad.Dynamic("niente", command=r"\!"), voice[-1])
>>> abjad.override(voice).DynamicLineSpanner.staff_padding = 4.5
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  

Constante:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> abjad.attach(abjad.Dynamic("p"), voice[0])
>>> abjad.attach(abjad.StartHairpin("--"), voice[0])
>>> abjad.attach(abjad.Dynamic("f"), voice[-1])
>>> abjad.override(voice).DynamicLineSpanner.staff_padding = 4.5
>>> abjad.show(voice)  

Tweaks:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> abjad.attach(abjad.Dynamic("p"), voice[0])
>>> start_hairpin = abjad.StartHairpin("<")
>>> bundle = abjad.bundle(start_hairpin, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> abjad.attach(abjad.Dynamic("f"), voice[-1])
>>> abjad.override(voice).DynamicLineSpanner.staff_padding = 4.5
>>> abjad.show(voice)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

crescendo_start

decrescendo_start

directed

known_shapes

parameter

persistent

post_event

site

spanner_start

trend


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StartPhrasingSlur[source]

LilyPond ( command.

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_phrasing_slur = abjad.StartPhrasingSlur()
>>> bundle = abjad.bundle(start_phrasing_slur, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_phrasing_slur = abjad.StopPhrasingSlur()
>>> abjad.attach(stop_phrasing_slur, voice[-1])
>>> abjad.show(voice)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

directed

parameter

persistent

post_event

spanner_start


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StartPianoPedal(kind='sustain')[source]

LilyPond \sustainOn, \sostenutoOn, \unaCorda commands.

>>> staff = abjad.Staff("c'4 d' e' r")
>>> start_piano_pedal = abjad.StartPianoPedal()
>>> bundle = abjad.bundle(
...     start_piano_pedal,
...     r"- \tweak color #blue",
...     r"- \tweak parent-alignment-X #center",
... )
>>> abjad.attach(bundle, staff[0], context="Staff")
>>> stop_piano_pedal = abjad.StopPianoPedal()
>>> abjad.attach(stop_piano_pedal, staff[1], context="Staff")
>>> start_piano_pedal = abjad.StartPianoPedal()
>>> bundle = abjad.bundle(start_piano_pedal, r"- \tweak color #red")
>>> abjad.attach(bundle, staff[1], context="Staff")
>>> stop_piano_pedal = abjad.StopPianoPedal()
>>> abjad.attach(stop_piano_pedal, staff[2], context="Staff")
>>> start_piano_pedal = abjad.StartPianoPedal()
>>> bundle = abjad.bundle(start_piano_pedal, r"- \tweak color #green")
>>> abjad.attach(bundle, staff[2], context="Staff")
>>> stop_piano_pedal = abjad.StopPianoPedal()
>>> abjad.attach(stop_piano_pedal, staff[3], context="Staff")
>>> abjad.override(staff).SustainPedalLineSpanner.staff_padding = 5
>>> abjad.setting(staff).pedalSustainStyle = "#'mixed"
>>> abjad.show(staff)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

parameter

persistent

post_event

spanner_start


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StartSlur[source]

LilyPond ( command.

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_slur = abjad.StartSlur()
>>> bundle = abjad.bundle(start_slur, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_slur = abjad.StopSlur()
>>> abjad.attach(stop_slur, voice[-1])
>>> abjad.show(voice)  

With direction unset:

>>> voice = abjad.Voice("c'8 d' e' f' c'' d'' e'' f''")
>>> abjad.attach(abjad.StartSlur(), voice[0])
>>> abjad.attach(abjad.StopSlur(), voice[3])
>>> abjad.attach(abjad.StartSlur(), voice[4])
>>> abjad.attach(abjad.StopSlur(), voice[7])
>>> abjad.show(voice)  

With direction=abjad.UP:

>>> voice = abjad.Voice("c'8 d' e' f' c'' d'' e'' f''")
>>> abjad.attach(abjad.StartSlur(), voice[0], direction=abjad.UP)
>>> abjad.attach(abjad.StopSlur(), voice[3])
>>> abjad.attach(abjad.StartSlur(), voice[4], direction=abjad.UP)
>>> abjad.attach(abjad.StopSlur(), voice[7])
>>> abjad.show(voice)  

With direction=abjad.DOWN:

>>> voice = abjad.Voice("c'8 d' e' f' c'' d'' e'' f''")
>>> abjad.attach(abjad.StartSlur(), voice[0], direction=abjad.DOWN)
>>> abjad.attach(abjad.StopSlur(), voice[3])
>>> abjad.attach(abjad.StartSlur(), voice[4], direction=abjad.DOWN)
>>> abjad.attach(abjad.StopSlur(), voice[7])
>>> abjad.show(voice)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

directed

parameter

persistent

post_event

spanner_start


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StartTextSpan(command='\\\\startTextSpan', concat_hspace_left=0.5, concat_hspace_right=None, left_broken_text=None, left_text=None, right_padding=None, right_text=None, style=None)[source]

LilyPond \startTextSpan command.

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup(r"\upright pont."),
...     right_text=abjad.Markup(r"\markup \upright tasto"),
...     style=r"\abjad-solid-line-with-arrow",
... )
>>> bundle = abjad.bundle(start_text_span, r"- \tweak staff-padding 2.5")
>>> abjad.attach(bundle, voice[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, voice[-1])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  
>>> abjad.StartTextSpan()
StartTextSpan(command='\\startTextSpan', concat_hspace_left=0.5, concat_hspace_right=None, left_broken_text=None, left_text=None, right_padding=None, right_text=None, style=None)
>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup(r"\upright pont."),
...     right_text=abjad.Markup(r"\markup \upright tasto"),
...     style=r"\abjad-dashed-line-with-arrow",
... )
>>> bundle = abjad.bundle(
...     start_text_span,
...     r"- \tweak color #blue",
...     r"- \tweak staff-padding 2.5",
... )
>>> abjad.attach(bundle, voice[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, voice[-1])
>>> start_text_span = abjad.StartTextSpan(
...     command=r"\startTextSpanOne",
...     left_text=abjad.Markup(r"\upright A"),
...     right_text=abjad.Markup(r"\markup \upright B"),
...     style=r"\abjad-dashed-line-with-arrow",
... )
>>> bundle = abjad.bundle(
...     start_text_span,
...     r"- \tweak color #red",
...     r"- \tweak staff-padding 6",
... )
>>> abjad.attach(bundle, voice[0])
>>> stop_text_span = abjad.StopTextSpan(command=r"\stopTextSpanOne")
>>> abjad.attach(stop_text_span, voice[-1])
>>> markup = abjad.Markup(r"\markup SPACER")
>>> bundle = abjad.bundle(markup, r"- \tweak transparent ##t")
>>> abjad.attach(bundle, voice[0], direction=abjad.UP)
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  

(Spacer text included to prevent docs from clipping output.)

String literals are allowed in place of markup:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> left_text = r"- \tweak bound-details.left.text \markup"
>>> left_text += r" \concat { \upright pont. \hspace #0.5 }"
>>> right_text = r"- \tweak bound-details.right.text \markup"
>>> right_text += r" \upright tasto"
>>> start_text_span = abjad.StartTextSpan(
...     left_text=left_text,
...     right_text=right_text,
...     style=r"\abjad-solid-line-with-arrow",
... )
>>> bundle = abjad.bundle(start_text_span, r"- \tweak staff-padding 2.5")
>>> abjad.attach(bundle, voice[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, voice[-1])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  

Styles:

>>> voice = abjad.Voice("c'4 d' e' fs'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup(r"\upright pont."),
...     right_text=abjad.Markup(r"\markup \upright tasto"),
...     style=r"\abjad-dashed-line-with-arrow",
... )
>>> bundle = abjad.bundle(start_text_span, r"- \tweak staff-padding 2.5")
>>> abjad.attach(bundle, voice[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, voice[-1])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  
>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup(r"\upright pont."),
...     style=r"\abjad-dashed-line-with-hook",
... )
>>> bundle = abjad.bundle(start_text_span, r"- \tweak staff-padding 2.5")
>>> abjad.attach(bundle, voice[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, voice[-1])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  
>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup(r"\upright pont."),
...     right_text=abjad.Markup(r"\markup \upright tasto"),
...     style=r"\abjad-invisible-line",
... )
>>> bundle = abjad.bundle(start_text_span, r"- \tweak staff-padding 2.5")
>>> abjad.attach(bundle, voice[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, voice[-1])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  
>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup(r"\upright pont."),
...     right_text=abjad.Markup(r"\markup \upright tasto"),
...     style=r"\abjad-solid-line-with-arrow",
... )
>>> bundle = abjad.bundle(start_text_span, r"- \tweak staff-padding 2.5")
>>> abjad.attach(bundle, voice[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, voice[-1])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  
>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup(r"\upright pont."),
...     style=r"\abjad-solid-line-with-hook",
... )
>>> bundle = abjad.bundle(start_text_span, r"- \tweak staff-padding 2.5")
>>> abjad.attach(bundle, voice[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, voice[-1])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  

Styles constrained to 'dashed-line-with-arrow', 'dashed-line-with-hook', 'invisible-line', 'solid-line-with-arrow', 'solid-line-with-hook', none.

REGRESSION. Tweaking the dash-fraction of the start text span works correctly:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup(r"\upright pont."),
...     right_text=abjad.Markup(r"\markup \upright tasto"),
...     style=r"\abjad-dashed-line-with-arrow",
... )
>>> bundle = abjad.bundle(
...     start_text_span,
...     r"- \tweak dash-fraction 0.85",
...     r"- \tweak staff-padding 2.5",
... )
>>> abjad.attach(bundle, voice[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, voice[-1])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

allow_multiple_with_different_values

context

directed

parameter

persistent

post_event

spanner_start


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StartTrillSpan(interval=None, pitch=None)[source]

LilyPond \startTrillSpan command.

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_trill_span = abjad.StartTrillSpan()
>>> bundle = abjad.bundle(start_trill_span, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_trill_span = abjad.StopTrillSpan()
>>> abjad.attach(stop_trill_span, voice[-1])
>>> abjad.show(voice)  

With interval:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_trill_span = abjad.StartTrillSpan(interval=abjad.NamedInterval("M2"))
>>> bundle = abjad.bundle(start_trill_span, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_trill_span = abjad.StopTrillSpan()
>>> abjad.attach(stop_trill_span, voice[-1])
>>> abjad.show(voice)  

With pitch:

>>> voice = abjad.Voice("c'4 d' e' f'")
>>> start_trill_span = abjad.StartTrillSpan(pitch=abjad.NamedPitch("C#4"))
>>> bundle = abjad.bundle(start_trill_span, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_trill_span = abjad.StopTrillSpan()
>>> abjad.attach(stop_trill_span, voice[-1])
>>> abjad.show(voice)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

parameter

persistent

post_event

spanner_start


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StemTremolo(tremolo_flags=16)[source]

Stem tremolo.

Sixteenth-note tremolo:

>>> note = abjad.Note("c'4")
>>> stem_tremolo = abjad.StemTremolo(16)
>>> abjad.attach(stem_tremolo, note)
>>> abjad.show(note)  

Thirty-second-note tremolo:

>>> note = abjad.Note("c'4")
>>> stem_tremolo = abjad.StemTremolo(32)
>>> abjad.attach(stem_tremolo, note)
>>> abjad.show(note)  

REGRESSION. Consider a note, rest, chord to which a stem tremolo is attached. When such a note, rest, chord splits into two notes, rests, chords then a stem tremolo attaches to each of the resultant notes, rests, chords:

>>> staff = abjad.Staff("c'4 c'2.")
>>> abjad.attach(abjad.StemTremolo(), staff[1])
>>> abjad.show(staff)  
>>> abjad.Meter.rewrite_meter(staff[:], abjad.Meter((3, 4)))
>>> abjad.show(staff)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

site

time_orientation


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StopBeam(leak=False)[source]

LilyPond ] command.

Without leak:

>>> voice = abjad.Voice("c'8 d' e' r")
>>> start_beam = abjad.StartBeam()
>>> bundle = abjad.bundle(start_beam, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_beam = abjad.StopBeam()
>>> abjad.attach(stop_beam, voice[-2])
>>> abjad.show(voice)  

With leak:

>>> voice = abjad.Voice("c'8 d' e' r")
>>> start_beam = abjad.StartBeam()
>>> bundle = abjad.bundle(start_beam, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_beam = abjad.StopBeam(leak=True)
>>> abjad.attach(stop_beam, voice[-2])
>>> abjad.show(voice)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

parameter

persistent

spanner_stop

time_orientation


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StopGroup(leak=False)[source]

LilyPond \stopGroup command.

Without leak:

>>> voice = abjad.Voice("c'4 d' e' r")
>>> start_group = abjad.StartGroup()
>>> bundle = abjad.bundle(start_group, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_group = abjad.StopGroup()
>>> abjad.attach(stop_group, voice[-2])
>>> abjad.show(voice)  

With leak:

>>> voice = abjad.Voice("c'4 d' e' r")
>>> start_group = abjad.StartGroup()
>>> bundle = abjad.bundle(start_group, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_group = abjad.StopGroup(leak=True)
>>> abjad.attach(stop_group, voice[-2])
>>> abjad.show(voice)  

REGRESSION. Leaked contributions appear last in postevent format site:

>>> voice = abjad.Voice("c'8 d' e' f' r2")
>>> abjad.beam(voice[:4])
>>> start_group = abjad.StartGroup()
>>> bundle = abjad.bundle(start_group, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_group = abjad.StopGroup(leak=True)
>>> abjad.attach(stop_group, voice[3])
>>> abjad.show(voice)  

The leaked text spanner above does not inadvertantly leak the beam.


Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

nestable_spanner

persistent

spanner_stop

time_orientation


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StopHairpin(leak=False)[source]

LilyPond \! command.

Without leak:

>>> voice = abjad.Voice("c'4 d' e' r")
>>> start_hairpin = abjad.StartHairpin("<")
>>> bundle = abjad.bundle(start_hairpin, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_hairpin = abjad.StopHairpin()
>>> abjad.attach(stop_hairpin, voice[-2])
>>> abjad.show(voice)  

With leak:

>>> voice = abjad.Voice("c'4 d' e' r")
>>> start_hairpin = abjad.StartHairpin("<")
>>> bundle = abjad.bundle(start_hairpin, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_hairpin = abjad.StopHairpin(leak=True)
>>> abjad.attach(stop_hairpin, voice[-2])
>>> abjad.show(voice)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

spanner_stop


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StopPhrasingSlur(leak=False)[source]

LilyPond \) command.

Without leak:

>>> voice = abjad.Voice("c'4 d' e' r")
>>> start_phrasing_slur = abjad.StartPhrasingSlur()
>>> bundle = abjad.bundle(start_phrasing_slur, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_phrasing_slur = abjad.StopPhrasingSlur()
>>> abjad.attach(stop_phrasing_slur, voice[-2])
>>> abjad.show(voice)  

With leak:

>>> voice = abjad.Voice("c'4 d' e' r")
>>> start_phrasing_slur = abjad.StartPhrasingSlur()
>>> bundle = abjad.bundle(start_phrasing_slur, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_phrasing_slur = abjad.StopPhrasingSlur(leak=True)
>>> abjad.attach(stop_phrasing_slur, voice[-2])
>>> abjad.show(voice)  

REGRESSION. Leaked contributions appear last in postevent format site:

>>> voice = abjad.Voice("c'8 d' e' f' r2")
>>> abjad.beam(voice[:4])
>>> start_phrasing_slur = abjad.StartPhrasingSlur()
>>> bundle = abjad.bundle(start_phrasing_slur, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_phrasing_slur = abjad.StopPhrasingSlur(leak=True)
>>> abjad.attach(stop_phrasing_slur, voice[3])
>>> abjad.show(voice)  

The leaked text spanner above does not inadvertantly leak the beam.


Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

parameter

persistent

spanner_stop


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StopPianoPedal(kind='sustain', leak=False)[source]

LilyPond \sostenutoOff, \sustainOff, \treCorde commands.

Without leak:

>>> staff = abjad.Staff("c'4 d' e' r")
>>> start_piano_pedal = abjad.StartPianoPedal()
>>> bundle = abjad.bundle(
...     start_piano_pedal,
...     r"- \tweak color #blue",
...     r"- \tweak parent-alignment-X #center",
... )
>>> abjad.attach(bundle, staff[0], context="Staff")
>>> stop_piano_pedal = abjad.StopPianoPedal()
>>> bundle = abjad.bundle(
...     stop_piano_pedal,
...     r"- \tweak color #red",
...     r"- \tweak parent-alignment-X #center",
... )
>>> abjad.attach(bundle, staff[-2], context="Staff")
>>> abjad.override(staff).SustainPedalLineSpanner.staff_padding = 5
>>> abjad.show(staff)  

With leak:

>>> staff = abjad.Staff("c'4 d' e' r")
>>> start_piano_pedal = abjad.StartPianoPedal()
>>> bundle = abjad.bundle(
...     start_piano_pedal,
...     r"- \tweak color #blue",
...     r"- \tweak parent-alignment-X #center",
... )
>>> abjad.attach(bundle, staff[0], context="Staff")
>>> stop_piano_pedal = abjad.StopPianoPedal(leak=True)
>>> bundle = abjad.bundle(
...     stop_piano_pedal,
...     r"- \tweak color #red",
...     r"- \tweak parent-alignment-X #center",
... )
>>> abjad.attach(bundle, staff[-2], context="Staff")
>>> abjad.override(staff).SustainPedalLineSpanner.staff_padding = 5
>>> abjad.show(staff)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

parameter

persistent

post_event

spanner_stop

time_orientation


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StopSlur(leak=False)[source]

LilyPond ) command.

Without leak:

>>> voice = abjad.Voice("c'4 d' e' r")
>>> start_slur = abjad.StartSlur()
>>> bundle = abjad.bundle(start_slur, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_slur = abjad.StopSlur()
>>> abjad.attach(stop_slur, voice[-2])
>>> abjad.show(voice)  

With leak:

>>> voice = abjad.Voice("c'4 d' e' r")
>>> start_slur = abjad.StartSlur()
>>> bundle = abjad.bundle(start_slur, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_slur = abjad.StopSlur(leak=True)
>>> abjad.attach(stop_slur, voice[-2])
>>> abjad.show(voice)  

REGRESSION. Leaked contributions appear last in postevent format site. The leaked text spanner above does not inadvertantly leak the beam:

>>> voice = abjad.Voice("c'8 d' e' f' r2")
>>> abjad.beam(voice[:4])
>>> start_slur = abjad.StartSlur()
>>> bundle = abjad.bundle(start_slur, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_slur = abjad.StopSlur(leak=True)
>>> abjad.attach(stop_slur, voice[3])
>>> abjad.show(voice)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

parameter

persistent

spanner_stop

time_orientation


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StopTextSpan(command='\\\\stopTextSpan', leak=False)[source]

LilyPond \stopTextSpan command.

Without leak:

>>> voice = abjad.Voice("c'4 d' e' r")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup(r"\upright pont."),
...     right_text=abjad.Markup(r"\markup \upright tasto"),
...     style=r"\abjad-dashed-line-with-arrow",
... )
>>> bundle = abjad.bundle(start_text_span, r"- \tweak staff-padding 2.5")
>>> abjad.attach(bundle, voice[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, voice[-2])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  

With leak:

>>> voice = abjad.Voice("c'4 d' e' r")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup(r"\upright pont."),
...     right_text=abjad.Markup(r"\markup \upright tasto"),
...     style=r"\abjad-dashed-line-with-arrow",
... )
>>> bundle = abjad.bundle(start_text_span, r"- \tweak staff-padding 2.5")
>>> abjad.attach(bundle, voice[0])
>>> stop_text_span = abjad.StopTextSpan(leak=True)
>>> abjad.attach(stop_text_span, voice[-2])
>>> lilypond_file = abjad.LilyPondFile([r'\include "abjad.ily"', voice])
>>> abjad.show(lilypond_file)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

enchained

nestable_spanner

parameter

persistent

spanner_stop


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.StopTrillSpan(leak=False)[source]

LilyPond \stopTrillSpan command.

Without leak:

>>> voice = abjad.Voice("c'4 d' e' r")
>>> start_trill_span = abjad.StartTrillSpan()
>>> bundle = abjad.bundle(start_trill_span, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_trill_span = abjad.StopTrillSpan()
>>> abjad.attach(stop_trill_span, voice[-2])
>>> abjad.show(voice)  

With leak:

>>> voice = abjad.Voice("c'4 d' e' r")
>>> start_trill_span = abjad.StartTrillSpan()
>>> bundle = abjad.bundle(start_trill_span, r"- \tweak color #blue")
>>> abjad.attach(bundle, voice[0])
>>> stop_trill_span = abjad.StopTrillSpan(leak=True)
>>> abjad.attach(stop_trill_span, voice[-2])
>>> abjad.show(voice)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

context

parameter

persistent

spanner_stop

time_orientation


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.Tie[source]

LilyPond ~ command.

>>> staff = abjad.Staff("c'4 c' d' d'")
>>> tie = abjad.Tie()
>>> bundle = abjad.bundle(tie, r"- \tweak color #blue")
>>> abjad.attach(bundle, staff[0])
>>> abjad.show(staff)  
>>> for leaf in staff:
...     leaf, abjad.get.logical_tie(leaf)
... 
(Note("c'4"), LogicalTie(items=[Note("c'4"), Note("c'4")]))
(Note("c'4"), LogicalTie(items=[Note("c'4"), Note("c'4")]))
(Note("d'4"), LogicalTie(items=[Note("d'4")]))
(Note("d'4"), LogicalTie(items=[Note("d'4")]))

With direction unset:

>>> staff = abjad.Staff("c'4 c' c'' c''")
>>> abjad.attach(abjad.Tie(), staff[0])
>>> abjad.attach(abjad.Tie(), staff[2])
>>> abjad.show(staff)  

With direction=abjad.UP:

>>> staff = abjad.Staff("c'4 c' c'' c''")
>>> abjad.attach(abjad.Tie(), staff[0], direction=abjad.UP)
>>> abjad.attach(abjad.Tie(), staff[2], direction=abjad.UP)
>>> abjad.show(staff)  

With direction=abjad.DOWN:

>>> staff = abjad.Staff("c'4 c' c'' c''")
>>> abjad.attach(abjad.Tie(), staff[0], direction=abjad.DOWN)
>>> abjad.attach(abjad.Tie(), staff[2], direction=abjad.DOWN)
>>> abjad.show(staff)  

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

directed

post_event


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).

class abjad.indicators.TimeSignature(pair, hide=False, partial=None)[source]

Time signature.

>>> staff = abjad.Staff("c'8 d'8 e'8")
>>> score = abjad.Score([staff], name="Score")
>>> time_signature = abjad.TimeSignature((3, 8))
>>> abjad.attach(time_signature, staff[0])
>>> abjad.show(staff)  

Create score-contexted time signatures like this:

>>> staff = abjad.Staff("c'8 d'8 e'8 c'8 d'8 e'8")
>>> score = abjad.Score([staff], name="Score")
>>> time_signature = abjad.TimeSignature((3, 8))
>>> abjad.attach(time_signature, staff[0], context="Score")
>>> score[:] = []

Score-contexted time signatures format behind comments when no Abjad score container is found:

>>> string = abjad.lilypond(staff)
>>> print(string)
\new Staff
{
    %%% \time 3/8 %%%
    c'8
    d'8
    e'8
    c'8
    d'8
    e'8
}
>>> abjad.show(staff)  

Score-contexted time signatures format normally when an Abjad score container is found:

>>> score = abjad.Score([staff])
>>> string = abjad.lilypond(score)
>>> print(string)
\new Score
<<
    \new Staff
    {
        \time 3/8
        c'8
        d'8
        e'8
        c'8
        d'8
        e'8
    }
>>
>>> abjad.show(score)  

Time signatures can be tagged:

>>> staff = abjad.Staff("c'8 d'8 e'8 c'8 d'8 e'8")
>>> score = abjad.Score([staff], name="Score")
>>> time_signature = abjad.TimeSignature((3, 8))
>>> abjad.attach(
...     time_signature,
...     staff[0],
...     context="Score",
...     tag=abjad.Tag("+PARTS"),
... )
>>> abjad.show(staff)  
>>> string = abjad.lilypond(score, tags=True)
>>> print(string)
\context Score = "Score"
<<
    \new Staff
    {
          %! +PARTS
        \time 3/8
        c'8
        d'8
        e'8
        c'8
        d'8
        e'8
    }
>>

Set hide=True time signature should not appear in output (but should still determine effective time signature):

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> score = abjad.Score([staff], name="Score")
>>> time_signature = abjad.TimeSignature((4, 4))
>>> abjad.attach(time_signature, staff[0])
>>> time_signature = abjad.TimeSignature((2, 4), hide=True)
>>> abjad.attach(time_signature, staff[2])
>>> abjad.show(staff)  
>>> string = abjad.lilypond(staff)
>>> print(string)
\new Staff
{
    \time 4/4
    c'4
    d'4
    e'4
    f'4
}
>>> for leaf in abjad.iterate.leaves(staff):
...     prototype = abjad.TimeSignature
...     leaf, abjad.get.effective(leaf, prototype)
... 
(Note("c'4"), TimeSignature(pair=(4, 4), hide=False, partial=None))
(Note("d'4"), TimeSignature(pair=(4, 4), hide=False, partial=None))
(Note("e'4"), TimeSignature(pair=(2, 4), hide=True, partial=None))
(Note("f'4"), TimeSignature(pair=(2, 4), hide=True, partial=None))

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

check_effective_context

context

denominator

Gets denominator of time signature:

duration

Gets duration of time signature.

from_string

Makes new time signature from fraction string.

implied_prolation

Gets implied prolation of time signature.

is_non_dyadic_rational

Is true when time signature has non-power-of-two denominator.

numerator

Gets numerator of time signature.

persistent

site

to_dyadic_rational

Makes new time signature equivalent to current time signature with power-of-two denominator.


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).


Methods

to_dyadic_rational()[source]

Makes new time signature equivalent to current time signature with power-of-two denominator.

>>> abjad.TimeSignature((1, 12)).to_dyadic_rational()
TimeSignature(pair=(1, 12), hide=False, partial=None)
>>> abjad.TimeSignature((2, 12)).to_dyadic_rational()
TimeSignature(pair=(2, 12), hide=False, partial=None)
>>> abjad.TimeSignature((3, 12)).to_dyadic_rational()
TimeSignature(pair=(2, 8), hide=False, partial=None)
>>> abjad.TimeSignature((4, 12)).to_dyadic_rational()
TimeSignature(pair=(4, 12), hide=False, partial=None)
>>> abjad.TimeSignature((5, 12)).to_dyadic_rational()
TimeSignature(pair=(5, 12), hide=False, partial=None)
>>> abjad.TimeSignature((6, 12)).to_dyadic_rational()
TimeSignature(pair=(4, 8), hide=False, partial=None)
>>> abjad.TimeSignature((1, 14)).to_dyadic_rational()
TimeSignature(pair=(1, 14), hide=False, partial=None)
>>> abjad.TimeSignature((2, 14)).to_dyadic_rational()
TimeSignature(pair=(2, 14), hide=False, partial=None)
>>> abjad.TimeSignature((3, 14)).to_dyadic_rational()
TimeSignature(pair=(3, 14), hide=False, partial=None)
>>> abjad.TimeSignature((4, 14)).to_dyadic_rational()
TimeSignature(pair=(4, 14), hide=False, partial=None)
>>> abjad.TimeSignature((5, 14)).to_dyadic_rational()
TimeSignature(pair=(5, 14), hide=False, partial=None)
>>> abjad.TimeSignature((6, 14)).to_dyadic_rational()
TimeSignature(pair=(6, 14), hide=False, partial=None)
Return type:

TimeSignature


Class & static methods

static from_string(string)[source]

Makes new time signature from fraction string.

>>> abjad.TimeSignature.from_string("6/8")
TimeSignature(pair=(6, 8), hide=False, partial=None)
Return type:

TimeSignature


Read-only properties

denominator

Gets denominator of time signature:

>>> abjad.TimeSignature((3, 8)).denominator
8
duration

Gets duration of time signature.

>>> abjad.TimeSignature((3, 8)).duration
Duration(3, 8)
implied_prolation

Gets implied prolation of time signature.

Implied prolation of dyadic time signature:

>>> abjad.TimeSignature((3, 8)).implied_prolation
Fraction(1, 1)

Implied prolation of nondyadic time signature:

>>> abjad.TimeSignature((7, 12)).implied_prolation
Fraction(2, 3)
is_non_dyadic_rational

Is true when time signature has non-power-of-two denominator.

With non-power-of-two denominator:

>>> time_signature = abjad.TimeSignature((7, 12))
>>> time_signature.is_non_dyadic_rational
True

With power-of-two denominator:

>>> time_signature = abjad.TimeSignature((3, 8))
>>> time_signature.is_non_dyadic_rational
False

Suppresses LilyPond “strange time signature” warning:

>>> tuplet = abjad.Tuplet((2, 3), "c'4 d' e' f'")
>>> staff = abjad.Staff([tuplet])
>>> score = abjad.Score([staff], name="Score")
>>> time_signature = abjad.TimeSignature((4, 3))
>>> abjad.attach(time_signature, tuplet[0])
>>> abjad.show(staff)  
>>> string = abjad.lilypond(staff)
>>> print(string)
\new Staff
{
    \tweak edge-height #'(0.7 . 0)
    \times 2/3
    {
        #(ly:expect-warning "strange time signature found")
        \time 4/3
        c'4
        d'4
        e'4
        f'4
    }
}
numerator

Gets numerator of time signature.

>>> abjad.TimeSignature((3, 8)).numerator
3
class abjad.indicators.VoiceNumber(n=None, leak=False)[source]

LilyPond \voiceOne, \voiceTwo, \voiceThree, \voiceFour, \oneVoice commands.

>>> staff = abjad.Staff()
>>> voice_1 = abjad.Voice("g'8 a' b' c''")
>>> command = abjad.VoiceNumber(n=1)
>>> abjad.attach(command, voice_1[0])
>>> voice_2 = abjad.Voice("e'8 f' g' a'")
>>> command = abjad.VoiceNumber(n=2)
>>> abjad.attach(command, voice_2[0])
>>> container = abjad.Container([voice_1, voice_2], simultaneous=True)
>>> staff.append(container)
>>> voice = abjad.Voice("c''4 a'")
>>> command = abjad.VoiceNumber()
>>> abjad.attach(command, voice[0])
>>> staff.append(voice)
>>> abjad.show(staff)  
>>> for leaf in abjad.select.leaves(staff):
...     command = abjad.get.effective(leaf, abjad.VoiceNumber)
...     print(f"{leaf}, {command}")
... 
Note("g'8"), VoiceNumber(n=1, leak=False)
Note("a'8"), VoiceNumber(n=1, leak=False)
Note("b'8"), VoiceNumber(n=1, leak=False)
Note("c''8"), VoiceNumber(n=1, leak=False)
Note("e'8"), VoiceNumber(n=2, leak=False)
Note("f'8"), VoiceNumber(n=2, leak=False)
Note("g'8"), VoiceNumber(n=2, leak=False)
Note("a'8"), VoiceNumber(n=2, leak=False)
Note("c''4"), VoiceNumber(n=None, leak=False)
Note("a'4"), VoiceNumber(n=None, leak=False)

Attributes Summary

__delattr__

Implement delattr(self, name).

__eq__

Return self==value.

__ge__

Return self>=value.

__gt__

Return self>value.

__hash__

Return hash(self).

__le__

Return self<=value.

__lt__

Return self<value.

__post_init__

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

check_effective_context

context

parameter

persistent

temporarily_do_not_check


Special methods

overridden __delattr__(name)

Implement delattr(self, name).

overridden __eq__(other)

Return self==value.

overridden __ge__(other)

Return self>=value.

overridden __gt__(other)

Return self>value.

overridden __hash__()

Return hash(self).

overridden __le__(other)

Return self<=value.

overridden __lt__(other)

Return self<value.

__post_init__()[source]
overridden __repr__()

Return repr(self).

overridden __setattr__(name, value)

Implement setattr(self, name, value).