RehearsalMark

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.RehearsalMark.RehearsalMark" [URL="../api/abjad/indicators/RehearsalMark.html#abjad.indicators.RehearsalMark.RehearsalMark", color=black, fontcolor=white, label="Rehearsal\nMark", 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.RehearsalMark.RehearsalMark"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.indicators.RehearsalMark.RehearsalMark(*, number=None, markup=None, tweaks=None)

Rehearsal mark.

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> score = abjad.Score([staff])
>>> mark = abjad.RehearsalMark(number=1)
>>> abjad.attach(mark, staff[0])
>>> scheme = abjad.Scheme('format-mark-box-alphabet')
>>> abjad.setting(score).markFormatter = scheme
>>> abjad.show(score) 

Attributes Summary

__copy__ Copies rehearsal mark.
__str__ Gets string representation of rehearsal mark.
context Is 'Score'.
from_string Makes rehearsal mark from string.
markup Gets rehearsal mark markup.
number Gets rehearsal mark number.
tweaks Gets tweaks

Special methods

__copy__(*arguments)

Copies rehearsal mark.

>>> import copy

Preserves tweaks:

>>> mark = abjad.RehearsalMark(number=1)
>>> abjad.tweak(mark).color = 'red'
>>> staff = abjad.Staff("c'4 d' e' f'")
>>> abjad.attach(mark, staff[0])
>>> abjad.show(staff) 
>>> mark = copy.copy(mark)
>>> staff = abjad.Staff("c'4 d' e' f'")
>>> abjad.attach(mark, staff[0])
>>> abjad.show(staff) 
(AbjadValueObject).__eq__(argument)

Is true when all initialization values of Abjad value object equal the initialization values of argument.

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

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

Returns string.

(AbjadValueObject).__hash__()

Hashes Abjad value object.

Returns integer.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.

__str__()

Gets string representation of rehearsal mark.

>>> mark = abjad.RehearsalMark(number=1)
>>> staff = abjad.Staff("c'4 d' e' f'")
>>> abjad.attach(mark, staff[0])
>>> abjad.show(staff) 
>>> str(mark)
'\\mark #1'
Return type:str

Class & static methods

static from_string(string)

Makes rehearsal mark from string.

>>> abjad.RehearsalMark.from_string('A')
RehearsalMark(number=1)
>>> abjad.RehearsalMark.from_string('AA')
RehearsalMark(number=27)
>>> abjad.RehearsalMark.from_string('AB')
RehearsalMark(number=28)
>>> abjad.RehearsalMark.from_string('BA')
RehearsalMark(number=53)
>>> abjad.RehearsalMark.from_string('BB')
RehearsalMark(number=54)
Return type:RehearsalMark

Read-only properties

context

Is 'Score'.

>>> abjad.RehearsalMark(number=1).context
'Score'
Return type:str
markup

Gets rehearsal mark markup.

>>> markup = abjad.Markup(r'\bold { \italic { A } }')
>>> mark = abjad.RehearsalMark(markup=markup)
>>> staff = abjad.Staff("c'4 d' e' f'")
>>> abjad.attach(mark, staff[0])
>>> abjad.show(staff) 
Return type:Optional[Markup]
number

Gets rehearsal mark number.

>>> abjad.RehearsalMark(number=1).number
1
Return type:Optional[int]
tweaks

Gets tweaks

>>> note = abjad.Note("c'4")
>>> mark = abjad.RehearsalMark(markup='A')
>>> abjad.tweak(mark).color = 'blue'
>>> abjad.attach(mark, note)
>>> abjad.show(note) 
>>> note = abjad.Note("c'4")
>>> mark = abjad.RehearsalMark(
...     markup='A',
...     tweaks=[('color', 'blue')],
...     )
>>> abjad.attach(mark, note)
>>> abjad.show(note) 
Return type:Optional[LilyPondTweakManager]