Returns a FoscLilypondFile.
A Lilypond file.
FIXME: should Lilypond file include stylesheets/default.ily?
| *pitch | One staff per array in pitches. |
| *rhythm | Makes rhythm-maker-style LilyPond file. |
| comments | Gets comments of Lilypond file. |
| dateTimeToken | Gets date-time token. |
| defaultPaperSize | Gets default paper size of Lilypond file. Set to pair or nil. Defaults to nil. |
| globalStaffSize | Gets global staff size of Lilypond file. Set to number or nil. Defaults to nil. |
| headerBlock | Gets header block. |
| includes | Gets includes of Lilypond file. |
| items | Gets items in Lilypond file. |
| layoutBlock | Gets layout block. |
| lilypondLanguageToken | Gets Lilypond language token. |
| lilypondVersionToken | Gets Lilypond version token. |
| paperBlock | Gets paper block. |
| scoreBlock | Gets score block. |
| useRelativeIncludes | Is true when Lilypond file should use relative includes. |
| format | Formats Lilypond file. |
| at | (abjad: getitem) |
| illustrate | Illustrates Lilypond file. |
| asCompileString | Gets interpreter representation of Lilypond file. |
Example
a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/4]));
f = FoscLilypondFile(a);
f.show;
Set proportional notation duration.
a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/4]));
f = FoscLilypondFile(a);
b = f.layoutBlock['Score'];
if (b.isNil) { b = FoscContextBlock(sourceLilypondType: 'Score') };
f.layoutBlock.items.add(b);
set(b).proportionalNotationDuration = FoscSchemeMoment([1, 20]);
f.show;
One staff per array in pitches.
FIXME: Lilypond compile fails, error: cannot find file: `../stylesheets/default.ily’
a = (60,60.25..71);
b = (60..53);
f = FoscLilypondFile.pitch([a, b]);
f.show;Makes rhythm-maker-style LilyPond file.
Used in rhythm-maker docs.
Returns LilyPond file.
Make a rhythmic staff.
d = #[[3,4],[4,8],[1,4]];
m = FoscLeafMaker();
x = [m.(64 ! 6, 1/8), m.(64 ! 8, 1/16), m.(64 ! 2, 1/8)];
x.do { |each| each.beam };
f = FoscLilypondFile.rhythm(x, d);
f.show;
!!!TODO: functionality removed - bring it back?
Set time signatures explicitly.
d = #[[3,4],[4,8],[1,4]];
m = FoscLeafMaker();
x = [m.(64 ! 6, 1/8), m.(64 ! 8, 1/16), m.(64 ! 2, 1/8)];
x.do { |each| each.beam };
t = #[[6,8],[4,8],[2,8]];
f = FoscLilypondFile.rhythm(x, t);
f.show;
Make pitched staff.
d = #[[3,4],[4,8],[1,4]];
m = FoscLeafMaker();
x = [m.(64 ! 6, 1/8), m.(64 ! 8, 1/16), m.(64 ! 2, 1/8)];
x.do { |each| each.beam };
f = FoscLilypondFile.rhythm(x, d, pitchedStaff: true);
f.show;
Adjust horizontal spacing with stretch. Defaults to 1.
m = FoscRhythmMaker().(divisions: [1/4], ratios: #[[2,1],[3,2],[4,3]]);
f = FoscLilypondFile.rhythm(m, stretch: 4);
f.show;
!!!TODO: not yet working
Make simultaneous voices.
d = #[[3,4],[4,8],[1,4]];
m = FoscLeafMaker();
x = [m.(64 ! 6, 1/8), m.(64 ! 8, 1/16), m.(64 ! 2, 1/8)];
x.do { |each| each.beam };
x = FoscSelection(x).flat;
y = [m.(60 ! 12, 1/16), m.(60 ! 16, 1/32), m.(60 ! 4, 1/16)];
y.do { |each| each.beam };
y = FoscSelection(y).flat;
a = ('Voice_1': x, 'Voice_2': y);
f = FoscLilypondFile.rhythm(a, divisions: d, attachLilypondVoiceCommands: true);
f.show;
Use implicitly when displaying state of rhythm-makers.
a = FoscRhythmMaker();
a.(divisions: [1/4], ratios: #[[2,1],[3,2],[4,3]]);
a.show;
Gets comments of Lilypond file.
Example
a = FoscLilypondFile();
a.comments.postln;[ ]Gets date-time token.
FIXME: this returns ERROR: NotYetImplementedError when run by make, works fine in emacs…
a = FoscLilypondFile();
a.dateTimeToken.postln;Gets default paper size of Lilypond file. Set to pair or nil. Defaults to nil.
Example
a = FoscLilypondFile();
a.defaultPaperSize.postln;Gets global staff size of Lilypond file. Set to number or nil. Defaults to nil.
Example
a = FoscLilypondFile();
a.globalStaffSize.postln;Gets header block.
Returns block or nil.
Example
a = FoscLilypondFile();
a.headerBlock.name.postln;'header'Gets includes of Lilypond file.
Example
a = FoscLilypondFile();
a.includes.postln;[ ]Gets items in Lilypond file.
Example
a = FoscLilypondFile();
a.items.postln;List[ FoscBlock.new, FoscBlock.new, FoscBlock.new, FoscBlock.new ]Gets layout block.
Returns block or nil.
Example
a = FoscLilypondFile();
a.layoutBlock.name.postln;'layout'Gets Lilypond language token.
Example
a = FoscLilypondFile();
a.lilypondLanguageToken.postln;FoscLilypondLanguageToken.newGets Lilypond version token.
Example
a = FoscLilypondFile();
a.lilypondVersionToken.postln;FoscLilypondVersionToken.newGets paper block.
Returns block or nil.
Example
a = FoscLilypondFile();
a.paperBlock.name.postln;'paper'Gets score block.
Returns block or nil.
Example
a = FoscLilypondFile();
a.scoreBlock.name.postln;'score'Is true when Lilypond file should use relative includes.
Example
a = FoscLilypondFile();
a.useRelativeIncludes.postln;falseFormats Lilypond file.
Returns string.
(abjad: getitem)
Gets item with name.
Returns item.
Raises key error when no item with name is found.
Illustrates Lilypond file.
Returns Lilypond file unchanged.
Gets interpreter representation of Lilypond file.
Returns string.