infojunkie / musicxml-midi

MusicXML to MIDI converter via Musical MIDI Accompaniment (MMA).
https://blog.karimratib.me/demos/musicxml/
GNU General Public License v3.0
14 stars 2 forks source link

Generate groove MMA via XSL transformation #47

Closed infojunkie closed 3 months ago

infojunkie commented 3 months ago

Right now, the /groove API endpoint generates an MMA script for the groove in the server.js implementation directly. This is too limiting and will present maintenance challenges down the line.

Instead, we should generate an MMA script in XSL, like other transformations. This one, called groove.xsl, would accept the same incoming parameters and use those against an empty input to generate the groove script.

The /groove endpoint would be refactored to work like the current /convert endpoint.

infojunkie commented 3 months ago

As per https://stackoverflow.com/questions/35382681/how-to-execute-a-xsl-transformation-without-input-xml-from-java it is possible to invoke a transformation, passing in a named template as the main template. The SaxonJS.transform() methods accepts an initialTemplate option for that.