I am trying to put custom notation for a piece for typewriter and electronics together and have devised a function for merging text and rhythm. It works fine as long as nothing else is involved, but interferes in some way with scripts and dynamics. Could any of you figure how and why? (The text becomes offset when dynamics or scripts are added)
Compiling your code with 2.25.1, I get
Uncommenting the dynamics gives me
Where is the problem? I don't see the letters being offset.
On the other hand: is it intentional that the letters are printed in an essentially arbitrary order? (The execution order of callbacks like NoteHead.stencil is not defined or guaranteed.)