allanpichardo / Unity-Beat-Detection

Musical beat detection and audio spectrum analysis for use with the Unity game engine.
480 stars 91 forks source link

Different results #4

Open david-gherghita opened 9 years ago

david-gherghita commented 9 years ago

Hi! I want to use your script to instantiate gameObjects on the music rhythm. But each time I play the level I get different times (Time.time results) when the beat is detected (and they even differ with a whole second, not hundreads of a second, cause that wouldn't be a problem) even if the music remains the same. I have no idea how your script works so I'm asking if there is an easy fix or if I'm doing something wrong. Thanks.

lucasmontec commented 4 years ago

His script does runtime detection, not preprocessing. This means your PC timers, memory available and other variables influence when the music thread begins and when the detector starts its detections. There will be a lag between each beat and its detection.