seisiuneer / abctools

ABC Transcription tools based on abcjs
MIT License
41 stars 24 forks source link

[Feature Request] add an abc2xml.js script #9

Closed zaun closed 5 months ago

zaun commented 5 months ago

Would love an abc2xml.js that does the opposite of xml2abc.js so its is possible to go back and forth between the 2 formats.

seisiuneer commented 5 months ago

@zaun I wish there were such a thing too, but sadly there is no open source Javascript library that can do this.

The easiest way to get MusicXML out of ABC with the tool is to export the tune as MIDI from the "Export Audio or Image" dialog on the Player, import the MIDI into MuseScore 4, and then export it from MuseScore 4 as MusicXML.

You can download MuseScore 4 for free at:

https://musescore.org/en/download

seisiuneer commented 5 months ago

@zaun I've added the ability to export your ABC in MusicXML format just by specifying .xml as the file extension when you save a file.

The ABC to MusicXML conversion is being done using Willem Vree's abc2xml Python tool that I've converted to a web service and am hosting as a Flask application at pythonanywhere.com

Because of how abc2xml works, the ABC to MusicXML conversion is limited to the first tune in the ABC editor area so if you need to convert an entire tunebook from ABC to MusicXML, you will need to do it one tune at a time.

The resulting MusicXML files can be opened back in the tool.

Demo video:

https://youtu.be/EuhJAjDv6GQ

seisiuneer commented 5 months ago

@zaun

Now there is a new "Export All Tunes as MusicXML" button on the "More Tools"/"Export All Tunes" dialog (only available on desktop browsers).

When clicked, each ABC tune in the editor will be exported to its own MusicXML file with the same name as the tune. This works the same way for one tune or a hundred.

The ABC to MusicXML conversion is being done using Willem Vree's abc2xml Python tool that I've converted to a web service and am hosting as a Flask application at pythonanywhere.com

You can still save the first tune in the ABC text editor as MusicXML by clicking "Save" and then specifying a .xml extension for the file.

Demo video https://www.youtube.com/watch?v=ecxJQHD4FMQ