HorizontalBracket

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.HorizontalBracket.HorizontalBracket" [URL="../api/abjad/spanners/HorizontalBracket.html#abjad.spanners.HorizontalBracket.HorizontalBracket", color=black, fontcolor=white, label="Horizontal\nBracket", 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.HorizontalBracket.HorizontalBracket"; } 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.HorizontalBracket.HorizontalBracket(*, markup=None)

Horizontal bracket.

>>> voice = abjad.Voice("c'4 d'4 e'4 f'4")
>>> voice.consists_commands.append('Horizontal_bracket_engraver')
>>> spanner = abjad.HorizontalBracket()
>>> abjad.tweak(spanner).staff_padding = 6
>>> abjad.tweak(spanner).color = 'blue'
>>> abjad.attach(spanner, voice[:])
>>> spanner = abjad.HorizontalBracket()
>>> abjad.tweak(spanner).staff_padding = 4
>>> abjad.tweak(spanner).color = 'red'
>>> abjad.attach(spanner, voice[:2])
>>> spanner = abjad.HorizontalBracket()
>>> abjad.tweak(spanner).staff_padding = 4
>>> abjad.tweak(spanner).color = 'red'
>>> abjad.attach(spanner, voice[2:])
>>> abjad.show(voice) 

Attributes Summary

markup Gets horizonal bracket markup.

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

(Spanner).leaves

Gets leaves in spanner.

Return type:Selection
markup

Gets horizonal bracket markup.

Gets markup:

>>> markup = abjad.Markup('3-1[012]').smaller()
>>> spanner = abjad.HorizontalBracket(markup=markup)
>>> spanner.markup
Markup(contents=[MarkupCommand('smaller', '3-1[012]')])

Defaults to none:

>>> spanner = abjad.HorizontalBracket()
>>> spanner.markup is None
True
Return type:Optional[Markup]
(Spanner).tweaks

Gets tweaks.

Return type:Optional[LilyPondTweakManager]