Hi,

I've been pondering about a missing feature in LilyPond, namely the possibility to get a warning printout if there isn't an explicit bar check ("|") in the input file at the end of each measure. This would catch many of the typos I personally do when entering music, where I happen to forget to change a duration, or enter the wrong duration, so that the current default duration happens to be, say, double the correct duration.

Example: Let's say I want to type

\relative c' {
c4 d e2 |
g1 |
g4 f e d |
c1
}
but forget to add the duration "4" in the third measure:\relative c' {
c4 d e2 |
g1 |
g f e d |
c1
}
Obviously, this will not give any bar check warning, but if there was a possibility to get a warning also for missing bar checks, I would immediately catch those mistakes. This feature should not be on by default, but for those of us who consequently add bar checks in the input files, it would be extremely helpful.

In another email thread today, Valentine provided an implementation of a Bar_check_warning_egraver is somewhat along the same lines, but that unfortunatly fails to catch the typo in the above example since it only detects notes  where the duration crosses a bar line. As far as I can see, the idea of Valentine's implementation cannot easily be extended to do what I'm after and it's not immediately obvious to me how hard it would be to implement it. Perhaps some of you clever LilyPond hackers on the list have an idea, otherwise I will send it as a feature request to the bug list.

   /Mats

Reply via email to