Skip to content
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

Beat detection from PCM #90

Open
levuphuong opened this issue Dec 20, 2018 · 1 comment
Open

Beat detection from PCM #90

levuphuong opened this issue Dec 20, 2018 · 1 comment

Comments

@levuphuong
Copy link

Hi

The input is pcm wave data 8 bit, Sample rate 44100, time size 1024.
I use sound energy algorithm but detection is not correct.
And I have confusion with Variance. What is maximum of V? following the library V-max = 255^2.
It would impact to C constant value too much.
C = (-0.0025714f * V) + 1.5142857f;

https://github.com/ddf/Minim/blob/master/src/main/java/ddf/minim/analysis/BeatDetect.java

Thanks

@ddf
Copy link
Owner

ddf commented Feb 22, 2019

This is very old code and was never really good as a general purpose beat detection method. It worked reasonably well on music is strong beats (dance music for instance). I don't recall exactly how it all works, but after looking over the code again, I'm pretty sure that V will never get so large. It should be the average amount that samples in the current buffer differ from the average value of the entire buffer, so I would expect it to every be larger than 2.

Can you be more specific about how the detection is "not correct"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants