Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod, xm, s3m, it, MusicXML & verovio integration? #65

Open
VRDate opened this issue Jul 30, 2021 · 2 comments
Open

mod, xm, s3m, it, MusicXML & verovio integration? #65

VRDate opened this issue Jul 30, 2021 · 2 comments

Comments

@VRDate
Copy link

VRDate commented Jul 30, 2021

  1. https://github.com/deskjet/chiptune2.js is used as the web player at https://modarchive.org/index.php?request=view_by_moduleid&query=166351 Play all tracker formats supported by libopenmpt (including mod, xm, s3m, it) similar to https://github.com/martincameron/micromod a player library for the ProTracker MOD music format
    for Javascript (HTML5 Web Audio), Java, ANSI C (SDL) and Pascal (SDL).
  2. https://github.com/w3c/musicxml/releases/tag/v4.0 MusicXML 4 is the standard for import and export https://www.npmjs.com/package/musicjson is a MusicXML to MusicJSON bi-directional converter
  3. https://github.com/rism-digital/verovio/tree/develop-humdrum Verovio is a fast, portable and lightweight library for engraving Music Encoding Initiative (MEI) digital scores into SVG images. Verovio also contains on-the-fly converters to render Plaine & Easie Code, Humdrum, Musedata, MusicXML, EsAC, and ABC digital scores. see https://verovio.humdrum.org/
@VRDate VRDate changed the title MusicXML & Chiptune.js integration? Chiptune.js , MusicXML & verovio integration? Jul 30, 2021
@VRDate VRDate changed the title Chiptune.js , MusicXML & verovio integration? Chiptune.js, MusicXML & verovio integration? Jul 30, 2021
@petersalomonsen
Copy link
Owner

good suggestions!

first, regarding protracker mod support I already have this. I'm using libxmp (ported to webassembly), and there's an example of creating an amiga protracker module here:

https://petersalomonsen.com/webassemblymusic/livecodev2/?gist=6ba8fd149e8bee48a37281ba02cfca45

MusicXML / MusicJSON should be quite possible to support for the mode that uses midi ( https://petersalomonsen.com/articles/javascriptmidiprogramming/jsmidiprogramming.html ), both importing and exporting. That would improve interaction with other tools for sure., and I guess by supporting those one could also make use of verovio to render the scores.

@VRDate
Copy link
Author

VRDate commented Jul 31, 2021

Exactly and if you replace whatever Verovio is doing that cannot handle complex scores with your web assembly synth, it will be more responsive and handle complex scores better than https://verovio.humdrum.org/.
libxmp (ported to webassembly) will sound better yet if you want to convert (mod, xm, s3m, it) to MusicXML https://github.com/martincameron/micromod has 2 C++ implementations for mod & xm files playing and converting to wave https://github.com/martincameron/micromod/tree/master/micromod-c
https://github.com/martincameron/micromod/blob/master/micromod-c/mod2wav.c
the hint is to use static int key_to_freq( int key, int c2rate)
the ( int key, int c2rate ) is the data for the midi channel.
& https://github.com/martincameron/micromod/tree/master/ibxm-ac
https://github.com/martincameron/micromod/blob/master/ibxm-ac/xm2wav.c
To solve the problem of manual association of each track to a midi channel which is not as standard as midi files like in https://github.com/musescore/MuseScore/blob/master/tools/miditools/smf2xml.cpp look at https://github.com/przem360/score2tracker Python3 script to understand the roundtrip from MusicXML to 4-channels MOD
https://github.com/craigsapp/humextra/tree/master/cli is very useful for CLI tools converting between formats.
Using https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm you can use all of the converters above and call them from your implementation.
I would love to do this meself if you can walk me thru your implementation.

@VRDate VRDate changed the title Chiptune.js, MusicXML & verovio integration? mod, xm, s3m, it, MusicXML & verovio integration? Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants