Hi,
I'm new to Pd, and programming in general, and I'm having problems with some relatively simple tasks :/
I'm trying to write a patch that takes keyboard input to play notes, and then delays the note played so that it starts when the key is released, rather than when it is pressed. The note will then play for its full length (however long the user held down the key for).
To do this, I wanted to use the timer object, with a pressed key starting the timer, and a released key stopping the timer. Right now, I'm using the [keyname] object to get the key pressed/released data, but am having troubles with it.
It sends out a 1 when a key is pressed, and a 0 when it is released, and I thought this would be very helpful, but it does this continuously, so instead of getting one bang when a key is pressed, and one when it is released, I'm getting bangs all the time when a key is pressed.
Basically, I'm trying to figure out a way to have a key press send out just one bang, and likewise for a key release, so that I can use those bangs to control the timer.
Sorry for the longwinded description of such a (probably) simple problem.
Any ideas?
Thanks a lot!
- David