Open tmaximini opened 9 years ago
That would be really cool! All that would be needed is a library that creates a stream from the web audio API in the proper format. Then you could pipe it right into the stream interface of this library.
This looks to be close to the correct format: https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getFloatTimeDomainData . Would have to convert it to a buffer before piping it to bpm.js
though (would be doing extra work though, bpm.js
is converting back to float).
The only thing I'm not certain of is that the AnalyserNode
wants an fftSize
set, and I don't know what that should be / if there are timing / window issues with this approach.
Did anyone get this to work from AudioContext.createMediaElementSource ...with bpm.js?
Did anyone get this to work from AudioContext.createMediaElementSource ...with bpm.js?
I don't think anyone has done this yet...
Hi, I would be interested if this would work somehow with the web audio API? It would be nice to be able to detect bpm from a track playing in an html5 audio element in real time instead from an mp3 file. https://developer.mozilla.org/en-US/docs/Web/API/AudioContext.createMediaElementSource