Re:Dancer.js, a high level audio api to make visualizations
by showerst on Wednesday June 06, 2012 @12:25PM
(#4074679)
Audio Noob question: I understand 'beat detection' in music to be a really hard problem, are they successfully doing it here in javascript, or is this doing something else?
[ Parent
| on HN ]
Re:Dancer.js, a high level audio api to make visualizations
by padenot on Wednesday June 06, 2012 @01:46PM
(#4075090)
Beat detection usually work by taking the Fourier transform of the signal, and by observing the changes around 100Hz (the frequency where the kicks are, usually, may need tuning). By observing the changes in frequency, one can 'detect beats'.
The 'hard' part here is to compute the Fourier transform (which can be both a hard maths and performance problem for a person who knows nothing about signal processing), but quite a few implementations exist in javascript already (plus, if the author uses the new typed arrays, it brings a nice speed boost).
Re:Dancer.js, a high level audio api to make visualizations
by jsantell on Wednesday June 06, 2012 @02:22PM
(#4075291)
The library is leveraging FFT Corban Brook's dsp.js FFT -- while it's not beat detection in the sense that it's able to tell a track is 140 BPM, you can specify a minimum threshold of a frequency's amplitude to register as a beat, and then that decays until the frequency's amplitude surpasses both the minimum and decay rate -- all configurable