How to turn on a led for the time that a button is pressed down?
Hello,
I have a question about buttons. Is it possible to create a button that sends '1' for the time that you click on it with your mouse, and sends '0' when you release your mouse button? I want to turn on a led for the whole time that a button is pressed down.
Now I've done this with a toggle, but it doesn't give exactly the right effect. Since you need to click twice to turn it on and off.
Thanks a lot!
There's probably (got to be!) something simpler, and the toggle engages with mouse clicking elsewhere on the window, but it does work..
@soma:
in M4L you can set bang transition of Button to both sides, 0 to 1 and 1 to 0
But the Live.button is always round, no?
yes, but you can overlay a panel if roundness is a issue.
an other one using the "idle mouse" outlet of textbutton
`
pictctrl will do the job as it comes off the shelf. And you can give it any shape you want.
This patcher increments an integer as long as pictctrl is held.