[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: RE: adding to context voice conflicts with instrumentname
From: "Trevor Daniels" <t.daniels () treda ! co ! uk>
Date: 2008-01-30 17:59:33
Message-ID: HMEAIFMOBALPLHPPKCNHOEPBEAAA.t.daniels () treda ! co ! uk
[Download RAW message or body]
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: lilypond-user-bounces+t.daniels=treda.co.uk@gnu.org
> [mailto:lilypond-user-bounces+t.daniels=treda.co.u
> k@gnu.org]On Behalf Of
> Simon Van Damme
> Sent: 28 January 2008 13:17
> To: lilypond-user@gnu.org
> 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
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic