VOGONS


First post, by gfrh

User metadata
Rank Newbie
Rank
Newbie

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!

Reply 1 of 2, by SScorpio

User metadata
Rank Oldbie
Rank
Oldbie
gfrh wrote on Today, 01:42:

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!

CM-32 is pretty much for gaming as the additional voices are different sound effects. However, there are some game that don't work on correctly on REV 01 which the CM-32 uses. If you want to support everything correctly, you'll want MT-32 REV 00 support as well.

Reply 2 of 2, by BaronSFel001

User metadata
Rank Member
Rank
Member

Does this still require the Roland ROMs to work or has that functional ecosystem been reverse-engineered past that point? While Roland seems content to look the other way due to Linear Arithmetic being obsolete for production purposes, it would be nice to overcome that legal tripwire once and for all.

System 20: PIII 600, LAPC-I, GUS PnP, S220, Voodoo3, SQ2500, R200, 3.0-Me
System 21: G2030 3.0, X-fi Fatal1ty, GTX 560, XP-Vista
Retro gaming (among other subjects): https://baronsfel001.wixsite.com/my-site