lilypond-user
[Top][All Lists]

## Re: two questions compile (times maybe) and question on barline repeats

 From: Graham Percival Subject: Re: two questions compile (times maybe) and question on barline repeats Date: Fri, 30 Dec 2005 20:09:52 -0800


On 30-Dec-05, at 7:10 PM, Jay Hamilton, Sound and Silence wrote:


Graham- I didn't upgrade, and I did add a few lines of rests before it stopped compiling. I get nothing , no error no command box nothing.


This is odd; at the very least it should spit out a "segfault" or something.


That's why I asked the question. I'll try to go back and delete the added material until it will compile and start from there.

Don't delete it; just comment it out.  :)


I didn't/ don't use repeat as I thought that was mainly to get the midi to sound right and I don't care about midi for this.
Please correct me if I misunderstand.



\repeat has no effect on midi, unless you use \unfoldRepeats (or something like that).


Actually, not using \repeat is the cause of the problem here. You can only have one \bar command on each bar line. So lilypond sees the \bar ":|" command at the end of one line, but that gets overwritten by the \bar"|:" command for the start of the next bar (which is still the same barline).

Using \repeat avoids this problem; see below.  (excerpt)

...
\time 4/4
#(set-global-staff-size 20)

\repeat volta 2 {
\bar "|:"
<c c' e>4^\markup {"#1"} <e c' e> <g c e> <c, c' e>
<b d' f> <d d' f> <g d' f> <b, d' f> } \break
\repeat volta 2{

\times 2/3 {c8^\markup {"#2"} c' e} \times 2/3 {e, c' e} \times 2/3 {g, c e}
         \times 2/3 {c, c' e} \times 2/3 {b, d' f} \times 2/3 {d, d' f}
\times 2/3 {g, d' f} \times 2/3 {b,, d' f}
} \break
...


I only did two lines; you can fix the other lines in a similar way. Note that you still need an explicit \bar "|:" at the beginning of the piece.

BTW, this email was sent to the correct addresses.  :)

Cheers,
- Graham