2 ms·
>soft real time piece of code for use in the browser Maybe you should reconsider. My definitions: * hard real time: people will die or things will be des
by PaulDavisThe1st 6y ago
>soft real time piece of code for use in the browser
Maybe you should reconsider.
My definitions:
* hard real time: people will die or things will be destroyed if a certain block of code is not executed within N msecs of something happening
* soft real time: nobody will die but things only really work correctly if a certain block of code is not executed within N msecs of something happening
Why anyone would think that a web browser (equipped with whatever VM abstractions you care to name) is a suitable platform for even soft real time is completely beyond me.
I write soft real time for a living (a multiplatform DAW). We have to go to great lengths to ensure performance, and we do things that you will NEVER(1) be able to do in a browser.
(1) for any reasonable definition of NEVER
- svantana 6y agoThat sounds overly dramatic to me. I'm writing a DAW of sorts for the browser, and while I wouldn't use it on stage, it works well enough to produce music on. I didn't even add AudioWorklet support yet, and I will probably release without it and consider it if users complain about stutters etc.
- renaicirc 6y agoHave you tested on a variety of platforms? In my experience, some are very good about this (e.g Chrome on macOS) and some are a common source of problems (e.g. Firefox on Linux, at least with PulseAudio).
- svantana 6y agoIt seems to work well on the popular platforms (chrome, safari, ios, android) although I haven't tried linux yet. Wasm performance can vary between browsers though, which will impact the experience a lot.
- PaulDavisThe1st 6y ago"DAW of sorts" Obviously, one can do music creation and audio processing in a browser. The parameters that matter are what N is in the "N msecs" I mentioned above, how much audio (e.g. tracks) and how much processing (i.e. DSP). When you make N small enough, make the track count large enough, and do enough DSP, it's never going to work inside a browser (it sometimes won't work outside the browser). If N is large enough, the track count small enough and/or there's not too much DSP going on .... have fun!
- jacquesm 6y agoIt is a MIDI application that is only useful when delivered via the web. I don't have much choice there. So yes, it is a hard path. But then again, if I can get it to work then it will be a very neat little project. So for now I'll just stoically plod through and try to eliminate each of the little gotcha's one-by-one. But the ease with which apparent guarantees are tossed around by browser documentation (with regards to time) only to see them solidly trashed in real life is depressing.