Glissando

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.Glissando.Glissando" [URL="../api/abjad/spanners/Glissando.html#abjad.spanners.Glissando.Glissando", color=black, fontcolor=white, label=Glissando, 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.Glissando.Glissando"; } 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.Glissando.Glissando(*, allow_repeats=None, allow_ties=None, parenthesize_repeats=None, right_broken=None, stems=None, style=None)

Glissando.

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

Glissando avoids bend-after indicators:

>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> bend_after = abjad.BendAfter()
>>> abjad.attach(bend_after, staff[1])
>>> glissando = abjad.Glissando()
>>> abjad.attach(glissando, staff[:])
>>> abjad.show(staff) 

Attributes Summary

allow_repeats Is true when glissando should allow repeated pitches.
allow_ties Is true when glissando should allow ties.
cross_segment_examples Cross-segment examples.
parenthesize_repeats Is true when glissando should parenthesize repeated pitches.
right_broken Is true when spanner is right-broken.
stems Is true when glissando formats stems-only timing marks non nonedge leaves.
style Gets style.

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

allow_repeats

Is true when glissando should allow repeated pitches.

Does not allow repeated pitches:

>>> staff = abjad.Staff("a8 a8 b8 ~ b8 c'8 c'8 d'8 ~ d'8")
>>> glissando = abjad.Glissando(
...     allow_repeats=False,
...     )
>>> abjad.attach(glissando, staff[:])
>>> abjad.show(staff) 

This is default behavior.

Allows repeated pitches (but not ties):

>>> staff = abjad.Staff("a8 a8 b8 ~ b8 c'8 c'8 d'8 ~ d'8")
>>> glissando = abjad.Glissando(
...     allow_repeats=True,
...     )
>>> abjad.attach(glissando, staff[:])
>>> abjad.show(staff) 

Allows both repeated pitches and ties:

>>> staff = abjad.Staff("a8 a8 b8 ~ b8 c'8 c'8 d'8 ~ d'8")
>>> glissando = abjad.Glissando(
...     allow_repeats=True,
...     allow_ties=True,
...     )
>>> abjad.attach(glissando, staff[:])
>>> abjad.show(staff) 

Ties are excluded when repeated pitches are not allowed because all ties comprise repeated pitches.

Return type:Optional[bool]
allow_ties

Is true when glissando should allow ties.

Does not allow repeated pitches (including ties):

>>> staff = abjad.Staff("a8 a8 b8 ~ b8 c'8 c'8 d'8 ~ d'8")
>>> glissando = abjad.Glissando(
...     allow_repeats=False,
...     )
>>> abjad.attach(glissando, staff[:])
>>> abjad.show(staff) 

This is default behavior.

Allows repeated pitches (but not ties):

>>> staff = abjad.Staff("a8 a8 b8 ~ b8 c'8 c'8 d'8 ~ d'8")
>>> glissando = abjad.Glissando(
...     allow_repeats=True,
...     )
>>> abjad.attach(glissando, staff[:])
>>> abjad.show(staff) 

Allows both repeated pitches and ties:

>>> staff = abjad.Staff("a8 a8 b8 ~ b8 c'8 c'8 d'8 ~ d'8")
>>> glissando = abjad.Glissando(
...     allow_repeats=True,
...     allow_ties=True,
...     )
>>> abjad.attach(glissando, staff[:])
>>> abjad.show(staff) 

Ties are excluded when repeated pitches are not allowed because all ties comprise repeated pitches.

Return type:Optional[bool]
cross_segment_examples

Cross-segment examples.

Cross-segment example #1 (one-to-one):

>>> segment_1 = abjad.Voice("c'4 d' e' f'", name='MainVoice')
>>> glissando = abjad.Glissando(right_broken=True)
>>> abjad.attach(
...     glissando,
...     segment_1[-1:],
...     )
>>> abjad.show(segment_1, strict=50) 
>>> segment_2 = abjad.Voice("g'4 a' b' r", name='MainVoice')
>>> abjad.show(segment_2, strict=50) 
>>> container = abjad.Container([segment_1, segment_2])
>>> text = format(container, 'lilypond')
>>> text = abjad.LilyPondFormatManager.left_shift_tags(text, 50)
>>> job = abjad.Job.join_broken_spanners(text)
>>> text = job()
>>> lines = text.split('\n')
>>> lilypond_file = abjad.LilyPondFile.new(lines)
>>> abjad.show(lilypond_file) 

Cross-segment example #2 (one-to-many):

>>> segment_1 = abjad.Voice("c'4 d' e' f'", name='MainVoice')
>>> glissando = abjad.Glissando(right_broken=True)
>>> abjad.attach(glissando, segment_1[-1:])
>>> abjad.show(segment_1, strict=50) 
>>> segment_2 = abjad.Voice("g'4 a' b' r", name='MainVoice')
>>> abjad.attach(abjad.Glissando(), segment_2[:3])
>>> abjad.show(segment_2, strict=50) 
>>> container = abjad.Container([segment_1, segment_2])
>>> text = format(container, 'lilypond')
>>> text = abjad.LilyPondFormatManager.left_shift_tags(text, 50)
>>> job = abjad.Job.join_broken_spanners(text)
>>> text = job()
>>> lines = text.split('\n')
>>> lilypond_file = abjad.LilyPondFile.new(lines)
>>> abjad.show(lilypond_file) 

Cross-segment example #3 (many-to-one):

>>> segment_1 = abjad.Voice("c'4 d' e' f'", name='MainVoice')
>>> glissando = abjad.Glissando(right_broken=True)
>>> abjad.attach(glissando, segment_1[:])
>>> abjad.show(segment_1, strict=50) 
>>> segment_2 = abjad.Voice("g'4 a' b' r", name='MainVoice')
>>> abjad.show(segment_2, strict=50) 
>>> container = abjad.Container([segment_1, segment_2])
>>> text = format(container, 'lilypond')
>>> text = abjad.LilyPondFormatManager.left_shift_tags(text, 50)
>>> job = abjad.Job.join_broken_spanners(text)
>>> text = job()
>>> lines = text.split('\n')
>>> lilypond_file = abjad.LilyPondFile.new(lines)
>>> abjad.show(lilypond_file) 

Cross-segment example #4 (many-to-many):

>>> segment_1 = abjad.Voice("c'4 d' e' f'", name='MainVoice')
>>> glissando = abjad.Glissando(right_broken=True)
>>> abjad.attach(glissando, segment_1[:])
>>> abjad.show(segment_1, strict=50) 
>>> segment_2 = abjad.Voice("g'4 a' b' r", name='MainVoice')
>>> abjad.attach(abjad.Glissando(), segment_2[:3])
>>> abjad.show(segment_2, strict=50) 
>>> container = abjad.Container([segment_1, segment_2])
>>> text = format(container, 'lilypond')
>>> text = abjad.LilyPondFormatManager.left_shift_tags(text, 50)
>>> job = abjad.Job.join_broken_spanners(text)
>>> text = job()
>>> lines = text.split('\n')
>>> lilypond_file = abjad.LilyPondFile.new(lines)
>>> abjad.show(lilypond_file) 
(Spanner).leaves

Gets leaves in spanner.

Return type:Selection
parenthesize_repeats

Is true when glissando should parenthesize repeated pitches.

Does not parenthesize repeated pitches:

>>> staff = abjad.Staff("a8 a8 b8 ~ b8 c'8 c'8 d'8 ~ d'8")
>>> glissando = abjad.Glissando()
>>> abjad.attach(glissando, staff[:])
>>> abjad.show(staff) 

This is default behavior.

Spans and parenthesizes repeated pitches:

>>> staff = abjad.Staff("a8 a8 b8 ~ b8 c'8 c'8 d'8 ~ d'8")
>>> glissando = abjad.Glissando(
...     allow_repeats=True,
...     parenthesize_repeats=True,
...     )
>>> abjad.attach(glissando, staff[:])
>>> abjad.show(staff) 

Parenthesizes (but does not span) repeated pitches:

>>> staff = abjad.Staff("a8 a8 b8 ~ b8 c'8 c'8 d'8 ~ d'8")
>>> glissando = abjad.Glissando(
...     parenthesize_repeats=True,
...     )
>>> abjad.attach(glissando, staff[:])
>>> abjad.show(staff) 
Return type:Optional[bool]
right_broken

Is true when spanner is right-broken.

Return type:Optional[bool]
stems

Is true when glissando formats stems-only timing marks non nonedge leaves.

>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> glissando = abjad.Glissando(stems=True)
>>> abjad.attach(glissando, staff[:])
>>> abjad.show(staff) 
Return type:Optional[bool]
style

Gets style.

>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> glissando = abjad.Glissando(style='trill')
>>> abjad.attach(glissando, staff[:])
>>> abjad.show(staff) 
Return type:Optional[str]
(Spanner).tweaks

Gets tweaks.

Return type:Optional[LilyPondTweakManager]