Hi there. I am wondering if anyone knows how to change the parameters for a control p5 object (for example the interval in the matrix example), in live performance. (i.e. when the sketch is running).
My example shows the interval parameter as
int tempo and i am trying to say, when the mouse is pressed, tempo = 300.
any help on this would be greatly appreciated. Thanks :)
Hi there. I am a bit new to Processing so please forgive me if there are obvious answers to my question.
I am trying to create a button so that when the mouse is hovering over it, a timer is started which counts to 3 seconds and if the mouse has remained over the button for 3 seconds then the button is activated (i.e. it is filled black and outputs a number, say 1).
I have managed to figure this bit out, however I was wondering if anyone know how to keep the button activated and then if the mouse hovers over the button for another 3 seconds the button is then deactivated (i.e. returns to a blank fill and outputs a different number, say 0). I have tried a few things but cant seem to get any result.
I was wondering why the 'a' variable doesn't change in my sketch. The 'a' variable is the value for the
fill() of an
ellipse() and when the 2 ellipses intercept and the time reaches 2000 milliseconds then the value of 'a' should change from 255 to 0 but it doesn't.
Any ideas or help on this problem would be greatly appreciated.
I was wondering if there is there a way to say, if a number changes (X) , then print line (Y)? for example, when using the timer built into Processing, every time the number changes (so every second), then print the line Y.
Any help on this would be greatly appreciated :)..
I'm trying to figure out how how create a timer which uses the millis() command and also has an on/off switch. So that i can trigger it to start and count time by doing X. Then get it to do something when it reaches a certain time (e.g. 5000 m/s, which I can already do). And then get it to stop and reset by doing Y.