So a little more work this morning...
I copied in David's slashStem code and it seems perfectly compatible which is great (though it would be nice to have to option of putting the slash at the end of the group).
Also dynamic markings and spanners are handled now.
Things I'd like to add:
1) Variable horizontal distribution of stems... very useful for indicating jeté bow markings and the like.
2) Variable vertical distribution of stems... easy to do I think.
3) Slurs and articulations
It seems so easy to set beam positions outside of the function that I haven't added it (it shouldn't be too difficult) as I tend to prefer functions that don't have long lists of arguments which I can never remember :)
There seems to be a lot of duplication in this kind of function which makes me feel a little like I'm reinventing the wheel... is there a better way to harvest dynamics, articulations, markup and so on from the input music and apply these directly to the generated music? If not perhaps there is a better conceptual approach to take to these kinds of problems?
best,
piaras