-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get BPM Value #2
Comments
I realized that the calculation should be done for each buffer:
The problem is the same in this case too, bpm = 0 Could it be a buffer problem with the
|
I can't tell from your code what the overall process before the detection is and whether you've cleared the floatVect, what the FFT output is, etc.. but I'll outline the basic idea as reference for everyone. The input is the current FFT frame, and you'll want to keep the symmetry (don't just take half of the fft result array -- explanation for that is enough for another discussion though) and the time at which it was sampled from. If you're processing an audio file you'll need to choose your frame rate so that you get enough quality FFT frames per second for your sample rate. For this example we'll assume a function exists that does that called getSamplesBySeconds, which at 29.4 fps for 44100hz would give us 1500 samples per frame. Some basic pseudo-code for that process is:
|
I have a wave file. I go through 1025 bytes samples and read the wav
The resulting bpm is always bpm = 0.
Is that right to accumulate the float samples from the FFT and then pass the vector to the process() method with the wav duration expressed in seconds ?
The text was updated successfully, but these errors were encountered: