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

Edge case bug with tempo changes #38

Open
flightmansam opened this issue Sep 27, 2024 · 1 comment
Open

Edge case bug with tempo changes #38

flightmansam opened this issue Sep 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@flightmansam
Copy link

I discovered a bit of a rare edge case. If (while playing) you move the tempo down to 1 bpm and then all the way back up to 120 bpm there will be no clicks until that 1bpm click timer has expired. I haven't looked how the interals work but I would imagine the tempo changes would feel more responsive if you reset the timer on the event of a tempo change. The solution right now is to stop the playback and re-enable it (presumably resetting any timers).

Awesome app by the way! Such dedication and perfectly implemented material you.

❤️‍🔥

@patzly patzly added the bug Something isn't working label Oct 2, 2024
@patzly
Copy link
Owner

patzly commented Oct 2, 2024

Thanks for the issue and your compliments! The problem is a bit harder to solve than you might think, the incremental tempo change option is the real issue here. Incremental tempo changes can happen every time, counted in bars or in minutes or seconds. But no matter when an incremental tempo change happens, the musician doesn't want to have a mixture of the old tempo and the new tempo as the duration between the two beats at the time of change. But if we apply the new tempo at exactly the time it is selected which maybe is in the middle of two beats, the old (still running) beat timer would be stopped and the new timer would be started, resulting in an addition of the expired fraction of the old beat duration and the new beat duration, which would result in a beat duration unequal to both the new and the old tempo. So I think the current approach is the easier solution and requires you to not set a tempo of 1 bpm if you don't need it.
But the current approach has another bug regarding that, which I wasn't able to solve yet. If you activate the timer option and set it to a few bars, and then start the metronome with 10 bpm, wait a few seconds and than switch to 120 bpm via bookmarks, the timer slider will directly move with the new tempo instead of moving to the beat duration of the old tempo until the next beat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants