February 21, 2023, 11:47pm
Hey total noob Bome’r here.
Is there a way I can time the delay between two events?
I am basically trying to create a tap tempo switch. I was hoping if I could determine the time between taps I could then generate timing clock signals accordingly.
Thanks in advance for any help
February 22, 2023, 1:16am
Hi and welcome to the Bome community!
Yes, however you will not get better than 1 ms accuracy as that is the smallest amount the Bome MIDI Translator can measure.
The attached file illustrates how this is done.
Both note translators use the same incoming Note Number
The first translator start the timer “Tap Timer” but only if the time is not running (ga=0). It also sets the timer count (gb) to 0
The third translator actually increments the value of gb every millisecond it also sets the timer running flag (ga=1)
The second translator kills the timer if it is running (ga=1). It then logs the value of gb that was captured.
Here is what the log window looks like with 2 taps.
1867878 - MIDI IN [EC4-V2]: 90 0F 7F
1867993 - MIDI IN [EC4-V2]: 80 0F 7F
1868306 - MIDI IN [EC4-V2]: 90 0F 7F
1868306 - 0.1:4 Elapsed time in milliseconds = 427
1868375 - MIDI IN [EC4-V2]: 80 0F 7F
I have the alias “My Controller” set to my device.
You can then set up a different repeating timer to send MIDI clock at the rate of gb*24. If I remember MIDI clock is 24 per bar.
(I didn’t do this part)
And the project file:
Tap-Timer.bmtp (1.3 KB)
Bome Customer Care Also available for paid consulting services: email@example.com
February 22, 2023, 9:32pm
@SteveC thank you so, so much for the prompt reply and for taking the time to put together such a detailed explanation and example project. What a legend!!!
I think 1ms accuracy should be fine for my needs. I’d already found another thread WRT generating the MIDI clock so I think I’m covered there. Now on to implement this thing, exciting. Thanks again, keep being awesome!!!