lilypond-user
[Top][All Lists]
Advanced

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

Re: Changing polyphonic per-voice rest position


From: Mats Bengtsson
Subject: Re: Changing polyphonic per-voice rest position
Date: Wed, 04 Jan 2006 12:47:27 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511



Nicholas Bailey wrote:

..., so I went off on the tangent of trying to get something like \override VoiceOne.Rest ... to work (which of course I couldn't).

Of course you can, but not exactly with that syntax. If you read in
"6.6.2 Explicitly instantiating voices", you will learn that the Voice contexts created by <<{...} \\ {...} >> are called "1" and "2", respectively. To do a setting
that always applies to the upper voice when you have polyphony, you have to

- Explicitly instantiating the Voice context "1" in parallel with the real music,
 already from the top of the score and do the settings there.

- make sure that this context is kept alive over the full score, by adding
 spacer notes corresponding to the full duration of the score.

In your example:

\version "2.6.3"

\header {
   title    = "Ut, re, mi, fa, sol, la."
   composer = "John Bull"
}

\score {

\new GrandStaff <<
    \new Staff <<
       \context Voice = "1" {
          \override Rest #'staff-position = #0
           s1*11
          }
       \context Voice = "2" {
          \override Rest #'staff-position = #-11
           s1*11
          }
       \new Voice {
          #(set-accidental-style 'voice)

          %% Bar 1
          \time 3/1
         g1 a  << b \\ {r2 g} >>

         %% Bar 2
         \time 4/1
         << {c'1 d'} \\ {a2 c'~ c' b2:16} >>
         << {e'1 e'} \\ {c'4 g c'2~ c'4 b g a } >>

         %% Bar 3
         << b1 d' >>
         << a c' >>
         << {r2 d'~ d' c'~} \\ {b1 a} >>

      }
    >>

    \new Staff <<
       \context Voice = "1" {
          \override Rest #'staff-position = #3
           s1*11
          }
       \new Voice {
          #(set-accidental-style 'voice)
          \clef bass

          %% Bar 1
         r2 g~ g f << r1 \\ {e2. d4}  >>

         %% Bar 2
         << r2 \\ c2 >>
         << {g1 f2 e2. d4 c d e c} \\ {e2 d1 c2 a,~ a,4 b, c2} >>

         %% Bar 3
         << {g4 d} \\ b,2 >>
         << {g2~ g4 e fis2} \\ {a,4 g, a,1} >>
         << g2 \\ {g,4 a,} >>
         << {g2~ g4 f f2} \\ {b,4 c d2 a,} >>
      }
    >>
>>

\layout {
   \context {
       \Staff
       \remove Time_signature_engraver
   }
}

} % end of score



   /Mats




reply via email to

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