FoscRehearsalMark

Returns a FoscRehearsalMark.


Description

Rehearsal mark.


Attributes Summary

Instance Properties

context Gets context of rehearsal mark. Returns Score.
markup Gets rehearsal mark markup.
number Gets rehearsal mark number.
tweaks Gets tweaks.

Instance Methods: Special Methods

copy Copies rehearsal mark.
str Gets string representation of rehearsal mark.


Usage

  1. Initialize from number.

    a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/4]));
    a = FoscScore([a]);
    m = FoscRehearsalMark(number: 1);
    a.leafAt(0).attach(m);
    set(a).markFormatter = FoscScheme('format-mark-box-alphabet');
    a.show;

  2. Initialize from markup.

    a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/4]));
    a = FoscScore([a]);
    m = FoscRehearsalMark(markup: 'A1');
    a.leafAt(0).attach(m);
    a.show;

  3. Reharsal mark can be tweaked when markup is not nil.

    a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/4]));
    a = FoscScore([a]);
    m = FoscRehearsalMark(markup: "A1", tweaks: #['color', 'blue']);
    a.leafAt(0).attach(m);
    a.show;

  4. Tweaks have no effect when markup is nil.

    a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/4]));
    a = FoscScore([a]);
    m = FoscRehearsalMark(number: 1, tweaks: #['color', 'blue']);
    a.leafAt(0).attach(m);
    a.show;


Instance Properties


context

Gets context of rehearsal mark. Returns Score.

  1. Example

    m = FoscRehearsalMark(number: 1);
    m.context.postcs;
    'Score'


markup

Gets rehearsal mark markup.

  1. Example

    m = FoscRehearsalMark(markup: FoscMarkup("A1"));
    m.markup.postcs;
    FoscMarkup("A1")


number

Gets rehearsal mark number.

  1. Example

    m = FoscRehearsalMark(number: 1);
    m.number.postln;
    1


tweaks

Gets tweaks.

  1. Example

    m = FoscRehearsalMark(number: 1, tweaks: #[['color', 'red']]);
    m.tweaks.postcs;
    FoscLilypondTweakManager().prSetState(('color': red))


Instance Methods: Special Methods


copy

Copies rehearsal mark.


str

Gets string representation of rehearsal mark.

  1. Example

    m = FoscRehearsalMark(number: 1);
    m.str;
    \mark #1