[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: adding to context voice conflicts with instrumentname
From: |
Trevor Daniels |
Subject: |
RE: adding to context voice conflicts with instrumentname |
Date: |
Wed, 30 Jan 2008 17:59:33 -0000 |
Hi Simon
Your problem is using {..} after \new Staff instead of
<<..>>. I'm not sure I fully understand why, nor do
I have 2.10 available to check, but I think what happens
is that the first Voice="V" is placed in the first staff,
but too late for the second Voice="V", which has already
created a new default staff for itself. Maybe Mats can
iluminate further.
Anyway, it is always a good idea to use angle brackets
after \new Staff just to avoid this kind of problem.
I think this works OK:
\score {
<<
\new Staff <<
\set Staff.instrumentName = "name"
\new Voice = "V" { d'2 e' f' g' f' e' d'1 }
>>
% other Staves and Voices go here
\context Voice = "V" { s2 \hideNotes s1 \unHideNotes }
>>
}
An alternative method which might be better is to define
your hidenotes with spacers in a variable which is then
included in parallel with the real music. But the variable
definition has to go before the \score, like this:
hideControl = { s2 \hideNotes s1 \unHideNotes }
\score {
<<
\new Staff <<
\set Staff.instrumentName = "name"
\new Voice = "V" <<
{ d'2 e' f' g' f' e' d'1 }
\hideControl
>>
>>
% other Staves and Voices go here
>>
}
Trevor D
> -----Original Message-----
> From: address@hidden
> [mailto:lilypond-user-bounces+t.daniels=treda.co.u
> address@hidden Behalf Of
> Simon Van Damme
> Sent: 28 January 2008 13:17
> To: address@hidden
> Subject: adding to context voice conflicts with
> instrumentname
>
>
> Dear all
>
> By means of the (simplified) code below, I wish
> to hide some part of the
> original music using "\context Voice = ...". It
> is important that the
> original notes and the hide/unhide specifications
> remain separated
> (ideally they come at the end of the score-block)
>
> Problem: this stops working when I add an
> instrumentname to the original
> data. Suddenly, the additions go in a separate
> Staff. Does anyone knows
> where this conflict arises, so that I can sort it out?
>
> Many thanks
>
> Simon
> Musicology Department
> K.U.Leuven (Belgium)
>
> --- CODE ---
>
> \version "2.10.33"
> \score { <<
> \new Staff {
> \set Staff.instrumentName = "name" %
> OMITTING THIS LINE ...
> \new Voice = "V" { d'2 e' f' g' f' e' d'1 }
> }
> % other Staves and Voices go here
> \context Voice = "V" { s2 \hideNotes s1
> \unHideNotes } % ...
> MAKES THIS LINE WORK PROPERLY
> >> }
>
> Disclaimer:
http://www.kuleuven.be/cwis/email_disclaimer.htm
_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user