Blinking to the music
The second task of our current mission is to create visualizers that generate an array of 8 x 8 tiles based on a timer or on the audio information we get from Minim. The array of tiles will be used by our draw()
method to generate a top view of the dance floor.
To switch between the different visualizers, we are going to write a thread that runs in the background and chooses a new visualizer every n seconds.
Engage Thrusters
Let's blink to the music:
Let's start with a new sketch and import the Minim library. In our
setup()
method, we define a Minim context and anAudioPlayer
object like we did in the previous task. This time, we start the looping of the player directly in thesetup()
method, so the loop starts as soon as the sketch is run.import ddf.minim.spi.*; import ddf.minim.signals.*; import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.ugens.*; import ddf.minim.effects.*; Minim minim; AudioPlayer player; void setup() { size(300,300); minim ...