lilypond-user
[Top][All Lists]
Advanced

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

Re: Agn: Switch polyrhythms in staffs


From: Neil Puttock
Subject: Re: Agn: Switch polyrhythms in staffs
Date: Mon, 26 May 2008 22:53:43 +0100

Hi Hajo,

2008/5/26 Hajo Dezelski <address@hidden>:
> Hello,
>
> sorry to ask again, but I am a newby who has read the manual, but did not
> understand everything.
>
> I have already set most of the Goldberg Variations BWV 988 and posted them
> to Mutopia but I have a real problem with Variation 26. It is not the notes
> which are already set.but the different measures and the change:
>
> On a Pianostaff I have an "upper" voice with \time 18/16 which I coded:
> \score ...
>  \new Staff = "upper" {
>           ...
>         \time 3/4
>         \set Staff.timeSignatureFraction = #'(18 . 16)
>         \compressMusic #'(4 . 6)
>         \soprano  }
>
> and  a lower staff:
>         \new Staff = "lower"  { ...  \time 3/4 \bass }
> ...
> }
>
> This works fine until I have to switch the measure to 3/4 in the upper and
> 18/16 in the lower staff. And I have to do that a lot of times. It seems
> that I force the time in the staff and can not change it.

The problem here is that you haven't really got a different time
signature in the upper stave, which means when you want to swap time
signatures, LilyPond thinks there's no change.

The solution is to move the Timing_translator and
Default_bar_line_engraver to the Staff context, then you can set
separate time signatures in each stave. The tricky part is to make
sure both parts are synchronized, so you'll still need to use
\compressMusic for the parts in 18/16.

Here's a quick snippet demonstrating the switch at bars 8-9:

\version "2.11.46"

upper = \relative c'' {
  \clef treble
  \key g \major
  \compressMusic #'(4 . 6) {
    \time 18/16
    \set Timing.measureLength = #(ly:make-moment 3 4)
    b16[ a b g fis g] d[ b a b d g] b[ g fis g b d] \bar "||"
  }
  \time 3/4
  \voiceOne
  << {
    g8. fis32 e d4 r8 b'
    \oneVoice
  }
  \new Voice {
    \voiceTwo
    b,4 b r8 g'
  } >>
}

lower = \relative c' {
  \clef bass
  \key g \major
  \time 3/4
  \voiceOne
  << {
    d8. b16 g4 r \bar "||"
    \oneVoice
  }
  \new Voice {
    \voiceTwo
    g4 g, r \bar "||"
  } >>

  \compressMusic #'(4 . 6) {
    \time 18/16
    \set Timing.measureLength = #(ly:make-moment 3 4)
    g16[ a g d e fis] g[ fis g a g a] b[ a b c b cis]
  }
}

\score {
  \new PianoStaff <<
    \new Staff = up \upper
    \new Staff = down \lower
  >>
  \layout {
    \context {
      \Score
      \remove "Timing_translator"
      \remove "Default_bar_line_engraver"
    }
    \context {
      \Staff
      \consists "Timing_translator"
      \consists "Default_bar_line_engraver"
    }
  }
}

Obviously, if you want the semiquavers and demisemiquavers
synchronized between staves (which is how the variation would be
performed), there's a bit more work involved with scaling durations in
the 3/4 sections.

Regards,
Neil




reply via email to

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