SharpMod running in the browser as a WebAssembly module, built on top of the SharpMod library.
Live demo: sharpmod.djxavi.com
SharpModInterop is the bridge between the page and the SharpMod library. Each method tagged with [JSExport] becomes a regular function on the JavaScript side, so the browser can drive playback without leaving JS:
- hand a module file to
Loadto open it, - call
Readwhenever the Web Audio backend needs more PCM samples, - and use the smaller accessors to read back things like the title, the active channels, the current pattern or the waveform of a given instrument — everything the on-screen views need to stay in sync with playback.