Search code examples
lilypond

Is it possible to completely disable the bar check?


I would like to completely disable the bar check and auto bar placing functions, but manually add bar lines when necessary. Is it possible to do so?

I'm recording some traditional music which is quite impossible to meet the normal rhythm. Currently I have to write different time signature in almost every measure to meet the length, like:

\relative c'' {
    \time 4/4 c4 c c2 | \time 3/4 c2 c16 c8. | \time 2/4 c4 c4 |
}

I suppose that disabling the bar check will make it simpler.


Solution

  • Sure. \cadenzaOn does that. And I think that you are right: you have got no good use for bar checks in your music, it’s better to turn them off.

    You can then use \bar "|" for manual bar lines. Also in cadenzas Lilypond doesn’t know how to do automatic beaming, so you may want to place beams yourself using [ and ].

    \version "2.24.3"
    
    \new Staff \with { \remove Time_signature_engraver }
        \relative c'' {
            \cadenzaOn
            c4 c c2 \bar "|"
            c2 c16[ c8.] \bar "|"
            c4 c4 \bar "|"
        }
    

    enter image description here

    Lilypond may break lines at any manually inserted bar line:

    enter image description here

    The music set in the latter example was:

            \cadenzaOn
            c4 c c2 \bar "|"
            c2 c16[ c8.] \bar "|"
            c4 c4 \bar "|"
            2 4 8 8 \bar "|"
            4. 8 \bar "|"
            4. 16 16 4 \bar "|"
            4 c \bar "|"
            4. 8[ c c] \bar "|"
            2 \bar "|"
    

    It’s easy to confuse the bar check done by | and the bar line that Lilypond inserts automatically at its discretion and can also be inserted manually as shown. Because usually both happen at the same places in the music. The two are really unrelated in Lilypond (except for the indirect connection: if the bar check succeeds, Lilypond will obviously place a bar line at that point unless instructed not to). So better decide which of the two you want, the bar check or the bar line.

    Link to Notation Reference: Unmetered music