What's the right way to define a function that assigns string values
to LilyPond variables? I'm trying to create a function in an include
file that allows me to assign different values to variables used as
midi instrument specifiers.
%--------------------------------------------------------
setMainCueClapInstruments=
#(define-music-function (p l main cue clap) (string? string? string?)
   #{
       mainInstrument = #$main
       cueInstrument  = #$cue
       clapInstrument = #$clap
   #}
   (make-music 'SequentialMusic 'void #t))
\setMainCueClapInstruments #"cello" #"acoustic grand" #"woodblock"
%--------------------------------------------------------
But the parser throws errors, starting with the following ...
Parsing...
<string>:2:7: error: syntax error, unexpected STRING

       mainInstrument = #lilyvartmpbg

I'm using LilyPond 2.14.1

Thanks,
Mike

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

Reply via email to