Search


Rss feeds
Posts Comments Source Code
Rating
Image to SpectrogramNontransitive DicecheaTorrentDomain ColoringiMac G5 CPU Fan view all...
Recent
Pretty GraphHypernova EngineEmergent FeedbackSDL Euclid OrchardSingularity Viewer view all...
Tags

All source code released under the BSD License unless otherwise specified
© 2010, Gavin Black

Music Reactive Automata

Overview

Modified the "Wolfram Automata" example in processing to do the following:

  • Radiate from a center point
  • Use colors (Red, Green, Blue)
  • Change the ruleset in response to sound, keyboard, or mouse input
  • Work online

Really it just serves to makes pretty pictures and act as a novel way to do music visualization.

Pictures

Wolfram automata responding to music input      A music frequencies were input into the ruleset

Movies

It's terribly hard to find a video capture program that handles sound and doesn't suck. The one I used has crappy quality and causes weird stuff like black boxes occasionally. Run the actual program for much better results. All music was obtained via royalty free music.

  • Ghost Procession -- Very simple song, shows them obviously reacting when a drum beat hits
  • Frost Waltz -- Harder to see a 1-to-1 correspondance to sound and behavior, but makes much nicer patterns

Online Version

  • Mouse click: Will invert the ruleset while held down
  • Refresh frame: To start a new generation early

Design For Music Input

Other forms of input are pretty self explanatory, the music input was not. Basically it is taking the fast fourier transform, averaging it, taking ten of those (one for each rule) and then mapping that to a rule (ie. Off, Blue, Red, Green). This doesn't work at all though, because constantly changing rules means you don't get pretty repeated patterns. I tried several things, such as keeping track of the maximums, but had the best luck with comparing the previous value to the current one, and incrementing or decrementing appropriately.

I also found that it takes a while for the rule corresponding to no active neighbors to change, so I set up the initial pattern as random noise, which makes it so changes start coming right when the first piece of sound is played.

Frames and music playback in Processing don't necessarily sync. This results in 2 issues. First that playing back a song doesn't produce the same results, and that sometimes events are slightly out of sync (You see it before hearing it, by a frame or 2). I added a little bit of alleviation to the latter by averaging previous values.

A tolerance is needed for each individual song. Since quickly changing the ruleset kills the ability to make patterns, faster paced songs usually need a higher tolerance to get decent results.

Source Code

Source Tree: http://devrand.org:8080/cgi-bin/cgit/wolframAutomata/tree/
Snapshots: http://devrand.org:8080/cgi-bin/cgit/wolframAutomata/commit/
Git Access: git clone http://devrand.org:8080/git/wolframAutomata

Conclusion

Well the pictures look pretty, and alot more interesting than the original example. Not sure how usefull the 'Wolfram' definition for automata rules is though, since it seems needlessly restricted. The music input worked pretty well, but took a lot of tweaking (Thus the delta definition).



Last Edited: 2010-10-25 01:39:06

+ Add a comment