FoscLilypondGrobOverride

Returns a FoscLilypondGrobOverride.


Description

LilyPond grob override.


Attributes Summary

Instance Properties

grobName LilyPond grob override grob name.
isOnce Is true when grob override is to be applied only once.
isRevert Is true when grob override is a grob revert.
lilypondType Optional Lilypond grob override context name.
overrideFormatPieces Gets LilyPond grob override format pieces.
overrideString Gets LilyPond grob override string.
propertyPath LilyPond grob override property path.
revertFormatPieces Gets LilyPond grob override \revert format pieces.
revertString Gets LilyPond grob override \revert string.
value Value of LilyPond grob override.

Instance Methods

tweakString

Instance Methods: Special Methods

== Is true when object is a FoscLilypondGrobOverride with equivalent instance variable values.


Instance Properties


grobName

LilyPond grob override grob name.

Returns Symbol.

  1. Example

    a = FoscLilypondGrobOverride(grobName: 'Glissando');
    a.grobName.postln;
    'Glissando'


isOnce

Is true when grob override is to be applied only once.

Returns true or false.

  1. Example

    a = FoscLilypondGrobOverride("Staff", "NoteHead", isOnce: true);
    a.isOnce.postln;
    true
  2. Example

    a = FoscLilypondGrobOverride(grobName: 'Glissando', isOnce: false);
    a.isOnce.postln;
    false


isRevert

Is true when grob override is a grob revert.

Returns true or false.

  1. Example

    a = FoscLilypondGrobOverride("Staff", "NoteHead", isRevert: true);
    a.isRevert.postln;
    true


lilypondType

Optional Lilypond grob override context name.

Returns Symbol or nil.

  1. Example

    a = FoscLilypondGrobOverride("Staff", "NoteHead", true, false, 'color', 'red');
    a.lilypondType.postln;
    'Staff'
  2. Example

    a = FoscLilypondGrobOverride(grobName: 'Glissando');
    a.lilypondType.isNil.postln;
    true


overrideFormatPieces

Gets LilyPond grob override format pieces.

Returns array of strings.

  1. Example

    a = FoscLilypondGrobOverride(
        lilypondType: "Staff",
        grobName: "TextSpanner",
        isOnce: true,
        propertyPath: #['bound-details', 'left', 'text'],
        value: FoscMarkup("\\bold { over pressure }")
    );
    a.overrideFormatPieces.printAll;
    [ "\\once \\override Staff.TextSpanner.bound-details.left.text = \\markup { \"\\bold { over pressure }\" }" ]
    \once \override Staff.TextSpanner.bound-details.left.text = \markup { "\bold { over pressure }" }


overrideString

Gets LilyPond grob override string.

Returns string.

  1. Example

    a = FoscLilypondGrobOverride(
        grobName: "Glissando",
        propertyPath: 'style',
        value: FoscSchemeSymbol('zigzag')
    );
    a.overrideString.postln;
    \override Glissando.style = #'zigzag


propertyPath

LilyPond grob override property path.

Returns array of symbols.

  1. Example

    a = FoscLilypondGrobOverride(
        lilypondType: "Staff",
        grobName: "TextSpanner",
        isOnce: true,
        propertyPath: #['bound-details', 'left', 'text'],
        value: FoscMarkup("\\bold { over pressure }")
    );
    a.propertyPath[0].postln;
    'bound-details'


revertFormatPieces

Gets LilyPond grob override \revert format pieces.

Returns array of strings.

  1. Example

    a = FoscLilypondGrobOverride(
        grobName: "Glissando",
        propertyPath: 'style',
        value: FoscSchemeSymbol('zigzag')
    );
    a.revertFormatPieces.postln;
    [ "\\revert Glissando.style" ]


revertString

Gets LilyPond grob override \revert string.

Returns string.

  1. Example

    a = FoscLilypondGrobOverride(
        grobName: "Glissando",
        propertyPath: 'style',
        value: FoscSchemeSymbol('zigzag')
    );
    a.revertString.postln;
    \revert Glissando.style


value

Value of LilyPond grob override.

Returns arbitrary object.

  1. Example

    a = FoscLilypondGrobOverride(
        lilypondType: "Staff",
        grobName: "TextSpanner",
        isOnce: true,
        propertyPath: #['bound-details', 'left', 'text'],
        value: FoscMarkup("\\bold { over pressure }")
    );
    a.value.postln;
    FoscMarkup("\bold { over pressure }")


Instance Methods


tweakString

  1. Example

    a = FoscLilypondGrobOverride(
        grobName: "Glissando",
        propertyPath: 'style',
        value: FoscSchemeSymbol('zigzag')
    );
    a.tweakString.postln;
    - \tweak style #'zigzag
  2. Example

    a = FoscLilypondGrobOverride(
        grobName: "RehearsalMark",
        propertyPath: 'color',
        value: 'red'
    );
    a.tweakString.postln;
    - \tweak color "red"
  3. Lilypond literals are allowed.

    FIXME: ERROR: Message name not understood.

    a = FoscLilypondGrobOverride(
        grobName: "TextSpan",
        propertyPath: #['bound-details', 'left-broken', 'text'],
        value: FoscLilypondLiteral("\\markup \\upright pont.")
    );
    a.tweakString.postln;


Instance Methods: Special Methods


==

Is true when object is a FoscLilypondGrobOverride with equivalent instance variable values.

  1. FIXME: ERROR: Message instVarDict not understood.

    a = FoscLilypondGrobOverride("Staff", "NoteHead", true, false, 'color', 'red');
    b = FoscLilypondGrobOverride("Staff", "NoteHead", true, false, 'color', 'red');
    (a == b).postln;
  2. FIXME: ERROR: Message instVarDict not understood.

    a = FoscLilypondGrobOverride("Staff", "NoteHead", true, false, 'color', 'red');
    b = FoscLilypondGrobOverride("Voice", "NoteHead", true, false, 'color', 'red');
    (a == b).postln;