-
Notifications
You must be signed in to change notification settings - Fork 16
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
Different (inaccurate) results on mobile vs desktop. #5
Comments
No, music-tempo does not change behavior depending on the perfomance of the system. |
@killercrush can you describe your hardware/environment? I've only been able to reproduce on mobile. Minimal repro steps using only example from music-tempo:
Expected tempo: 119 https://phrasier.leftium.com also logs results from I published the beats arrays for both: Interestingly, both have the exact same number of beats, but the 107 BPM has beats that occur at 130 seconds when the video is only 119 seconds long. |
I figured out what the problem is. You need to create AudioContext with sampleRate config: |
I made a beat-aware media player using music-tempo: https://phrasier.leftium.com/
It works great on desktop, however the results are not quite right on mobile browsers. The tempo should be 119 BPM, but mobile browsers result in 107 BPM. The actual beat timings are off, too. Both mobile and desktop agree on the total number of beats, though.
I think music-tempo does a deterministic analysis of the audio data, so I'm not sure how mobile and desktop results could diverge. Does music-tempo change the number of tests or cut tests short depending on the performance of the system?
The text was updated successfully, but these errors were encountered: