I'm having one weird problem now that I can't figure out. The tap tempo works well except when the delay time pot is at about 20% of its rotation or less. If it's at 20% or less, the tempo button still works, but it makes the echoes go too fast....about 4 echoes for every one tap. If I have the delay time pot at 25% or higher, the tempo button works as expected with a 1 to 1 ratio.
The way it's supposed to work is 2 is added to the tapcount variable upon each interrupt. It's supposed to be irrelevant as to whether or not you tap twice, 3, 4, or however many times. It just looks at the interval between the last to taps. It determines what the "first" tap is by looking at how long it was since your last tap. At the beginning of the tempopress subroutine, if it's been longer than 3 seconds, it assumes that this is your first tap, so it clears the tapcount variable. The interrupt then starts counting by adding 2 to the tapcount variable. On the second tap, it looks at the tapcount variable and uses that to set the delay time in the movepot subroutine. It then clears the tapcount variable and starts again.
I can't figure out why the delay time pot is having an effect on this only when it is below a certain threshold.
Bookmarks