Improved the system that detects beats, still need to fix the magic number 100 (should be based on sample rate and chunk size)