lilypond-user
[Top][All Lists]
Advanced

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

Re: Connected arpeggio between voices


From: Gilles
Subject: Re: Connected arpeggio between voices
Date: Thu, 1 Dec 2005 23:29:01 +0100
User-agent: Mutt/1.5.11

> See http://lists.gnu.org/archive/html/lilypond-user/2004-08/msg00236.html
> for a solution that hopefully can be upgraded to version 2.6.
> 

The following works:

%-----
upper = \relative c' {
  e'1\arpeggio |
}

lower = \relative c' {
  e1\arpeggio |
}

guitarStaffOne = \new Staff \with { \consists Span_arpeggio_engraver } {
  \set Staff.connectArpeggios = ##t
  <<
    \new Voice { \voiceOne \upper }
    \new Voice { \voiceTwo \lower }
  >>
}

\score {
  \guitarStaffOne
  \layout {}
}
%-----


But how can I achieve the same result using \context instead of \new ?
[I need the capacity to refer to a *named* context (because I set things
differently in different files).]
I tried the following (but that doesn't work, although it seems to be a
reasonable trial):

%-----
upper = \relative c' {
  e'1\arpeggio |
}

lower = \relative c' {
  e1\arpeggio |
}

guitarStaffTwo = \context Staff \with { \consists Span_arpeggio_engraver } = 
"Guitar" {
  \set Staff.connectArpeggios = ##t
  <<
    \new Voice { \voiceOne \upper }
    \new Voice { \voiceTwo \lower }
  >>
}

\score {
  \guitarStaffTwo
  \layout {}
}
%-----



Gilles




reply via email to

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