This is brilliant, thanks Tina!
I'd like to say as an overall point that I really appreciate your continued
taking me on for my more extreme ideas,
it's not the first time I get really creative insights from you, and I am
grateful for that.
I see your functions do the vast majority of what I'd like to get from this.
If I rework them, is there a fundamental impediment to getting my original
form to work,
where the first argument gives you the parsing modes and variable names,
and the effect of the call
is to define several variables with the contents?
This is because the bottom part, where I assemble the score "manually" is
actually useful for me to see explicitly,
whereas having rolled into the macro expansion like you have it obscures
that part.
In my head instead of regex matching like you're doing I would simply split
on "|", compile lists, and assemble a list of strings like
"chord = \chordmode {c2. c2.:7/g}" "voiceA = \nodemode { c2 e8 c e2 d4 }"
...
and pass those to read-lily-expressions-internal, like you're doing in your
example.
Can that be a thing, or would this pose a problem I'm not seeing?
Many many thanks,
Luca
--
Luca Fascione