Le 30/12/2022 à 00:19, Alasdair McAndrew a écrit :
Thank you SO very much! Such a simple thing ... (as is so often the case, certainly with my queries).  It now works perfectly.


Well, as a matter of fact, you're not the first one tripped up by this.

Makes me wonder if we should make it possible to do it like

dStop =
#(define-music-function
     (topnote bottomnote)
     (ly:music? ly:music?)
   #{
    << {\topnote} \\ {\bottomnote} >>
   #})


Unlike # which starts a block in Scheme syntax, \ is LilyPond
syntax and stops at a brace or such. It also makes a copy, which
avoids problems like the one explained here:
https://lilypond.org/doc/v2.25/Documentation/notation/how-to-prevent-sharing-of-music-expressions
However, it doesn't work right now for local variables,
like function parameters, in #{ ... #}.



Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to