LilyPondGrobOverride

class lilypondnametools.LilyPondGrobOverride(context_name=None, grob_name='NoteHead', is_once=None, is_revert=None, property_path='color', value='red')

LilyPond grob override.

>>> import abjad
>>> override = abjad.LilyPondGrobOverride(
...    context_name='Staff',
...    grob_name='TextSpanner',
...    is_once=True,
...    property_path=(
...        'bound-details',
...        'left',
...        'text',
...        ),
...    value=abjad.Markup(r'\bold { over pressure }'),
...    )
>>> print(override.override_string)
\once \override Staff.TextSpanner.bound-details.left.text = \markup {
    \bold
        {
            over
            pressure
        }
    }

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.AbjadValueObject.AbjadValueObject" [color=1, group=0, label=AbjadValueObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.abctools.AbjadValueObject.AbjadValueObject"; "abjad.tools.abctools.AbjadObject.AbstractBase" -> "abjad.tools.abctools.AbjadObject.AbjadObject"; } subgraph cluster_lilypondnametools { graph [label=lilypondnametools]; "abjad.tools.lilypondnametools.LilyPondGrobOverride.LilyPondGrobOverride" [color=black, fontcolor=white, group=2, label=<<B>LilyPondGrobOverride</B>>, shape=box, style="filled, rounded"]; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" -> "abjad.tools.lilypondnametools.LilyPondGrobOverride.LilyPondGrobOverride"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Bases

Attribute summary

context_name Optional LilyPond grob override context name.
grob_name LilyPond grob override grob name.
is_once Is true if grob override is to be applied only once.
is_revert Is true if grob override is a grob revert.
override_format_pieces Gets LilyPond grob override override format pieces.
override_string Gets LilyPond grob override override string.
property_path LilyPond grob override property path.
revert_format_pieces Gets LilyPond grob override revert format pieces.
revert_string Gets LilyPond grob override revert string.
value Value of LilyPond grob override.
__copy__(*arguments) Copies Abjad value object.
__eq__(argument) Is true when argument is a LilyPond grob override with equivalent keyword values.
__format__([format_specification]) Formats Abjad object.
__hash__() Hashes LilyPond grob override.
__ne__(argument) Is true when Abjad object does not equal argument.
__repr__() Gets interpreter representation of Abjad object.

Read-only properties

LilyPondGrobOverride.context_name

Optional LilyPond grob override context name.

>>> override = abjad.LilyPondGrobOverride(
...    context_name='Staff',
...    grob_name='TextSpanner',
...    is_once=True,
...    property_path=(
...        'bound-details',
...        'left',
...        'text',
...        ),
...    value=abjad.Markup(r'\bold { over pressure }'),
...    )
>>> override.context_name
'Staff'
>>> override = abjad.LilyPondGrobOverride(
...     grob_name='Glissando',
...     property_path='style',
...     value=abjad.SchemeSymbol('zigzag'),
...     )
>>> override.context_name is None
True

Returns string or none.

LilyPondGrobOverride.grob_name

LilyPond grob override grob name.

>>> override = abjad.LilyPondGrobOverride(
...     grob_name='Glissando',
...     property_path='style',
...     value=abjad.SchemeSymbol('zigzag'),
...     )
>>> override.grob_name
'Glissando'

Returns string.

LilyPondGrobOverride.is_once

Is true if grob override is to be applied only once. Otherwise false.

>>> override = abjad.LilyPondGrobOverride(
...    context_name='Staff',
...    grob_name='TextSpanner',
...    is_once=True,
...    property_path=(
...        'bound-details',
...        'left',
...        'text',
...        ),
...    value=abjad.Markup(r'\bold { over pressure }'),
...    )
>>> bool(override.is_once)
True
>>> override = abjad.LilyPondGrobOverride(
...     grob_name='Glissando',
...     property_path='style',
...     value=abjad.SchemeSymbol('zigzag'),
...     )
>>> bool(override.is_once)
False

Returns boolean or none.

LilyPondGrobOverride.is_revert

Is true if grob override is a grob revert. Otherwise false.

>>> override = abjad.LilyPondGrobOverride(
...     grob_name='Glissando',
...     property_path='style',
...     value=abjad.SchemeSymbol('zigzag'),
...     )
>>> bool(override.is_revert)
False
>>> override = abjad.LilyPondGrobOverride(
...     grob_name='Glissando',
...     is_revert=True,
...     property_path='style',
...     )
>>> bool(override.is_revert)
True

Returns boolean or none.

LilyPondGrobOverride.override_format_pieces

Gets LilyPond grob override override format pieces.

>>> override = abjad.LilyPondGrobOverride(
...    context_name='Staff',
...    grob_name='TextSpanner',
...    is_once=True,
...    property_path=(
...        'bound-details',
...        'left',
...        'text',
...        ),
...    value=abjad.Markup(r'\bold { over pressure }'),
...    )
>>> for line in override.override_format_pieces:
...     line
...
'\\once \\override Staff.TextSpanner.bound-details.left.text = \\markup {'
'    \\bold'
'        {'
'            over'
'            pressure'
'        }'
'    }'

Returns tuple of strings.

LilyPondGrobOverride.override_string

Gets LilyPond grob override override string.

>>> override = abjad.LilyPondGrobOverride(
...     grob_name='Glissando',
...     property_path='style',
...     value=abjad.SchemeSymbol('zigzag'),
...     )
>>> override.override_string
"\\override Glissando.style = #'zigzag"

Returns string.

LilyPondGrobOverride.property_path

LilyPond grob override property path.

>>> override = abjad.LilyPondGrobOverride(
...    context_name='Staff',
...    grob_name='TextSpanner',
...    is_once=True,
...    property_path=(
...        'bound-details',
...        'left',
...        'text',
...        ),
...    value=abjad.Markup(r'\bold { over pressure }'),
...    )
>>> override.property_path
('bound-details', 'left', 'text')

Returns tuple of strings.

LilyPondGrobOverride.revert_format_pieces

Gets LilyPond grob override revert format pieces.

>>> override = abjad.LilyPondGrobOverride(
...     grob_name='Glissando',
...     property_path='style',
...     value=abjad.SchemeSymbol('zigzag'),
...     )
>>> override.revert_format_pieces
('\\revert Glissando.style',)

Returns tuple of strings.

LilyPondGrobOverride.revert_string

Gets LilyPond grob override revert string.

>>> override = abjad.LilyPondGrobOverride(
...     grob_name='Glissando',
...     property_path='style',
...     value=abjad.SchemeSymbol('zigzag'),
...     )
>>> override.revert_string
'\\revert Glissando.style'

Returns string.

LilyPondGrobOverride.value

Value of LilyPond grob override.

>>> override = abjad.LilyPondGrobOverride(
...    context_name='Staff',
...    grob_name='TextSpanner',
...    is_once=True,
...    property_path=(
...        'bound-details',
...        'left',
...        'text',
...        ),
...    value=abjad.Markup(r'\bold { over pressure }'),
...    )
>>> override.value
Markup(contents=[MarkupCommand('bold', ['over', 'pressure'])])

Returns arbitrary object.

Special methods

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

LilyPondGrobOverride.__eq__(argument)

Is true when argument is a LilyPond grob override with equivalent keyword values.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

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

Returns string.

LilyPondGrobOverride.__hash__()

Hashes LilyPond grob override.

Returns integer.

(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.