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.spanners" { graph [label="abjad.spanners"]; node [color=1]; "abjad.spanners.Slur.Slur" [URL="../api/abjad/spanners/Slur.html#abjad.spanners.Slur.Slur", color=black, fontcolor=white, label=Slur, target=_top]; "abjad.spanners.Spanner.Spanner" [URL="../api/abjad/spanners/Spanner.html#abjad.spanners.Spanner.Spanner", label=Spanner, target=_top]; "abjad.spanners.Spanner.Spanner" -> "abjad.spanners.Slur.Slur"; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=2]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/spanners/../system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; } subgraph cluster_builtins { graph [label=builtins]; node [color=3]; "builtins.object" [URL="", label=object, target=_top]; } "abjad.system.AbjadObject.AbjadObject" -> "abjad.spanners.Spanner.Spanner"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.spanners.Slur.Slur(*, direction=None)


Slurs four notes:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> abjad.attach(abjad.Slur(), staff[:])

Tweaks slur color:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> slur = abjad.Slur()
>>> abjad.tweak(slur).color = 'red'
>>> abjad.attach(slur, staff[:])

Raises exception on fewer than two leaves:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> abjad.attach(abjad.Slur(), staff[:1])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/josiah/Source/", line 243, in attach
    raise Exception(message)
Exception: Slur()._attachment_test_all():
  Requires at least two leaves.
  Not just Note("c'4").

Attributes Summary

direction Gets direction.

Special methods


Is true when spanner contains argument.

Return type:bool

Copies spanner.

Does not copy spanner leaves.


Formats Abjad object.

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

Returns string.


Gets leaf or selection identified by argument.

Return type:Union[Leaf, Selection]

Iterates leaves in spanner.

Return type:Iterator[+T_co]

Gets number of leaves in spanner.

Return type:int

Is true when spanner is less than argument.

Trivial comparison to allow doctests to work.

Return type:bool

Gets interpreter representation of Abjad object.

Returns string.

Read-only properties


Gets direction.

Forces slur above staff:

>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> slur = abjad.Slur(direction=abjad.Up)
>>> abjad.attach(slur, staff[:])

Forces slur below staff:

>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> slur = abjad.Slur(direction=abjad.Down)
>>> abjad.attach(slur, staff[:])

Positions slur according to LilyPond defaults:

>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> slur = abjad.Slur(direction=None)
>>> abjad.attach(slur, staff[:])
Return type:Optional[String]

Gets leaves in spanner.

Return type:Selection

Gets tweaks.

Return type:Optional[LilyPondTweakManager]