Music Activation

204 views
Skip to first unread message

Matthew B

unread,
Jun 22, 2014, 7:47:41 PM6/22/14
to ligh...@googlegroups.com
Hello,

What I am trying to do is make a set of generic RGB-compatible fixtures flash to the bass in a song. However, what is throwing me is that I want the light to flash on only on the bass hit, but i want it to be a different color each time (or the same color a few times). I can't seem to make it stay one color during a flash. I have been trying formulas to no avail. 

Thank You,
Matt B

Mathieu

unread,
Jun 23, 2014, 8:14:15 AM6/23/14
to ligh...@googlegroups.com
Hi Matt,

This seems to be a good job for the latch function. Something like this to generate a new hue at each beat:

latch( onbeat(trigger(music.1.low.beat, 0.07, 10, 15, 0.15)), rand())

The parts are:

trigger(music.1.low.beat, 0.07, 10, 15, 0.15): beat detection formula generated by selecting a frequency band and with the beat option
onbeat(...): make sure to pulse once per beat, otherwise the trigger function stays on for 0.07 seconds.
latch(..., rand()): generate a new random value each time there's a beat

Cheers,
Mathieu
Reply all
Reply to author
Forward
0 new messages