Returns a FoscLilypondLiteral.
a LilyPond literal
FIXME: examples with FoscSlur do not compile
| *allowableFormatSlots | Lists allowable format slots. |
| directed | Is true when literal is directed. |
| formatSlot | Gets format slot of LilyPond literal. |
| string | Gets LilyPond literal string. |
| tweaks | Gets tweaks. |
| format | Formats Lilypond literal. |
Dotted slur.
a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/8]));
m = FoscSlur();
a[0..].attach(m);
l = FoscLilypondLiteral("\\slurDotted");
a[0].attach(l);
a.show;Use the absolute before and absolute after format slots like this.
a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/8]));
l = FoscLilypondLiteral("% before all formatting", formatSlot: 'absoluteBefore');
a[0].attach(l);
l = FoscLilypondLiteral("% after all formatting", formatSlot: 'absoluteAfter');
a[3].attach(l);
a.format;\new Staff {
% before all formatting
c'8
d'8
e'8
f'8
% after all formatting
}Lilypond literals can be tagged.
a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/8]));
m = FoscSlur();
a[0..].attach(m);
l = FoscLilypondLiteral("\\slurDotted");
a[0].attach(l, tag: 'RED');
a.format;Multi-line input is allowed.
a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/8]));
l = FoscLilypondLiteral(#[
"\\stopStaff",
"\\startStaff",
"\\once \\override Staff.StaffSymbol.transparent = ##t"
]);
a[2].attach(l);
a.show;
Lists allowable format slots.
Example
FoscLilypondLiteral.allowableFormatSlots.postln;[ 'absoluteAfter', 'absoluteBefore', 'after', 'before', 'closing', 'opening', 'right' ]Is true when literal is directed.
Directed literal.
l = FoscLilypondLiteral("\\f", 'after', directed: true);
l.directed.postln;trueNondirected literal.
l = FoscLilypondLiteral("\\breathe", 'after', directed: false);
l.directed.postln;falseGets format slot of LilyPond literal.
Returns string.
Example
a = FoscLilypondLiteral(\slurDotted);
a.formatSlot.postln;'opening'Gets LilyPond literal string.
Example
l = FoscLilypondLiteral("\\slurDotted");
l.string.postln;\slurDottedGets tweaks.
Example
a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/4]));
l = FoscLilypondLiteral("\\f", 'after', directed: true, tweaks: #[['color', 'red']]);
a[0].attach(l);
a.show;
Formats Lilypond literal.