lilypondmetermusic-notation

Lilypond: repeat bar line do not show in polymeter music


I am working with some polymetric music (i.e., different time signatures for individual instruments), and obviously the bar lines will not always coincide. To do this, I substitute the layout { } for the following code:

\layout { 
  \context { \Score 
    \remove "Timing_translator" 
    \remove "Time_signature_engraver" 
    \remove "Default_bar_line_engraver" 
  } 
  \context { \Staff
    \consists "Timing_translator" 
    \consists "Time_signature_engraver" 
    \consists "Default_bar_line_engraver" 
} 

Everything now works fine, except for the bar line engraver... if I try to add repeat bar lines, they will not appear in the final score! Not only that, but actually there will be NO bar lines at all on those points! Here is a complete example:

\version "2.17.24"
A =  { 
  \time 2/4 
  c'4 e' \bar "|:" g' c'' \bar ":|" e'' g'' \bar "|."
}
B = {
  \time 3/4              
  c''4 g' e' \bar "||" c' g c' \bar "|."
}
\score {
  <<
    \new Staff \A
    \new Staff \B
  >>
  \layout { 
    \context { \Score 
        \remove "Timing_translator" 
        \remove "Time_signature_engraver" 
        \remove "Default_bar_line_engraver" 
    } 
    \context { \Staff
        \consists "Timing_translator" 
        \consists "Time_signature_engraver" 
        \consists "Default_bar_line_engraver" 
    } 
  }  
} 

This code produces: enter image description here

Note how NO bar lines are shown on staff A. If we remove the /bar "|:" and /bar ":|", thus having A as simple as...

A =  { 
  \time 2/4 
  c'4 e' g' c'' e'' g'' \bar "|."
}

... the bar lines will show normally:

enter image description here

What can I possible do to solve this problem?


Solution

  • The bar line engraver on the version 2.17 went through a lot of modifications when compared to older versions. The bar lines are not appearing due to wrong code. Here is the list with all correct bar lines commands for Lilypond 2.17:

    http://www.lilypond.org/doc/v2.17/Documentation/notation/bars