After a little bit more work in Max, I’ve extended the tap tempo calculator to diferentiate between semibreves, minims, crotchets, quavers and semi-quavers rather than just displaying the crotchet timing. I have left the big LED in so that it can be compared.
Basically the difference is that now the crotchets are split down into semi-quavers, and from there the metro goes into a counter and to the LED’s which are lit up as the counter counts through them on each beat of the metronome.
Aside from that it remains very simple in what it does – just does it in a slightly more interesting way. I’ll put up some more interesting things done in Max/MSP/Jitter soon, promise.
I’ve been having a bit of a play with Quartz Composer since I haven’t had a chance to do much in the way of computational arts since uni finished last semester. In doing so, I came up with this, which as you can see became the background of the current website design!
I decided to start off with a halo generator to create a similar effect to a lens flare which I then built on with audio input from the MacBook Pro’s built-in microphone to make it a more interesting effect. Adding in a replicate in space which chances direction over 8 replications gives it the appearance of movement amongst itself, again making it a bit more interesting, but what I really like about this is that it turns it into a colourful iris, which I really quite like.
When the audio is fairly quiet, the iris is small and fades in and out. As the audio volume increases, the iris grows and changes colour.
It can be downloaded here, you are welcome to have a look and play around with it as you like! Just remember, like everything else on this website, it is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Australia License. So anything you do with it must attribute me as the original artist, me, be shared under a share alike license and cannot be used commercially.
This has been done in Quartz Composer for OS X 10.5 Leopard, so it may not work correctly on Tiger. I don’t think I’ve used anything that was new in Leopard, but I’m not sure. So if you are using Tiger, good luck!
I’ve rendered a video which is now up on YouTube to give you an idea of how it looks.
At the moment, it is great for a little while, but unless the music is constantly changing, the interest is lost as it begins to show similar patterns repeating themselves. If you have a look at the Quartz Composition, it’s a pretty simple one really, so I’m sure there is plenty more I can do with it yet to make it that bit more interesting for a bit longer!
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 http://ccmixter.org/files/elB/16075 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.
This 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.
Where I had been experimenting with just the outsides of the mandelbrot before, I’ve started having a look at modifying the inside of the fractal as well. I’ve continued to use the frequency spectrum for the effects simply because it goes with the frequency spectrum used in the background.
import ddf.minim.*;
import ddf.minim.analysis.*;
FFT fft;
AudioPlayer song;
BeatDetect beat;
float fSize;
void setup()
{
size(300, 300);
// always start Minim first!
Minim.start(this);
// specify 512 for the length of the sample buffers
// the default buffer size is 1024
song = Minim.loadFile("freedom.mp3", 512);
song.play();
beat = new BeatDetect();
float fSize = 20;
// an FFT needs to know how
// long the audio buffers it will be analyzing are
// and also needs to know
// the sample rate of the audio it is analyzing is
fft = new FFT(song.bufferSize(), song.sampleRate());
}
void draw()
{
background(0);
// first perform a forward fft on one of song's buffers
// I'm using the mix buffer
// but you can use any one you like
fft.forward(song.mix);
fill(255);
loadPixels();
// Maximum number of iterations for each point on the complex plane
float maxiterations = 200;
float xmin = -2.5;
float ymin = -2;
float wh = 2;
beat.detect(song.mix);
if ( beat.isOnset() ) fSize += 0.1;
fSize = constrain(fSize, -10, 10);
ymin = -1;
xmin = -1.5;
maxiterations = maxiterations + fSize;
// x goes from xmin to xmax
float xmax = xmin + wh;
// y goes from ymin to ymax
float ymax = ymin + wh;
// Calculate amount we increment x,y for each pixel
float dx = (xmax - xmin) / (width);
float dy = (ymax - ymin) / (height);
// Start y
float y = ymin;
for(int j = 0; j < height; j++) {
// Start x
float x = xmin;
for(int i = 0; i < width; i++) {
// Now we test, as we iterate z = z^2 + cm does z tend towards infinity?
float a = x;
float b = y;
int n = 0;
while (n < maxiterations) {
float aa = a * a;
float bb = b * b;
float twoab = 2.0 * a * b;
a = aa - bb + x;
b = twoab + y;
// Infinty in our finite world is simple, let's just consider it 16
if(aa + bb > 16.0f) {
break; }
n++;
}
// We color each pixel based on how long it takes to get to infinity
// If we never got there, let's pick the color black
if (n == maxiterations) pixels[i+j*width] = 0;
else pixels[i+j*width] = color(n*(song.right.get(i)*50) % 255, n*(song.left.get(i)*50) % 200, n*(song.right.get(i)*30));
x += dx;
}
y += dy;
}
updatePixels();
}
void stop()
{
song.close();
super.stop();
}
In this version I have used the BeatDetect class and another variable, fSize with a constraint on it and then added to the maximum iterations. This allows the frequency spectrum to spread through the mandelbrot fractal, or appear to anyway. It is actually just using the frequency spectrum to colour the fractal, and this makes it appear like spectrum is forming the fractal.
This is fairly CPU intensive, so many computers will have trouble running this, it is also about 13mb to load so you probably don’t want to try it on a low speed connection.