ArduinoTapTempo icon indicating copy to clipboard operation
ArduinoTapTempo copied to clipboard

Fast tempos seem to break it

Open topper-2k opened this issue 7 years ago • 2 comments

I'm having an issue using the example code on an Arduino Mega. Fast tempos (like above 200 bpm) seem to break it. Once it's going that fast I can't slow it down. Sometimes if I slow down gradually it'll come back down. But I have to be careful.

Is this a known bug?

Can you tell me how I'd implement the bpm max limit? I see this in the documentation but don't know how to use it. void setMaxBPM(float bpm) Do I set a float variable called bpm?

topper-2k avatar Sep 18 '18 03:09 topper-2k

Same problem here. At higher BPMs its just not possible to slow it back down. Sometimes it works when I tap in the neighbourhood of the "fast" BPM. I set my min and max bpm to be within these limits of my tapped BPMs. It is as if the program thinks too slow taps are too off compared to the fast BPM, so it ignores the taps.

trevortjes avatar Mar 02 '21 20:03 trevortjes

Well, I should've looked better before complaining.

It is all about "isChainActive()". At a higher BPM this boolean goes to "false" faster. This makes it so it never catches the 2nd tap in a slower new BPM. The solution is to increase "setBeatsUntilChainReset" higher than the default of 3. I set it to 10 and can go from 480BPM to 100 without any problems. A more elegant solution would be to make it dynamic so the program knows that it needs to wait longer for "possible" slower BPMs when the current BPM is relatively high.

trevortjes avatar Mar 02 '21 20:03 trevortjes