Show HN: Web Audio DSP Playground
126 points by acarabott 7 years ago | 43 comments- btown 7 years agoAudio Worklet https://developers.google.com/web/updates/2017/12/audio-work... is way, way cooler than these demos imply, as it actually gives you a high-priority digital signal processing thread separate from the UI thread. And because it can benefit from WebAssembly, it's only a matter of time before the power of native audio applications is ported to the browser.
This thread https://forum.juce.com/t/juce-plugins-in-webassembly/25255 , particularly the demo here https://webaudiomodules.org/demos/wasm/dexed.html (try using the ZXCV row on your keyboard) are incredibly promising, as they're straightforward ports of real synthesizers.
Other comments have mentioned that this is coming to Firefox as well; core contributors on the media team have been discussing how it's a priority as recently as two days ago: https://bugzilla.mozilla.org/show_bug.cgi?id=1062849
Really exciting times for the web audio space!
- droidist2 7 years agoThis is pretty sweet. It'd be cool to have more examples though like square wave, triangle wave, etc. and maybe some simple effects like tremolo.
- nabla9 7 years ago
let amp = 0; const maxamp = 0.5; const freq = 880; function loop(numFrames, outL, outR, sampleRate) { const steps = sampleRate / freq; const delta = maxamp/steps; for (let i = 0; i < numFrames; i++) { amp += delta; outL[i] = amp; outR[i] = amp; if (amp > maxamp) amp = 0.0; } }
- homero 7 years agoThis would be cool
http://superdupercollider.blogspot.com/2009/05/crushing-bits...
- nabla9 7 years ago
- kevincennis 7 years agoWould be a cool addition to let users upload an mp3 and then act on it with the AudioWorklet to do stuff like bit crushing.
- acarabott 7 years agoGreat idea! Have implemented it, refresh and check it out.
- detaro 7 years agoCould you also try adding a polyfill for non-Chrome browsers? e.g. https://github.com/jariseon/audioworklet-polyfill
- acarabott 7 years agoHad a crack at it but it throws NotSupportedException in both Firefox and Safari. There are also some parts that don't conform to the spec and break. Filing an issue...
- acarabott 7 years ago
- detaro 7 years ago
- acarabott 7 years ago
- jtbayly 7 years agoOnly available on Chrome and only versions 66 and up.
- shams93 7 years agoFor cutting edge html5 we have no choice but the latest chrome. Audio worklets? Webmidi? Even though I prefer Firefox they're not moving at the same rate as chrome, no one is when it comes to things like audio worklets.
- pjmlp 7 years agoApparently there is no issue when it is Google doing it.
- pjmlp 7 years ago
- Jyaif 7 years agobug tracking implementation of missing feature in FF: https://bugzilla.mozilla.org/show_bug.cgi?id=1062849
Yes, it's 4 years old.
- reklawnos 7 years agoTo be clear, that bug originally tracked the implementation of the Audio Worker API, which went through many iterations that eventually led to the current Audio Worklet spec.
- reklawnos 7 years ago
- sgt 7 years agoJust relaunch your browser, it should update automatically.
- jstimpfle 7 years agoTo state the obvious, not everybody has Chrome, and not everybody has or wants the newest version. That's how it should be. By implying that it's ok to assume otherwise, you're (probably unknowingly) harming the community.
- elvinyung 7 years agoDumb (but genuine) question: why is it good that not everyone wants to be in the new version?
- elvinyung 7 years ago
- jstimpfle 7 years ago
- spookthesunset 7 years ago> Only available on Chrome and only versions 66 and up.
Lame. You are in a tech forum with techies and you are complaining about having to run the latest & greatest. How is this constructive?
Sometimes you need to run the newest stuff in order to, you know, use the newest stuff. As a techie, you should know that, right?
The alternative would be flash, but then you couldn't have done this demo....
- saagarjha 7 years agoMaybe they're not using Chrome?
- saagarjha 7 years ago
- shams93 7 years ago
- emilfihlman 7 years agoGetting an error of "The AudioContext was not allowed to start. It must be resume (or created) after a user gesture on the page. https://goo.gl/7K7WLu".
- acarabott 7 years agoStrange, as this is accounted for: https://github.com/acarabott/audio-dsp-playground/blob/maste...
OS / Chrome version? Were you clicking the start button or using the key command?
- acarabott 7 years ago
- indescions_2018 7 years agoThis is awesome. Sounds quite in tune at 440 Hz (A4). Could be the beginning of a DAW for Chrome ;)
- 33degrees 7 years agoThere are several online DAWs: a friend works on this one https://skytracks.io/ and a google search will turn up many others
- droidist2 7 years agoRequires Flash, but AudioTool has always been absolutely amazing to me:
- josteink 7 years agoWhy for Chrome? Why not for the web?
Let’s not walk into the old MSIE trap all over again.
- nkristoffersen 7 years agoNeed to convince the remaining browsers to implement more audio APIs.
- josteink 7 years agoFirefox plans to implement it last I checked[1].
- josteink 7 years ago
- pjmlp 7 years agoWe are already there.
- nkristoffersen 7 years ago
- 33degrees 7 years ago
- 7 years ago
- zeth___ 7 years agoIn the year 2018 of our lord requiring that a specific version of a single browser being installed to see a website should earn you a special place in hell.
- pmx 7 years agoIts an experimental playground. I think you may be overreacting slightly.
- mcgoooo 7 years agoWhat does that comment add? Someone hacked something off a relatively fresh API and done something cool with it, the hint is in the name, hacker news.
- zeth___ 7 years agoHackernews, not "install proprietary software to have a peak at a walled garden" + "news".
- scrollaway 7 years agoChromium isn't proprietary software. HN is though. Your rant is misguided and pointless.
- jhoh 7 years agoSo every Show HN Post hast to run on open source software or else it isn't hacker news worthy? That doesn't sound right to me.
- scrollaway 7 years ago
- zeth___ 7 years ago
- zeroxfe 7 years agoAudioWorklet is part of the proposed W3C Web Audio API standard.
- pmx 7 years ago
- wi24rd 7 years agoOnly available in Chrome 66+, and why do you submit it twice in a week?