vsariola / sointu

Fork of 4klang that can target 386, amd64 and WebAssembly. Tools run on Windows, Mac & Linux
MIT License
239 stars 15 forks source link

webbased editor + qr/html export #131

Open coderofsalvation opened 5 months ago

coderofsalvation commented 5 months ago

I know its a stretch, but I overheard it in a gio videocall about sointu. Such a cool usecase for non democoders.

vsariola commented 5 months ago

I have compiled sointu for wasm & ran it inside browser in the past; it shouldn't take too much effort. It might require updating to a newer version of Gio and getting rid of the recovery file mechanism.

However... the past experience was that audio was stuttering heavily and the UI was laggy. I don't know if sointu synthesizer or Gio UI was the bigger culprit. Thus, I gave up on this quite quickly: giving users a stuttering, laggy preview is not a very good advertisement of a software :)

Maybe it would be worthwhile to check what's the status now; perhaps optimizations in Gio or elsewhere have made this realistic nowadays.

The hand-written sointu wasm VM is fast enough to render audio in browser at least; Peter Salomonsen has been working on integrating that synthesizer in his live-coding environment. https://github.com/vsariola/sointu/pull/90 His idea was to just run the sointu-compile as a web service, taking care of all UI himself, but using the sointu create wasm synth modules & use these to render audio within browser. The pull request was never finished, but this at least proves that it is theoretically possible run the synth in browser.

coderofsalvation commented 5 months ago

Thanks for getting back to me. OK, so for now one could just use the native editor to produce the wasm. Audio-stuttering is something which is bugging many wasm-compiled dsp-libraries, I guess it's just a matter of time before this all will work smooth.