« Previous | Main | Next »

Fun with Quartz Composer in Snow Leopard and the BBC Radio Schedule

Post categories:

Duncan Robertson Duncan Robertson | 12:20 UK time, Wednesday, 7 October 2009

Quartz Composer [QC] comes as part of Apples Developer Tools on OSX. It is described in Wikipedia as 'a node-based visual programming language'.

I think the easiest way to understand it, is it lets you plug things into other things to produce very cool things, without the need to write a single line of code. These things are called patches and Apple provide a whole library of them (even more in Snow Leopard). These patches wrap low level functionality in them like OpenGL , Core Image, Core Video, Bonjour Services, Apple Remote Access, Midi, XML loading and parsing etc, without you needing to understand the underlying technologies. You can also write your own patches including the ability to incorporate JavaScript to effect the patches results. A patch is like a function, you pass it some information and it returns results, without you needing to care what happens inside.

So, with all these patches, you create a composition, which is a file with a .qtz extension. Here's an example of what a composition looks like:

Quartz Composition

A composition can be ran stand-alone, exported as a QuickTime movie, or used in a Cocoa application. It can also be used as a Screen Saver or iTunes visualization simply by dragging it into the correct folder on your Mac. A patch can also be nested in a patch, so as you can imagine the compositions can get quite complex.

One of the limitations of the initial version of QC was that you could only load RSS feeds and not arbitrary XML. Luckily this had been addressed in the new version, so as well as all the other awesome new patches, there's one that lets you provide a path to some XML, and handles downloading and parsing into a structure, as well as download progress information and a flag for when the data is ready.

With this new functionality as well as other new patches, I have created a composition that rolls through the BBC's National Radio networks and displays who is currently on air, as well as downloading and displaying the network logo and a pretty image for that show. Here's a screen grab:

Quartz Composition

You can download the composition here:


To install you need to:

  1. Make sure you are running OSX 10.6 (It won't work otherwise)
  2. Unzip the downloaded file
  3. Move the BBC Radio Now.qtz file into your Screen Savers directory.
    /Users/<username>/Library/Screen Savers
  4. NOTE: You may need to create the Screen Savers directory if it doesn't exist

Now you can go to the Screen Savers settings page in system preferences, and you will be able to choose BBC Radio Now from the left hand menu. You can also adjust the duration in which the radio stations are switched via the options tab. Oh and remember, if you're not connected to the internet then you won't see anything.

Disclaimer: I made this as an unsupported demo for my own learning. If you find any problems and fixes, please post them in the comments



Copyright © 2015 BBC. The BBC is not responsible for the content of external sites. Read more.

This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.