And since you are talking about the triggers comming out of an Arduino, the switches, you can use the debounce inside the arduino sketch, this is a different look at the solution.
i managed to get midirealtimein working with midiclock messages comming
from my ensonique Halo or a moog slim phatty.
Workout is midirealtimein select 248 bang count 6 or 12 bangs and sync
to that counter count, WorkS great.
Dian from the Netherlands
Ps i work with pure data on a Rpi wheezy Debian
Hello, i am thinkening in the same direction, midi in to data out, do you still need help,
The help i got was the idea that i can get everything i and can convert it to everything
out, that's great
i work with midi audio in and convert it to midi out, to speakjets, audio out