jca...@web.de writes: > Good day, > > following snippet I need very frequently (with different notes instead > of c4 and e4): > > \afterGrace c4 \glissando {\once \hide Stem \parenthesize e4} > > > That's why I wanted to create a music function to shorten the > expression. My previous attempt: > > graceGliss = > #(define-music-function > (starttone endtone) > (ly:music? ly:music?) > #{ > \afterGrace #starttone \glissando {\once \hide Stem > \parenthesize #endtone} > #}) > > > doesn't work, Return Code 1. > > In order to test the general functioning of define-music-function, I tried: > > graceGliss = > #(define-music-function > (starttone endtone) > (ly:music? ly:music?) > #{ > \afterGrace #starttone #endtone > #}) > > > which works, what leads me to believe that the error must have something > to do with the curly brackets {} … > > > For some help I'd be very grateful!
Kind of stupid, but Scheme syntax is very simplistic (almost anything except for parentheses needs to be space-separated) and your problem here is that # goes into Scheme. So you call upon one Scheme variable endtone} which does not exist. Put a space before the closing brace. -- David Kastrup