I am getting some weird triggering. I wonder if anyone could help me out.

I trigger midi notes in pure data from an arduino uno, using the digital inputs and a mechanical device that switch on and off the notes. Pure data sends the midi to ableton live where I control some soft synths.

= switches to Arduino digital ins to Pd to Ableton

How do I set up a clean and simple patch for turning on and off a note?

Thanks a lot!