openlilylib / snippets

A place to store useful pieces of LilyPond code - custom functions, engravers, hacks, templates, examples etc.
Other
120 stars 38 forks source link

Handle bar numbers in GridLY cells #101

Closed uliska closed 9 years ago

uliska commented 9 years ago

When using \gridSetRange there's an issue with barnumbers because they're not changed. So the retrieved music doesn't have a notion that it is starting from somewhere in the score.

This means that displayed barnumbers will be wrong, and that barnumber checks defined in the music or templates will fail.

I suggest:

The barnumber to be used should be the one at the beginning of the content (ignoring the opening). This would encourage people to use barnumber checks and relieve them from entering them inside the music definitions.

Cecca commented 9 years ago

You are right. As of now I wasn't affected by this issue because my "La Bomba" project has all the bar numbers set inside the opening and in the music definition, as you can see here. So I failed to identify this issue.

I like your suggestion of adding a property to the \with {} block. This way one can define bar numbers in the template definition and have it used by all the other parts.

I'll think about the best way to do this, an implementation should be ready in the weekend.

Cecca commented 9 years ago

@uliska please have a look at the changes in 14c763021dfcd53733bb2147ca6a5adfdb84f688. That should fix the issue

uliska commented 9 years ago

Yes, it does..