Hello,

I currently work on a mass setting by Palestrina. The music is stored in variables sopranoK, altoK, tenorK, bassK, sopranoVerseK, …, sopranoG, altoG, etc. etc. for the different parts and movements. Now since I need a separate \score block for each movement, but these score blocks will all be identical except for the single letter appended to the variables, I thought it would be elegant to define a music function like (in short)
scoreSetup =
#(define-music-function
(parser location letter)
(string?)
#{
\score {
\new Staff = "bassus" \with { instrumentName = "bassus" }
% this is supposed to give the same result as @code{\bassK} for example…
#(string->identifier (string-append "bass" $letter))
}
#}
)

Unfortunately, there is no such procedure like string->identifier in Scheme and string->symbol doesn’t work. Can you help me (as a newbie in Scheme) to find a working solution?
Thanks in advance,

Simon

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

Reply via email to