Le 30/12/2022 à 00:12, Alasdair McAndrew a écrit :
Hello,I am typesetting some late Renaissance, early Baroque music for which a double stop (= chord with two notes) on a stringed instrument would be notated with the stem of the top note up and the stem of the lower note down. So instead of using the standard notation<a e>4 for a double stop, I am using << {a4} \\ {e4} >>This is convenient as most of the music is with single notes, so I just bung in one of these when I need to.And I thought I'd be clever by writing this into a little Scheme function: dStop = #(define-music-function (topnote bottomnote) (ly:music? ly:music?) #{ << {#topnote} \\ {#bottomnote} >>
Try adding spaces here: << { #topnote } \\ { #bottomnote } >>Scheme is very lax about what can happen in identifiers. It mostly separates elements by spaces. Therefore, if you write no space between '#topnote' and '}', Scheme sees a reference to a variable called 'topnote}', which is the meaning of the error message
Unbound variable: #{topnote\x7d;}# Best, Jean
OpenPGP_signature
Description: OpenPGP digital signature