Change + sfplay sound (Play sound while button is pressed)
Hello everyone,
I made a little patch where Max is connected to Arduino.
When I press a button, Max plays a sound.
It all works.
Max reads through the serial object, then I use change to detect changes from 1 to 0 and viceversa.
The changes are then used to play a sound through sfplay.
Now, if instead of keeping the button pressed I press it repeatedly, the sound comes out 'chopped'.
I would like to make it so, that if I press the button many times for let's say the first 3 seconds from the first time I pressed it, those presses of the button are ignored.
I now this is probably easy, but I can't wrap my head around it, I thought I could use a ggate but I am not sure this would be the right choice.
Here is the patch:
Thanks for your help!
Best wishes
MM
you can use counter as a timer to open a gate