Product SiteDocumentation Site

12.4.8. How to Avoid Errors

The LilyPond syntax has two built-in symbols for helping to avoid musical errors. The octave-check symbol ensures that your notes are in the octave you intend. The bar-check symbols ensures that your barlines are where you intend. The Octave-Check Symbol

The octave-check symbol compares a relative pitch with its absolute pitch equivalent. LilyPond prints a warning if the pitches do not match, then continues with the absolute pitch. You should correct the relative pitch when LilyPond prints a warning.
The octave-check symbols is =. The symbol appears after the note, and is followed by a comma (,), apostrophe ('), or neither, depending on the intended relative octave of the pitch.
Here is an example use of the octave-check symbol: c'='''. In this example, the absolute pitch is c''', which LilyPond knows because of the c at the left, and the ''' after the = symbol.
How does this example work: c'=4 ? There is a 4 after the = symbol instead of a comma or apostrophe. The absolute pitch is c, which LilyPond knows because of the c to the left of the = symbol, and because there is no comma or apostrophe to the right of the = symbol. LilyPond understands the 4 as "quarter note."
You should use the octave-check symbol when you need it. New users use the octave-check symbol more frequently than experienced users.