[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bulk] Re: Adding an extra staff
From: |
Vivian Barty-Taylor |
Subject: |
Re: [Bulk] Re: Adding an extra staff |
Date: |
Tue, 26 Aug 2008 21:58:00 +0200 |
Hi Alistair, hi list,
I debugged this code in 2.10.33, but it should work in 2.11
I've never started Staff contexts "on the fly" - didn't even know it
was possible, but as you see it leads to unforeseen problems. In
Lilypond the brackets << >> mean "interpret these contexts
simultaneously". That was one of the problems with your code - that
by starting the Staff context within the other one, Lilypond got
confused about how to do this (I suppose it has something to do with
Context hierarchy, but I'm not a programmer, so don't ask me!)
Here is a debugged version of your code. You can enter any notes you
want in the three variable definitions above - staffOne, staffTwo,
staffThree . This is much cleaner than your code, where you had typed
the notes directly into the context.
By the way, the brace at the beginning of the PianoStaff isn't
printing - I think this has to do with you having a StaffGroup within
a PianoStaff - you could try removing it (it isn't really necessary)
and see if the brace prints then.
Hope this helps, and good luck using Lilypond.
All the best,
Vivian.
%%%%% Begin code snippet
\version "2.11.56-1"
staffOne = {
\time 4/4 g8 a b c d c b a %scale 1
gis ais c des es des c bes %scale 2
a b cis d e d cis b %scale 3
c d e f g f e d %scale 4
es f g aes bes aes g f %scale 5
}
staffTwo = {
r1
gis4 gis gis gis
a1
c4 c c c
r1
}
staffThree = {
\set Staff.firstClef = ##f
\stopStaff
s1*2
\startStaff a8 g a g a g a g \stopStaff
s1*2
}
\score {
<<
\new PianoStaff <<
\new Staff \relative c'' { \staffOne }
\new StaffGroup <<
\new Staff \relative c'' { \staffTwo }
\new Staff \with { \remove
"Time_signature_engraver" } \relative c'' { \staffThree }
>>
>>
>>
}
%%% End code snippet
On Aug 26, 2008, at 6:50 PM, alistair zaldua wrote:
Hi Orm,
thanks a lot for your help.
> what you're trying to do seems to be creating a staff system on the
fly,
-Yes, that's exactly what I was trying to do, only I had copied out
the example provided by the LSR archive:
file:///Users/alistairzaldua/Documents/Lilypond%20Stuff/Lilypond-
texts/lilypond-2.11.56-1.documentation/input/lsr/lilypond-snippets/
Staff-notation.html#Staff-notation
I used your example but unfortunately it wouldn't parse, I also
tried trouble-shooting using the % trick, but I still couldn't
locate the error, the message being:
/Applications/LilyPond-2.11.56-1.app/Contents/Resources/share/
lilypond/current/ly/init.ly:49:66: error: syntax error,
unexpected $end
(ly:parser-error parser (_ "expected error, but none found"))))
I think your suggestion of creating contexts is definitely the way
to go, so will look into that.
Greetings,
alistair
_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user