Returns a FoscBlock.
A LilyPond file block.
!!!TODO: update, using ‘instVarDict’ instead of ‘vars’ variable ??
| items | Gets items in block. |
| name | Gets name of block. |
| format | Formats block. |
| at | (abjad: getitem) |
Example
a = FoscBlock(name: 'paper');
a.leftMargin = FoscLilypondDimension(2, 'cm');
a.rightMargin = FoscLilypondDimension(2, 'cm');
a.format;\paper {
left-margin = 2\cm
right-margin = 2\cm
}Example
a = FoscBlock(name: 'header');
a.title_("Missa sexti tonus");
a.composer_("Josquin");
a.format;\header {
composer = \markup { Josquin }
title = \markup { "Missa sexti tonus" }
}Gets items in block.
Returns list.
Example
a = FoscBlock(name: 'score');
m = FoscMarkup('foo');
a.items.add(m);
a.items.postcs;List[ FoscMarkup.new ]Gets name of block.
Returns string.
Example
a = FoscBlock(name: 'score');
a.name.postln;'score'Formats block.
Returns string.
(abjad: getitem)
Gets item with name.
Returns item or nil.
Example
a = FoscBlock('score');
a.items.add(FoscScore(name: 'example_score'));
a.format;\score {
\context Score = "example_score" <<
>>
}a['example_score'].postcs;FoscScore([ ], 'Score', true, 'example_score')
a['foo'].isNil.postln;true