Timing is the hardest - especially if you’re going to try to let people record on the fly against the running track. Have two or more play at the same time… rough.
And I suggest you checkout https://www2022.thewebconf.org/PaperFiles/40.pdf there is an implementation called wam out there that lets you use VSTs in JS. It works pretty well.
Good luck! I’ll be one of the first to sign up.
I know people who mix+master and sending huge project files and also have to convert between DAW formats even. Having a common web DAW that can render on a server could be a very powerful ecosystem.
1.) Is WebAssembly better about timing + buffers?
2.) Is JS have a WebGL-esque lower-level interface with audio hardware planned?
3.) I believe Electron grants more local permissions. I know Electron has some modernization hurdles (ESM still I think) but wonder if it's any better or the Chromium process within it has higher affinity than a proper browser. Not quite "web-based" but maybe a better option as your project gets more complex.
4.) Is it possible to have a buffer that "renders" separate from any loops themselves? If you can't time a drumtrack in real-time accurately enough or "play" an instrument you could certainly have it render N millisecond ahead.
As far as libraries go for analysis, the only solid option I've found so far is Meyda[0]. I was drawn to it mostly because it closely maps to librosa[1], and it seems fairly mature. Does anyone have any others that may come in handy for this kind of work? This is just free-time tinkering for me. I'm completely new to the space.
[0]: https://meyda.js.org/ [1]: https://librosa.org/