FoscLilypondFormatManager

Returns a FoscLilypondFormatManager.


Description

Manages Lilypond formatting logic.


Attributes Summary

Class Methods

*bundleFormatContributions Gets all format contributions for component.
*formatLilypondAttribute Formats Lilypond attribute according to Scheme formatting conventions.
*formatLilypondContextSettingInWithBlock Formats Lilypond context setting name with value in Lilypond with-block.
*formatLilypondContextSettingsInline Formats Lilypond context setting name with value in context.
*formatLilypondValue Formats Lilypond argument according to Scheme formatting conventions.
*makeLilypondOverrideString Makes Lilypond override string. Returns string.
*makeLilypondRevertString Makes Lilypond revert string.
*makeLilypondTweakString Makes Lilypond string.
*tag Tags strings with tag.


Usage

  1. Example

    n = FoscNote(60, [1, 4]);
    //FoscAttach(m = FoscMarkup("groob"), n);
    FoscAttach(FoscDynamic('p'), n);
    FoscAttach(FoscArticulation('>'), n);
    n.prFormatComponent;
    b = FoscLilypondFormatManager.bundleFormatContributions(n);
    b.before.indicators;
    b.opening.indicators;
    b.closing.indicators;
    b.right.indicators;     // abjad: ('%%% \\p %%%',)
    b.right.articulations;
    n.wrappers.do { |e| e.prGetFormatPieces.postln };
  2. Example

    e = FoscWrapper(FoscNote(60, 1), FoscArticulation('accent'));
    e.indicator;
    b = e.prGetFormatPieces; // FoscLilypondFormatBundle
    b.right.articulations;


Class Methods


*bundleFormatContributions

Gets all format contributions for component.

Returns Lilypond format bundle.


*formatLilypondAttribute

Formats Lilypond attribute according to Scheme formatting conventions.

Returns string.

  1. Co-ordinate attributes

    FoscLilypondFormatManager.formatLilypondAttribute('minimumYExtent');
    FoscLilypondFormatManager.formatLilypondAttribute('xExtent');
    FoscLilypondFormatManager.formatLilypondAttribute('xAlignOnMainNoteheads');
    FoscLilypondFormatManager.formatLilypondAttribute('parentAlignmentY');
    FoscLilypondFormatManager.formatLilypondAttribute('boundDetails_left_stencilAlignDirY');
    bound-details.left.stencil-align-dir-Y


*formatLilypondContextSettingInWithBlock

Formats Lilypond context setting name with value in Lilypond with-block.

Returns string.


*formatLilypondContextSettingsInline

Formats Lilypond context setting name with value in context.

Returns string.

  1. Example

    FoscLilypondFormatManager.formatLilypondContextSettingInline("StaffSymbol.color_", 'red', "Staff");
    \set Staff.StaffSymbol.color_ = #red


*formatLilypondValue

Formats Lilypond argument according to Scheme formatting conventions.

Returns string.

  1. Example

    FoscLilypondFormatManager.formatLilypondValue(false);
    FoscLilypondFormatManager.formatLilypondValue(\center);
    FoscLilypondFormatManager.formatLilypondValue(FoscSchemeMoment(1, 24));
    FoscLilypondFormatManager.formatLilypondValue(5);
    FoscLilypondFormatManager.formatLilypondValue(\magenta);
    FoscLilypondFormatManager.formatLilypondValue("lilypond::string");
    FoscLilypondFormatManager.formatLilypondValue("lilypondstring");
    FoscLilypondFormatManager.formatLilypondValue("lilypond string");
    FoscLilypondFormatManager.formatLilypondValue([-1, 1]);
    FoscLilypondFormatManager.formatLilypondValue(['font-name', "Times"]);
    #'(font-name . "Times")
    FoscLilypondFormatManager.formatLilypondValue(FoscSchemeColor('ForestGreen'));
    #(x11-color 'ForestGreen)


*makeLilypondOverrideString

Makes Lilypond override string. Returns string.

  1. • *makeLilypondOverrideString

    Makes Lilypond override string. Returns string.


*makeLilypondRevertString

Makes Lilypond revert string.

Returns string.

  1. Example

    FoscLilypondFormatManager.makeLilypondRevertString("StaffSymbol", 'color', "Staff");
    \revert Staff.StaffSymbol.color


*makeLilypondTweakString

Makes Lilypond string.

Returns string.

  1. Example

    FoscLilypondFormatManager.makeLilypondTweakString('color', 'red', true, 'noteHead');
    - \tweak NoteHead.color #red


*tag

Tags strings with tag.