Earlier quoted context omitted.
I propose a challenge then. I'll give you an arbitrary stream in the format of a .wav, and you send me code, in JavaScript, that uses an series of infinite OscillatorNodes that reproduces that stream completely accurately. I won't even make you write the code that generates the stream, I'll just require that one sample. If you can do it, I'll give you $1000 out of my own pocket.
If you're not sampling at an infinite sample rate, you don't need an infinite series of nodes. Given Nyquist, a non-infinite series of [non-trivial power of 2] nodes will do the job just fine. Audio FFT/iFFT processing typically uses 512 or 1024 bins, although sometimes you can get away with fewer. In practice, iFFT doesn't use discrete oscillators for resynthesis, because the whole point of iFFTs is to limit the amo…
I don’t know who the Web Audio API is designed for
161–170 of 179 posts
Re: I don’t know who the Web Audio API is designed for
#162Earlier quoted context omitted.
> It's not "serious business" but this is the browser after all. This answer would have made sense to me circa 2003, but I cannot fathom it today. The web started as "let's put academic papers online". It moved to "let's put magazines online" with some modest interactivity via forms. But we've spent the last 10 or 15 years turning the web into a "you can do anything" platform. There's been huge progress in interactiv…
There has been huge progress in visuals, but the web is basically still a document and content delivery system decorated with a few animation features, not a full-fat creative multimedia OS. And that could be because there are institutional forces keeping it at a certain level of clunkiness, which is far short of the requirements of professional media creators who work with video, 3D, and sound. I suspect the real pr…
Re: I don’t know who the Web Audio API is designed for
#163I've spent quite a lot of time working with the Web Audio API, and I strongly agree with the author. I got pretty deep into building a modular synthesis environment using it ( https://github.com/rsimmons/plinth ) before deciding that working within the constraints of the built-in nodes was ultimately futile. Even building a well-behaved envelope generator (e.g. that handles retriggering correctly) is extremely tricky…
The API is frustrating because it is meant to hide the fact that Android audio sucks giant hairy donkey balls. If you give Web developers access to raw samples, they are going to expect it to work. When it doesn't on Chrome on Android, lots of people are going to start complaining and filing bugs. So, instead of fixing the audio path, they decided to bury its crappiness under a "higher-level" API which has fuzzier la…
https://issuetracker.google.com/issues/36908622
AAudio is a new C API. It is designed for high-performance audio applications that require low latency. It is currently in the Android O developer preview and not ready for production use. (Jun 2017)
Re: I don’t know who the Web Audio API is designed for
#164Kinda tagential to the thread, but what's the best book for an introduction to audio programming for an experienced, language agnostic coder (java, c, c++, obj-c, etc)?
For a more generic guide I've heard a lot of good things about a free (in electronic form) book called DSPGuide (http://dspguide.com/). Haven't had a chance to dive into this one, though.
Re: I don’t know who the Web Audio API is designed for
#165I'm running a SaaS built on the back of the Web Audio + WebRTC apis. While it isn't perfect at all, it is still pretty impressive what progress has been made in the last few years allowing you to do all kinds of audio synthesis and processing right in the browser. It seems to me that it is a pretty general purpose api in intent. The approach seems to be to do the easy low hanging fruit first and then get to the more…
Re: I don’t know who the Web Audio API is designed for
#166Earlier quoted context omitted.
That... explains why Google was so keen to kill off the Audio Data API Mozilla proposed, I guess.
But Chrome for Android didn't come out until 2012 and Chris Rogers started the Web Audio work in 2009. I think someone would have had to have been exceptionally farsighted to think "Android's audio stack is going to suck for several years so we need to design around that now".
Re: I don’t know who the Web Audio API is designed for
#167>you can’t directly draw DOM elements to a canvas without awkwardly porting it to an SVG This is not a wart, this is a security feature. Of course, it wouldn't be a necessary limitation if the web wasn't so complicated, but the web is complicated.
What's the security issue in play here?
Re: I don’t know who the Web Audio API is designed for
#168My first lesson in this was the Roland MPU-401 MIDI interface. It had a "smart mode" which accepted timestamped buffers. It was great... if you wanted a sequencer with exactly the features it supported, like say only 8 tracks. It was well-intentioned, because PCs of that era were slow. The MPU-401 also had a "dumb" a.k.a. "UART" mode. You had to do everything yourself... and therefore could do anything. It turned out…
(If I could return to Cakewalk, I would. Wrote some of my best tracks with that little ISR of yours!)
Re: I don’t know who the Web Audio API is designed for
#169Earlier quoted context omitted.
What's the security issue in play here?
Just one example. The canvas API can grab the image data on the canvas. If you could rasterize arbitrary DOM nodes then you could very easily fingerprint users by, say, checking which fonts are installed. You could also load external resources such as images and iframes bypassing same-origin policy, so if your bank's website was configured incorrectly, a malicious site could steal information by taking screenshots of…
Re: I don’t know who the Web Audio API is designed for
#170So if you've been wanting to try some intervention to make web standards less poor, or just want to observe how they end up the way they do, here's an opportunity.