4 ms·
What is the corner frequency of the low-pass filter? It is kind of pointless to use a filter without specifying its corner frequency. Also, peak detection can
by Derbasti 12y ago
What is the corner frequency of the low-pass filter? It is kind of pointless to use a filter without specifying its corner frequency.
Also, peak detection can be improved a lot by searching for local maxima of the level instead of taking a threshold of the amplitude.
As a scientist of acoustics, I find this approach frustratingly naive. Still, nice write-up!
- akst 12y agoYeah it was a little odd there was no specified frequency, the api must have a default to around just above a typical kick drum peak.
- itsjoesullivan 12y agoThanks! re: corner frequency, ha, yeah I maybe oversimplified the example code a bit. That code will, however, work, because the Web Audio API specifies a default frequency of 350Hz ( http://webaudio.github.io/web-audio-api/#attributes-17 http://webaudio.github.io/web-audio-api/#attributes-17 ). You can also dig into the source code of the page for the code that makes the audio examples happen (search for "click", which will give you the click handlers). I think we'll circle around and try again in a less naive way :)