Want to open a topic to discuss something potentially interesting for plugins on the MOD platform.
I have been experimenting with building and running native desktop programs on the browser, with the biggest project being the whole Cardinal on the browser. See https://cardinal.kx.studio/ for that.
The way this works is a mix of web-assembly (compiled through emscripten) and graphics over webgl.
It works on the 3 major browsers, with old Safari/WebKit being a bit behind with the support for SIMD, but if we are only dealing with graphics we dont need to care about fast audio optimizations.
I see a few clear benefits of this approach:
- We can use the same desktop UI directly as modgui on MOD
- Graphics are typically very fast to render, as it is using the GPU
- Developers that dislike web stuff (HTML/CSS/JS) can skip it altogether and only deal with C/C++
For the moment I have been tweaking my own little DPF framework to make this as seamless as possible, but it is very much still work in progress.
And now I am wondering if anyone has interest on testing this out, or even porting/developing plugins with this in mind.
For a good first test, let’s begin with Wolf-Shaper, with is a “Waveshaping distortion plugin with spline-based graph”.
If you have a MOD Dwarf, you can install it using this one-liner on the command-line:
curl https://falktx.com/data/wasm/wolf-shaper.lv2-dwarf.tar.gz | base64 | curl -F 'package=@-' http://192.168.51.1/sdk/install
Find it at the end of the distortion tab.
There are a few quirks to its usage, as I am trying to find a good way to allow to interact with the plugin while still allowing to move it around. Initially I had a border around the GUI, but that ends up wasting space and looking ugly. Instead I made it so that when you single-click on the GUI (and the web gui zooms and centers to it), the GUI finally receives focus allowing you to tweak knobs and the spline graph.
A few other small oddities might be present, this is experimental after all.
Try with while keeping these in mind:
- if plugin GUI does not have focus, click away on the pedalboard once, then back to the plugin GUI
- plugin GUI is quite big, you might need to unpin the plugin bar in order to reach the bottom knobs
- for the spline editor, right-click on empty area to add new point; right-click on point for edit options
- the GUI wont work on Safari/WebKit for now, I know why, will fix it later
- under Chrome the mouse pointer lock doesnt always work well, under investigation
- works best under Firefox
- might not work correctly on high-dpi displays, currently untested
- developer console shows lots of debug info, expected and normal
- oversample is a knob, even though it doesnt look like it; big cpu usage if enabled
if you try it, let me know how it works for you!
oh and some screenshots too, because not everyone will be able to try it, but they will want to see.