PhrasingSlur

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.PhrasingSlur.PhrasingSlur" [URL="../api/abjad/spanners/PhrasingSlur.html#abjad.spanners.PhrasingSlur.PhrasingSlur", color=black, fontcolor=white, label="Phrasing\nSlur", 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.PhrasingSlur.PhrasingSlur"; } 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="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } "abjad.system.AbjadObject.AbjadObject" -> "abjad.spanners.Spanner.Spanner"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

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

Phrasing slur.

Spans four notes:

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

Requires at least two leaves:

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

Attributes Summary

direction Gets direction.

Special methods

(Spanner).__contains__(argument)

Is true when spanner contains argument.

Return type:bool
(Spanner).__copy__(*arguments)

Copies spanner.

Does not copy spanner leaves.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

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

Returns string.

(Spanner).__getitem__(argument)

Gets leaf or selection identified by argument.

Return type:Union[Leaf, Selection]
(Spanner).__iter__()

Iterates leaves in spanner.

Return type:Iterator[+T_co]
(Spanner).__len__()

Gets number of leaves in spanner.

Return type:int
(Spanner).__lt__(argument)

Is true when spanner is less than argument.

Trivial comparison to allow doctests to work.

Return type:bool
(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Read-only properties

direction

Gets direction.

Positions phrasing slur above staff:

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

Positions phrasing slur below staff:

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

Positions phrasing slur according to LilyPond defaults:

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

Gets leaves in spanner.

Return type:Selection
(Spanner).tweaks

Gets tweaks.

Return type:Optional[LilyPondTweakManager]