Saturday, October 13, 2012

Algorithmic Music Visualizer

This is a short follow up to a previous post 'Algorithmic Music On Arduino'

The music generation algorithms take advantage of the repeating structure within binary numbers, an obvious development is a visualizer that would reveal some of the structure within the music.

This quick project uses the value of the algorithm output to drive the sound and visuals directly. The visualizer is simply a scrolling buffer of the 8 most recent output values.

While it would be possible to use FFT to visualize the music, in the case of algorithmic music it is more interesting to use the visualizer as a means to explore what is happening within the algorithm rather than in the frequency spectrum.

The short video shows that even with no additional processing, the visuals are very different for each of the algorithms and reveal some of the structure within the music.

The first algorithm running from 0:11 to 0:38 produces a cascade effect reminiscent of the matrix - unfortunately this effect is subtle and needs development for the best effect. The second section of the video provides a more obvious demonstration of how the sound is being developed within the algorithm.

Some other ideas to explore in the future -

1) Bit rate - for each bit in the 8 bit output, increment a counter if it has changed from the last sample. Use the values for the 8-bits to drive the display

2) Divide by 2 - Use the current output for row 0, update row 1 every second output, row 2 every fourth output, row 3 every 8 etc upto 128

For now, here is a scrolling buffer of the 8 most recent output values (and a little reaction from the family)

Duane B