lilypond-devel
[Top][All Lists]
Advanced

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

Re: cross-staff versions of \arpeggioArrowUp etc.


From: Mark Polesky
Subject: Re: cross-staff versions of \arpeggioArrowUp etc.
Date: Tue, 4 Aug 2009 21:23:36 -0700 (PDT)

Neil Puttock wrote:
> Sorry to throw a spanner in the works, but have you considered what
> will happen if an innocent user adds the Span_arpeggio_engraver to the
> Staff context in order to span voices on one stave?

Can you give an example that fails? (You may want to read my reply to
Joe first before you spend any time concocting something - see below)
At least the example from the docsworks:
\new Staff \with {
  \consists "Span_arpeggio_engraver"
}
\relative c' {
  \set Staff.connectArpeggios = ##t
  <<
    \arpeggioArrowDown
    { <e' g>4\arpeggio <d f> <d f>2 } \\
    { <d, f>2\arpeggio <g b>2 }
  >>
}


> A few nitpicks:
> 
> (not (null? parent))
> (not (null? origin))
> ly:context?

Changed - thanks.

> (let* ((Arpeggio
> arpeggio (or something else without the capital letter)

What's bad about the capital letter? I capitalized it because it's
a grob-name and grob-names are capitalized. Does the same problem
extend to the X-extent binding one line below?

Thanks Neil!


Joe Neeman wrote:

> I'd like to second Neil's objection regarding the hard-coding of
> GrandStaff/PianoStaff/StaffGroup as contexts containing
> Span_arpeggio_engraver. Given the flexibility of contexts and engravers
> in lilypond, it isn't a good idea to assume that certain contexts are
> the only ones to provide a particular functionality.

Is there a scheme procedure to test if a given context contains
a particular engraver? Like...
(context-has-engraver? context 'Span_arpeggio_engraver)
If not, is there a way to test that? I agree, my current solution
there isn't ideal.


> Also, one other minor comment:
> 
> you've written out the recursion twice: it should be
>         (let ((parent (ly:context-parent context)))
>           (if parent
>               (find-spannable-context parent)
>               #f))

Thanks. That was code from an earlier version that I forgot to
remove once it became redundant.

Thanks guys. Looking forward to the next round...
- Mark


      




reply via email to

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