Glissando

class spannertools.Glissando(allow_repeat_pitches=False, allow_ties=False, overrides=None, parenthesize_repeated_pitches=False)

Glissando.

>>> import abjad
>>> staff = abjad.Staff("c'8 d'8 e'8 f'8")
>>> glissando = abjad.Glissando()
>>> abjad.attach(glissando, staff[:])
>>> 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[:])
>>> show(staff) 

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_abctools { graph [label=abctools]; "abjad.tools.abctools.AbjadObject.AbjadObject" [color=1, group=0, label=AbjadObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" [color=1, group=0, label=AbstractBase, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" -> "abjad.tools.abctools.AbjadObject.AbjadObject"; } subgraph cluster_spannertools { graph [label=spannertools]; "abjad.tools.spannertools.Glissando.Glissando" [color=black, fontcolor=white, group=2, label=<<B>Glissando</B>>, shape=box, style="filled, rounded"]; "abjad.tools.spannertools.Spanner.Spanner" [color=3, group=2, label=Spanner, shape=box]; "abjad.tools.spannertools.Spanner.Spanner" -> "abjad.tools.spannertools.Glissando.Glissando"; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.spannertools.Spanner.Spanner"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Bases

Attribute summary

allow_repeat_pitches Is true when glissando should allow repeated pitches.
allow_ties Is true when glissando should allow ties.
components Gets leaves in spanner.
name Gets spanner name.
overrides Gets overrides.
parenthesize_repeated_pitches Is true when glissando should parenthesize repeated pitches.
__contains__(argument) Is true when spanner contains argument.
__copy__(*arguments) Copies spanner.
__eq__(argument) Is true when ID of argument equals ID of Abjad object.
__format__([format_specification]) Formats Abjad object.
__getitem__(argument) Gets item or slice identified by argument.
__hash__() Hashes Abjad object.
__len__() Gets number of components in spanner.
__lt__(argument) Is true when spanner is less than argument.
__ne__(argument) Is true when Abjad object does not equal argument.
__repr__() Gets interpreter representation of Abjad object.

Read-only properties

Glissando.allow_repeat_pitches

Is true when glissando should allow repeated pitches. Otherwise false.

Does not allow repeated pitches:

>>> staff = abjad.Staff("a8 a8 b8 ~ b8 c'8 c'8 d'8 ~ d'8")
>>> glissando = abjad.Glissando(
...     allow_repeat_pitches=False,
...     )
>>> abjad.attach(glissando, staff[:])
>>> 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_repeat_pitches=True,
...     )
>>> abjad.attach(glissando, staff[:])
>>> 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_repeat_pitches=True,
...     allow_ties=True,
...     )
>>> abjad.attach(glissando, staff[:])
>>> show(staff) 

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

Defaults to false.

Glissando.allow_ties

Is true when glissando should allow ties. Otherwise false.

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_repeat_pitches=False,
...     )
>>> abjad.attach(glissando, staff[:])
>>> 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_repeat_pitches=True,
...     )
>>> abjad.attach(glissando, staff[:])
>>> 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_repeat_pitches=True,
...     allow_ties=True,
...     )
>>> abjad.attach(glissando, staff[:])
>>> show(staff) 

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

Defaults to false.

(Spanner).components

Gets leaves in spanner.

Returns selection of leaves.

(Spanner).name

Gets spanner name.

Returns string.

(Spanner).overrides

Gets overrides.

Returns dictionary.

Glissando.parenthesize_repeated_pitches

Is true when glissando should parenthesize repeated pitches. Otherwise false.

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[:])
>>> 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_repeat_pitches=True,
...     parenthesize_repeated_pitches=True,
...     )
>>> abjad.attach(glissando, staff[:])
>>> 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_repeated_pitches=True,
...     )
>>> abjad.attach(glissando, staff[:])
>>> show(staff) 

Defaults to false.

Special methods

(Spanner).__contains__(argument)

Is true when spanner contains argument. Otherwise false.

Returns true or false.

(Spanner).__copy__(*arguments)

Copies spanner.

Does not copy spanner components.

Returns new spanner.

(AbjadObject).__eq__(argument)

Is true when ID of argument equals ID of Abjad object. Otherwise false.

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

(Spanner).__getitem__(argument)

Gets item or slice identified by argument.

Returns component.

(AbjadObject).__hash__()

Hashes Abjad object.

Required to be explicitly redefined on Python 3 if __eq__ changes.

Returns integer.

(Spanner).__len__()

Gets number of components in spanner.

Returns nonnegative integer.

(Spanner).__lt__(argument)

Is true when spanner is less than argument. Otherwise false.

Trivial comparison to allow doctests to work.

Returns true or false.

(AbjadObject).__ne__(argument)

Is true when Abjad object does not equal argument. Otherwise false.

Returns true or false.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.