lilypond-devel
[Top][All Lists]
Advanced

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

Re: Cross-staff arpeggios


From: Mats Bengtsson
Subject: Re: Cross-staff arpeggios
Date: Thu, 01 Nov 2007 10:11:45 +0100
User-agent: Thunderbird 2.0.0.5 (X11/20070716)

Cross-staff arpeggios already work in StaffGroups and GrandStaffs, without
adding any extra engraver:

   \score {
     \new StaffGroup {
       \set StaffGroup.connectArpeggios = ##t
       <<
         \new Staff \relative c' {
           <e g>4\arpeggio
         }
         \new Staff  \relative c {
           \clef bass
           <c e>4\arpeggio
         }
       >>
     }
   }


   /Mats

Eyolf Østrem wrote:
In the section about arpeggios in the documentation, there is an
example of cross-staff arpeggios in a PianoStaff context:

    @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
    \new PianoStaff <<
      \set PianoStaff.connectArpeggios = ##t
      \new Staff { <c' e g c>\arpeggio }
      \new Staff { \clef bass <c,, e g>\arpeggio }
    >>
    @end lilypond

There should also be something there about how to accomplish this in
other kinds of contexts as well. There is one example in the LSR of
arpeggios between voices in the same staff, and building on that, I
made the following, more general example.
    The same can be accomplished in contexts other than
    @code{PianoStaff} if the @code{Span_arpeggio_engraver} is included
    in the Score context.

    @lilypond[quote,ragged-right,verbatim]
    \score {
      \new StaffGroup {
        \set Score.connectArpeggios = ##t
        <<
          \new Staff \relative c' {
            <e g>4\arpeggio
          }
          \new Staff  \relative c {
            \clef bass
            <c e>4\arpeggio
          }
        >>
      }
      \layout {
        \context {
\Score \consists "Span_arpeggio_engraver" } }
    }
    @end lilypond

My questions are:
1. Is it correct that the Span_arpeggio_engraver should be included in
the Score context? I've tried to include it in StaffGroup, but that
has no effect: the arpeggios just disappear.

2. Is there a more elegant way to write the example? E.g. to avoid the
\layout section?


Eyolf




--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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