On Mon, Jan 28, 2013 at 10:03 AM, David Kastrup <d...@gnu.org> wrote:

> Olivier Biot <olivier.b...@gmail.com> writes:
>
> > Many thanks for your help David!
> >
> > Having used it I realize that it works perfectly for my purpose, but
> > maybe others may want to add e.g. fingerings, cautionary accidentals,
> > articulations and dynamics to the arpeggiated output. That of course
> > won't work with the current code for "arpeggiate" since I only look at
> > the notes.
> >
> > Imagine the following naive (not functional) snippet:
> >
> > \arpeggiate 16 c-< g'-1 b'!-3 f'-4-\!
> >
> > Ideally it would render the fingering either to the far left of the
> > arpeggio, or e.g. above each single note of the arpeggiated chord in
> > the first half (avoiding fingering repetitions).
> >
> > How could that be addressed?
>
> That involves, apart from the \relative aspect, deconstructing the above
> expression and synthesizing a new one from it.  There are no convincing
> user-level tools for deconstruction of a music expression short of
> picking everything apart in Scheme via ly:music-property and its ilk.
>
> There is some half-Scheme approach called with-music-match in the
> display-lily code.  Turning this into a proper and usefully powerful
> method working with LilyPond syntax templates, possibly combining it
> with the pattern-matching module available for GUILE would be an
> interesting task.
>
> But without a well-accessible more general transformation tool, I don't
> really see a real user-accessible solution that would not start from
> single pitches, thus not needing to deconstruct anything.
>

Thank you for explaining the complexity of my naive request. I apparently
managed to write a challenging trick question :-)

I suppose that, to get such a construct to work, one needs to:
1. change the argument type in 'arpeggiate' from 'ly:pitch' to something
else (maybe ly:music?)
2. separate "notes" (pitch & duration maybe) from their "extra"
(articulations, dynamics, fingerings, script etc).
3. do the relative / absolute pitch magic with 'make-relative'
4. reattach the "extra" bits to the right notes in 'arpeggiate'

Another approach could be to overlay the "extra" on the output of the
'arpeggiate' macro, similar to the 'changePitch' macro from LSR (
http://lsr.dsi.unimi.it/LSR/Item?id=654).

Thirdly, these "extra" bits could be provided as arguments of the
'arpeggiate' macro.

I don't think I can make any of the above work though :)

Best regards,

Olivier
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to