LatheMachine

Like everyone else in the world, I have been mucking about with Leopard on my Mac. As a developer, Leopard holds a lot of attraction for me. I can see myself spending an almost infinite amount of joyful time just coming to grips with all the new stuff Apple have bundled into Cocoa.

One thing I've been particularly looking forward to is the new Quartz Composer 3.0. AudioCodex is a host for Quartz Compositions, so new QC features add significant functionality to our app for free. Of course, there's always the worry that new stuff will break our implementation, but thankfully that hasn't happened.

One of the things that interests me most is the new Music Visualizer protocol included in Leopard QC, which defines some properties that can be plugged into data piped in from an application.

For contrast, in the Tiger version of QC, the only way to get audio signals into a composition was by monitoring the audio input of the system, usually the microphone input. The downside of this approach is that audio visualizers cease functioning when you have headphones on.

With Leopard it will be possible for us to pump spectrum and amplitude data directly from AudioCodex into a visualizer for the first time. We now have to get to work implementing these new capabilities. One thing we currently lack is a way to extract spectrum info from a playing track. However, Leopard looks promising on that front as well. But that's another story.

All of this is great for us, but then we haven't spent any time implementing our own libraries to do these kinds of things in pre-Leopard systems. It must be a bit scary if you are, for instance, Rogue Amoeba with a business model built on your own proprietary audio hijacking and analysis.

Lathe, Jelly, Stix

Apple has already added to iTunes in Leopard the visualizer capabilities I'm talking about. To demonstrate how cool this idea is, they have included 3 new Audio Visualizer compositions in Leopard, accessible from iTunes' View menu, named Lathe, Jelly and Stix. These three visualizers are pure genius. If you haven't already, check them out.

Because this is QC, these new compositions are also, by default, open source. For those who were not aware, any QTZ can be opened simply by installing Quartz Composer from the developer tools. My personal favourite here is Lathe, so I thought I'd take a look at customising it somewhat to work with AudioCodex (as it stands, without magical value teleportation).

Customising Lathe

So I opened up Lathe in Quartz Composer and added an Audio Input patch so that Lathe has something to respond to. As mentioned, this is not optimal, but at least it works in AudioCodex 0.94b. I plugged the Volume Peak output into the Audio Peak inputs of the existing Lathe and Bump patches. I plugged the Spectrum output into the Spectrum input of the Audio Processor patch.

The next thing I did was select all the patches and then cut and paste them inside a Trackball patch so we can take a 3d tour around our Lathe. I also turned off the Enable property of the Padded Room background billboard patch, as I like my compositions to render onto a transparent background.

I made a few tweaks to the Lower Bound property and the Iterations property of the Bump and Lathe patches respectively. These seem to be the main parameters controlling the look of the render. So I went ahead and published these inputs to the top level of the patch so they are accessible from AudioCodex.

Finally, I saved the patch to ~/Library/Application Support/AudioCodex/Compositions and renamed it LatheMachine.

Update: AudioCodex 1.0

AudioCodex 1.0 includes LatheMachine as a standard install.

Update: More on the Music Visualizer Protocol

Qtzlcodex article

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
5 + 15 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Navigation

User login

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
16 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Recent