From what I understand in the docs/code, Music21 output to Vexflow seems to be done through Music21j, which I find myself unable to get running. Isn't there an actual Vexflow output possible?
So, instead of getting something like this (output of getJSBody
):
require(['music21'], function() {
var pickleIn = {"hi": "hello"};
var jpc = new music21.fromPython.Converter();
...
});
...getting actual Vexflow code:
var vf = new Vex.Flow.Factory({renderer: {elementId: 'boo'}});
var score = vf.EasyScore();
var system = vf.System();
...
Sorry in advance if I'm missing something obvious...
Unfortunately that code — which was brilliant and way ahead of its time when it came out — hasn’t been maintained and doesn’t fully work with recent Vexflow.
Music21j plus JSONPickle is now the preferred way to transmit data from Python to JavaScript. But you’ll need to deconstruct the source for how MIDI files are rendered in Jupyter/IPython notebooks to make sense of it. Docs for this have fallen behind.