Thomas Morley <thomasmorle...@gmail.com> writes: > I'm ashamed I couldn't figure how to use a function with an optional > argument for it. > > Best I found is: > > #(define* (parenthesized-arpeggio #:optional (ctx "Bottom")) > #{ > \override #ctx . Arpeggio.stencil = #ly:arpeggio::brew-chord-slur > \override #ctx . Arpeggio.X-extent = #ly:grob::stencil-width > \revert #ctx . Arpeggio.dash-definition > #}) > > But it seems it isn't possible to use it like: > \parenthesized-arpeggio Staff > (like a music-function) > > @David K, any chance to make it work?
The normal optional argument definition style will work just fine. The problem is that with the optional argument coming _last_, you cannot omit it implicitly. You then have to write \parenthesized-arpeggio \default which is not really much of a saving as compared to spelling Bottom out. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user