[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: measures per system
From: |
David Nalesnik |
Subject: |
Re: measures per system |
Date: |
Fri, 21 Dec 2012 11:04:10 -0600 |
Hi Kieren,
On Tue, Dec 11, 2012 at 5:26 PM, Kieren MacMillan
<address@hidden> wrote:
> Hi David,
>
>> In the interests of making the user interface friendlier, I added a
>> feature for specifying repeats. You can now write something like this:
>> \consists #(bars-per-line-engraver '(5 7*5 1 3*3))
>
> Love it! Thanks.
>
> Is there an easy way of making an systems-per-page-engraver along the same
> lines?
> One that takes the systems as spit out by whatever system (automagic, manual
> breaks, bars-per-line-engraver, etc.) and then does the correct 'forcing'?
> This would be a great workaround for the current minimal-breaking
> overestimation problem…
Attached you'll find a engraver which seems to work. This is a
separate engraver from "bars-per-line-engraver," with the ungainly
name of "bars-per-line-systems-per-page-engraver."
Basically, you \consist the engraver to a context (I add it to Score
in the example, but others should now work). The numbers in the
argument--predictably enough--represent the bars for each system in
the score. To indicate the systems per page, you enclose groups of
these numbers in parentheses. So, the following \layout block
\layout {
\context {
\Score
\consists #(bars-per-line-systems-per-page-engraver '((4 4) (4 4 4) (1)))
}
}
will create a page will two four-bar systems, another with three
four-bar-systems, a third with one one-bar line,
and...
if you didn't account for all the bars in the score, LilyPond should
revert to normal line-breaking and pagination for the remaining
measures. There's no attempt here (as with the
"bars-per-line-engraver") to allow repeating patterns.
Shortcut--well, maybe not, but more user-friendly:
The above \consist line may be written like so:
\consists #(bars-per-line-systems-per-page '((4*2) (4*3) (1)))
Anyway, let me know if you run into problems with this, or have
suggestions for improvements.
Best,
David
bars-per-line-systems-per-page-engraver.ly
Description: Binary data