Wednesday, October 15, 2008

Lights And Sound Shake Data

hi, on my last posts about sounds i talked about shake data which defines the intensity of the sound at a given time/point, so i thought it will be nice to add sound to lights, but then i want the intensity of the light to be changed based on what we hear.
for example: if we hear sound of blinking light we want the light intensity to blink and sync with that sound - this is where shake data comes in use.
i wrote some helper function that gives me the exact shake value and i use it as scale factor when i compute the light color.
so now i can set sounds for lights and the intensity of the light will be sync with sound shake data and gives really nice and creepy effect :)
watch the video to see it in action:

video