First post, by gfrh
Hello fellow MT-32 enthusiasts,
A few years ago, I worked on a limited Rust port of Munt. It only targeted a very limited configuration (CM-32L, "good default" settings). The goal was to create a device I could compile to WASM for web use, and Emscripten was difficult to incorporate into my projects. To ensure correctness, the goal was sample-accurate behaviour compared to Munt. I only got ~15% through.
Fast-forward a few years, LLMs have made the porting of existing FOSS code as a reference oracle implementation trivial. I captured a few hours of raw MIDI from ScummVM games to serve as comparison tests.
So if anyone here is interested, here are some Rust crates:
https://crates.io/crates/moont: Core CM-32L synthesizer library
https://crates.io/crates/moont-render: Render .mid files to .wav
https://crates.io/crates/moont-live: Real-time ALSA MIDI sink
https://crates.io/crates/moont-web: WebAssembly wrapper with Web Audio API
Since these were based on Munt sources and as a test comparison, they are also licensed LGPL2.1+, with existing copyrights attached.
Some unique implementation details:
* There are no external dependencies for the main library. I'm considering making it no_std in the near future.
* There is optional General MIDI emulation.
* All of these crates support a bundle-rom feature flag that embed the control/PCM ROM, for builds where you don't care about Roland lawyers. It's more involved that just adding them as static buffers: all of the pre-processing (parsing, unscrambling) is done at build time, and Rust literals are generated for the build.
* The moont-live crate has a feature (repl) that allows simple control commands.
It's still pre-1.0 so please let me know if there are major API changes you want to see before I cut a 1.0, hopefully in a few weeks.
I don't have any plans to expand the scope beyond my original singular CM-32L configuration, but if you have good reasons why I should diverge, please contact me. Otherwise, feel free to fork!