4 ms·
On the one hand: really great write up of a great little project that is great at helping people experiment with synthesis and software instrument design. On t
by PaulDavisThe1st 5y ago
On the one hand: really great write up of a great little project that is great at helping people experiment with synthesis and software instrument design.
On the other hand: another example of a development platform ("web browsers") being utilized for something it is fundamentally not designed for, just because it leverages the skills someone gained along the way.
I mostly wish this would stop. People are going to build all kinds of awesome toys using web audio APIs, and every single one of those toys is going to be less performant (latency, CPU/DSP load, interface responsiveness, sensor interactivity) than it's native equivalent. That means that its use will face limitations that are a function of the development platform rather than the designer or performer.
On the other hand, how can anyone be against people learning more about synthesis and instrument design?
My brain hurts.
- chaosprint 5y agoGood point. I think you do accept the convenience of browsers (many cool projects such as this one https://learningsynths.ableton.com/ https://learningsynths.ableton.com/). So now the problem is the audio performance. As I post in the comments below, we now have WASM, so C++ and Rust can all run in browsers. This can provide a near-native audio performance. Just take Glicol, the live coding language I design as an example: it runs in browsers (https://glicol.org https://glicol.org) and it also runs as a VST plugin (https://youtu.be/tmmBhBmIEW0 https://youtu.be/tmmBhBmIEW0), or you can use the audio engine to write VST plugin (https://github.com/chaosprint/dattorro-vst-rs https://github.com/chaosprint/dattorro-vst-rs).
- spacechild1 5y agoYep. Pure Data and SuperCollider can also run in the browser. But there's a difference between C/C++/Rust audio apps compiled to WASM on the one hand and writing audio code in JS on the other hand. Then again, I think it's perfectly ok for people to experiment with audio in browser. "Native" audio desktop applications will always be superior, so there's nothing to be afraid of.
- PaulDavisThe1st 5y ago> As I post in the comments below, we now have WASM, so C++ and Rust can all run in browsers. This can provide a near-native audio performance. Native audio apps require realtime scheduling and memory locking, things you cannot do/control in the browser. The problem is that you can likely get 70-85% of "it" done in the browser, but when the user/performer need the remaining 15-30% for whatever reason, what do they do then?
- Jasper_ 5y agoVery rarely do you get that level of control even on modern systems. People aren't making music on ASIO-capable sound cards, they're using ASIO4All which implements ASIO on top of your boring MME/WASAPI audio stack. On any modern OS, you don't write directly to the sound card, you write to a buffer which the system mixer does the FX graph on, then that goes to the underlying sound system. CoreAudio, WASAPI and PipeWire are all built like this. Realtime threads are attempted to be solved by AudioWorklet which allow a high-priority thread. We probably won't get to the level of 100% assembly programming, but we can get close, and I think that's fine. Where I get upset at Web Audio is the amount of time spent in all the oscillators and FX nodes; I think you're better off ignoring those just because of how limiting and awkward they are.
- PaulDavisThe1st 5y ago> Very rarely do you get that level of control even on modern systems. Windows, macOS, Linux all offer this control. AudioWorklet does not offer much control of thread priority (read the source code of any DAW to see how much is actually done), and also isn't clearly appropriate for parallelization of DAW processing, which is a standard architecture in any current DAW. It's not really about asm programming. It's about the ability with the host OS in all the appropriate and required ways. Browsers are extremely unlikely to permit this, for a variety of very sensible reasons.
- chaosprint 5y agoI think it's all about trade-offs. For example, I can also point out that the latency on Windows, macOS are too high as these are general-purpose oriented systems. See this paper: http://eecs.qmul.ac.uk/~andrewm/mcpherson_nime2016.pdf http://eecs.qmul.ac.uk/~andrewm/mcpherson_nime2016.pdf Similar dilemma we have for the general-purposed browsers. To push to a limit, we can only resort to bare metal or Xenomai Linux like Daisy or Bela. But for the same reason we use Windows and macOS, we trade off some audio performance for a better overall experience.
- hansworst 5y agoMaybe the web was initially not designed for doing these kinds of things, but on the other hand it is basically the only platform that enables people to click a link and immediately start using whatever app is behind the URL. That's fundamentally why the web has grown as much as it has, and why there is huge incentive for people to build more APIs that let people do more with that platform. I suppose you could in theory build a similar kind of platform that allows you to the same things in better ways. There may even be a lot of money there. But it hasn't happened, and so it makes a lot of sense IMO to build these kinds of apps.
- bambax 5y agoOn the third hand: distribution. An app that runs in the browser offers incredible advantages over an app that you have to download and install on your specific machine/OS. A DAW in the browser sounds insane, but the same was said about everything: word processors, spreadsheets, maps, and look where we are now.
- LegitShady 5y agoI never worried about milliseconds of delay in spreadsheets, but in a DAW I do. Things are not all the same.
- stevehiehn 5y agoI think it goes way beyond toys. Here's my use case: I'm building an audio sample pipeline. And I want people to be able to preview combinations of loops and samples in the browser. Asking someone to download a native app just to preview is not awesome: https://signalsandsorcery.org https://signalsandsorcery.org
- mit20220401 5y agoIMHO, your usage of Tone.js may not be a strong enough argument for your point. Tone.js is simply too high-level to offer the features mentioned here.
- stevehiehn 5y agoNot sure what you mean? It's already serving my use case isn't it?