Archive for November, 2008


Thursday, November 6th, 2008

Done with Quartz Composer with the intention of replicating the appearance of a Fractal Flame rendered through Scott Draves’ Flam3, except live rendered based on audio input.

This isn’t a fractal, but I think it does re-create the appearance quite well.

The video quality isn’t even close to the live render quality, but it gives you a good idea of it.

The screen recording here has taken the mic input and used it for the animation. The song used in this recording is “August (Reggae Rework)” by el-B from under a Creative Commons Attribution Noncommercial 3.0 License.

You can download the Quartz file here, note though that while this will open in Tiger, it will not render correctly, OS X 10.5 Leopard is required for it to run correctly.

It should also be noted that the video above was rendered on a Macbook Pro with an Intel Core 2 Duo 2.4ghz with 2gb of RAM and an 8600m GT and it averages 5 frames per second, so to really experience the full potential of this, it needs to run on a Mac with a fairly powerful video card like a Mac Pro, the iMac’s and new Macbook Pro’s should also render it quite nicely.

The reason it is so intensive is because there are a number of iterator and replicate in space patches along with LFO’s and interpolator’s that are affected by both the audio volume peak and the audio spectrum, so depending on the volume and the type of music, the visualisation develops more variation.

Mandelbrot Player

Wednesday, November 5th, 2008

The mandelbrot before audio playback commencesI’ve built on my previous Frequency Mandelbrot to add basic audio playback controls to it. It no longer starts automatically upon loading, you now have to press ‘P‘ on your keyboard to begin playback and there are a number of other hot keys for different playback options.

An audio file can be played, paused, rewound, and fast-forwarded. The left and right audio channels as well as beats and the overall volume are taken and used to colour a mandelbrot fractal. The left and right audio channels generate a series of lines that change speed and direction based on the audio peaks. The centre of the fractal has a constraint on it based on the beats, so as the amount of beats increase, it will freeze and stay still while the outer area of the fractal, which appears as a background continues to animate around it. And yes, it is meant to have the lines through it.

The keyboard controls for playback are:

Play: P
Pause: S
Fast-Forward: F
Rewind: R
Restart: H
Stop: Q

Mandelbrot during audio playbackA note on these playback options, at the moment, ‘Q‘ will actually close the link to the song file, so this should not be used unless it is needed. Attempting to start the song again with ‘P‘ after ‘Q‘ has been used will cause Processing to error. I haven’t gotten around this as of yet unfortunately.

To replay a song from the start, press ‘H‘ and this will return the play head to the start of the file.

Rewind ‘R‘ and fast forward ‘F‘ skip the track back and forward by 500 milliseconds, so ‘R‘ should be used in place of ‘H‘ if you don’t want to return to the start of the song.

The source code is a little bit different to previous versions as I have added a class for keyPressed to determine what to do if the control keys are pressed:

// Create the controls.
void keyPressed()
if ( key == 'p' ); // Press P to play the song.
if ( key == 's' ) song.pause(); // Press S to pause playing.
if ( key == 'h' ) song.rewind(); // Press H to reset to the start.
if ( key == 'f' ) song.skip(500); // Press F to fast forward.
if ( key == 'r' ) song.skip(-500); // Press R to rewind.
if ( key == 'q' ) song.close(); // Press Q to quit playing.

It’s all fairly straight forward, the Minim library is very simple to use and there are some great tools in it that you can play with. I highly recommend it if you are working with audio in Processing.

You can have a look at it in action here. The song used in this piece is “Freedom (Waking Mix)” by vo1k1 2008 – Licensed under Creative Commons Attribution Noncommercial (3.0).

This is fairly CPU intensive, so many computers will have trouble running this, it is also about 9mb to load so you probably don’t want to try it on a low speed connection.

The full source code is available from the same page as the applet, or you can see it after the jump:


Plasma Box – Quartz Composer

Tuesday, November 4th, 2008

Plasma Box - Quartz ComposerThis is a fairly simple Quartz Composer visualisation that I developed to be a screensaver or to run in the background of an environment to help develop an atmosphere. The idea originally came from when I was walking past the Chalk Hotel in Woolloongabba in winter and noticed that they had big LCD’s on a couple of walls playing a video loop of a fire to help create the sense of warmth and a warm atmosphere, even though there was almost no heat actually being produced by the LCD’s.

What I have created here is floating plasma that slowly floats from the bottom to the top of the screen and accumulates at the top. Audio input is taken from the microphone and combined with an LFO so that it is constantly varying between the base colours that the LFO covers and then other colours dependent on audio spikes. The audio input is also used to make the plasma “shy”, that is, as the input volume increases, the plasma starts to get smaller and disappear until the volume starts to subside again, then it comes back.

The basis of this is created with a Quartz Flame Image patch, ideally, I would have liked to redo this with a more controllable particle system, but that is for another time.

Download the Quartz Composer file here. Note that this requires OS X 10.5 Leopard. It will not work in Tiger as I have used patches that were not available in Tiger.

Check out the video below which shows the visualisation running with the song “Wired but Disconnected” by duckett.