lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Different start and end bars


From: Ted Frazier
Subject: Different start and end bars
Date: Thu, 14 Oct 2004 15:26:17 -0600

Lilypond is wonderful and fun but until I understand the object model can be frustrating...!!!
 
I am transcribing exercises and want behavior that is not standard. Liliypond, with it's smarts, will start a new line of music with no bar or the same bar that ended the previous line. I want to end every line of music with a :| bar and start every line with a | bar. Take the following code:
startBar = \notes { \once \override Staff.BarLine #'before-line-breaking-callback = ##f \bar "|" }
\score {

\new Staff \with { \remove "Clef_engraver" } {

\override Score.TimeSignature #'break-visibility = #end-of-line-invisible

\notes {

\startBar
\time 4/4 f' a' c'' e'' \bar "|"
\time 4/4 f' a' c'' e'' \bar "|"
\time 4/4 f' a' c'' e'' \bar "|"
\time 4/4 f' a' c'' e'' \bar ":|" \break

\startBar
\time 4/4 f' a' c'' e'' \bar "|"
\time 4/4 f' a' c'' e'' \bar "|"
\time 4/4 f' a' c'' e'' \bar "|"
\time 4/4 f' a' c'' e'' \bar ":|" \break
}}}

The first line of music ends with | and not :| as one might think. But if I comment out the second \startBar command, the first line ends with :| and the second line has no start bar. I have tried many ways of getting around this and finally found one where I change the glyph in the overridden BarLine print function by changing the glyph at hard coded indices.
 
There's got to be a better way. Any ideas? Thanks...
 
Ted Frazier
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]