Pure Data: Randomly Changing Color (Extra Credit)
Hey, I figured out how to get the cube to randomly change color every second. Maybe there's another way too? I "packed" the RGB so that I could get three inputs to hook up to "random" objects. But the random object generates numbers 1-99 instead of numbers from 0 to 1, so I multiplied each by .01.
The metronome ("metro") asks for milliseconds, so I inputted 1000 to equal one second, and metro is also connected to "pack" so that it sends the data to "color." Lastly, I inserted the "bang" to start it.
![](http://3.bp.blogspot.com/_JU-W5nsF8jg/TM4mMPD2GDI/AAAAAAAAACQ/A4zqX-qSiVE/s320/Screen+shot+2010-10-31+at+10.26.32+PM.png)
The metronome ("metro") asks for milliseconds, so I inputted 1000 to equal one second, and metro is also connected to "pack" so that it sends the data to "color." Lastly, I inserted the "bang" to start it.
![](http://3.bp.blogspot.com/_JU-W5nsF8jg/TM4mMPD2GDI/AAAAAAAAACQ/A4zqX-qSiVE/s320/Screen+shot+2010-10-31+at+10.26.32+PM.png)
![](http://3.bp.blogspot.com/_JU-W5nsF8jg/TM4mR77T10I/AAAAAAAAACY/uQheaFF4PUk/s320/Screen+shot+2010-10-31+at+10.27.37+PM.png)
Comments
Post a Comment