简体   繁体   中英

Music21 output to Vexflow

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM