Open phr00t opened 6 years ago
I fixed it by adding a parameter to pass time to the detect function. I have it operate in seconds now (using the double type), instead of milliseconds... which may need some modification in other projects (or modification of the following code to work in milliseconds):
ah, wow, this is a good catch. i haven't looked at this code in a very long time, but i suspect what it should actually do is figure out how much time has passed based on the number of samples it has processed and the sample rate of that audio.
Yes, that is the best solution. I already had the time in my project, so I decided to pass it as an argument in my solution. Thank you for the response & looking forward to a proper fix.
If you want to calculate beat detection offline (not in realtime), calls to things like System.currentTimeMillis() doesn't work... yet it is hardcoded into the current beat detection algorithm:
https://github.com/ddf/Minim/blob/master/src/main/java/ddf/minim/analysis/BeatDetect.java#L601
How can we modify this to work offline?