Audio-Reactive Drawing Machine

The assignment was to develop a drawing machine, and since I've been thinking about linking sound and light a lot recently, I thought I'd dip my toes in.


It's a crude little thing, for sure. But it works. Mostly. 

The RGB values of every color (of the background and each of the shapes) are set to be some multiple of the amplitude of the song playing. I chose Only Shallow by My Bloody Valentine, partially because of the distinct colors of the album art and partially because I love that band. Up and down arrow keys allow the user to select from three different methods of drawing - placing squares, placing circles, or drawing a line.

There is a rather strange bug related to the selection index resetting changing how the shapes appear, but it honestly makes the whole thing look better, so I didn't bother with fixing it.

This was my first time writing anything in Javascript, so I did spend a lot of time searching up syntax and un-learning variable type conventions. I ended up making classes for Circle, Square, and Line objects that would be placed in the scene with a set position and re-drawn each frame based on the amplitude.

Full repository here:
https://github.com/b-bolles/Audio-Reactive-Drawing-Machine-

Comments

Popular posts from this blog

veins - a weird visual toy

Squeezy Circle