I've got this simple patch:
Now I connected a game controller to Pd where the keys give me 1 or 0 depending whether I press the button or not.
If I press my button I want the osc~ to "play" and if I release it it should stop.
BUT: I wasn't able to find a point where to attach a switch. I don't want to switch off the DSP as I want to play another sound at another key the same time.
It would be nice if anyone of you would have a solution
EDIT: Okay the below solution worked, If there is any need for the project I've done (using a game controller as an instrument) just contact me directly.