Specifying number of measures per line

If you want to specify the number of measures per line, this Scheme engraver provides an alternative to inserting \breaks within your file or using an extra voice for line breaks. This is a convenient method for music that changes meter, and a quick way to duplicate the layout of a model.

The function takes a list of numbers describing a pattern which will repeat throughout the score. The example shows how to specify four measures per line. More numbers in the list will create a pattern of greater complexity. For example, \consists #(bars-per-line-engraver '(2 3 4)) defines lines of two, three, and four bars in succession. If the lengths add up to the length of the score, you've specified the length of each line individually.

The spacing engine will sometimes override your specifications if a line is too cramped as a result. To insist on your pattern, use the override of 'line-break-permission which is commented out in the example.