Secondly, there's a quirk in variable substitution syntax. You need to
use the $var form, so the parser will see the ly:pitch? and ly:duration?
tokens as indicating a single note.
Ah, right. I understand now the manual means with "normal LilyPond input, using
$ (in places where only
Lilypond constructs are allowed) or
# (to use it as a Scheme
value or music function argument or music inside of music lists) to
(eg. ‘#arg1’)." So, every time the input type is ly:something, it should be with $, right?
Thank you so much, now my source is almost readable, and so much quicker!