StartMarkup

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.indicators" { graph [label="abjad.indicators"]; node [color=1]; "abjad.indicators.StartMarkup.StartMarkup" [URL="../api/abjad/indicators/StartMarkup.html#abjad.indicators.StartMarkup.StartMarkup", color=black, fontcolor=white, label="Start\nMarkup", target=_top]; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=2]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/indicators/../system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; "abjad.system.AbjadValueObject.AbjadValueObject" [URL="../api/abjad/indicators/../system/AbjadValueObject.html#abjad.system.AbjadValueObject.AbjadValueObject", label="Abjad\nValue\nObject", target=_top]; "abjad.system.AbjadObject.AbjadObject" -> "abjad.system.AbjadValueObject.AbjadValueObject"; } 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.AbjadValueObject.AbjadValueObject" -> "abjad.indicators.StartMarkup.StartMarkup"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.indicators.StartMarkup.StartMarkup(markup='instrument name', *, context='Staff', format_slot='before')

Start markup.

>>> staff = abjad.Staff("c'4 d'4 e'4 f'4")
>>> start_markup = abjad.StartMarkup(markup=abjad.Markup('Cellos'))
>>> abjad.attach(start_markup, staff[0])
>>> abjad.show(staff, strict=89) 

Attributes Summary

__eq__ Is true when argument is start markup with context and markup equal to those of this start markup.
__hash__ Hashes start markup.
context Gets default context of start markup.
format_slot Gets format slot.
markup Gets (instrument name) markup.
tweaks Are not implemented on start markup.

Special methods

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

__eq__(argument)

Is true when argument is start markup with context and markup equal to those of this start markup.

>>> start_markup_1 = abjad.StartMarkup(
...     context='PianoStaff',
...     markup=abjad.Markup('Harp'),
...     )
>>> start_markup_2 = abjad.StartMarkup(
...     context='PianoStaff',
...     markup=abjad.Markup('Harp'),
...     )
>>> start_markup_3 = abjad.StartMarkup(
...     context='Staff',
...     markup=abjad.Markup('Harp'),
...     )
>>> start_markup_1 == start_markup_1
True
>>> start_markup_1 == start_markup_2
True
>>> start_markup_1 == start_markup_3
False
>>> start_markup_2 == start_markup_1
True
>>> start_markup_2 == start_markup_2
True
>>> start_markup_2 == start_markup_3
False
>>> start_markup_3 == start_markup_1
False
>>> start_markup_3 == start_markup_2
False
>>> start_markup_3 == start_markup_3
True
Return type:bool
(AbjadObject).__format__(format_specification='')

Formats Abjad object.

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

Returns string.

__hash__()

Hashes start markup.

>>> start_markup = abjad.StartMarkup(
...     context='PianoStaff',
...     markup=abjad.Markup('Harp'),
...     )
>>> hash_ = hash(start_markup)
>>> isinstance(hash_, int)
True

Redefined in tandem with __eq__.

Return type:int
(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Read-only properties

context

Gets default context of start markup.

>>> abjad.StartMarkup().context
'Staff'
Return type:str
format_slot

Gets format slot.

>>> abjad.StartMarkup().format_slot
'before'
Return type:str
markup

Gets (instrument name) markup.

>>> abjad.StartMarkup().markup
Markup(contents=['instrument name'])
Return type:Markup
tweaks

Are not implemented on start markup.

The LilyPond \instrumentName command refuses tweaks.

Craft explicit markup instead.

Return type:None