08 ottobre 2009

Lo screen saver "radiocorriere" dei BBC Radio Labs

Sto leggendo con stupito (e forse stupido) interesse le note lasciate l'altro giorno sul blog dei BBC Radio Labs da Duncan Robertson, gentilmente inoltrate dal solito Francesco. Duncan racconta di avere esplorato le capacità di QuartzComposer, un linguaggio di programmazione visuale integrato nei tool di sviluppo XCode del sistema operativo MacOS X. QC permette di realizzar complicate applicazioni di trattamento grafico delle informazioni senza dover scrivere una sola riga di codice. Lo sviluppo avviene assemblando i blocchi logici e funzionali (le patches) in "combinazioni" che possono essere eseguite da qualsiasi applicazione QuickTime o visualizzate sottoforma di screen saver dinamico. Duncan precisa che se fino a a questo momento QC era un po' limitato quanto ad acquisizione di dati dall'esterno poiché compatibile solo con i feed RSS, la versione attualmente in circolazione con MacOS X Snow Leopard ha ampliato queste possibilità includendo porzioni più ampie di XML.
Grazie a queste estensioni, Duncan ha realizzato una composizione QC che esplora i flussi di informazione relativi ai programmi di BBC Radio e visualizza in tempo reale una specie di guida visuale alle trasmissioni in onda in un dato momento, che appare sullo sfondo del desktop quando si attiva il salvaschermo. L'applicazione, che funziona solo ed esclusivamente con Snow Leopard (ce l'ho ma non l'ho ancora installato e quindi non posso vedere com'è), è disponibile dalle pagine dei Radio Labs. E' l'ennesimo spunto di riflessione sulle nuove modalità di convivenza tra un medium antico come la radio e i nuoi mezzi multimediali. Pensate a quanto sarebbe interessante adattare lo screen saver "radiocorriere" di Duncan alle informazioni sui programmi di centinaia di stazioni, magari con una funzione di time machine capace di indicare quali saranno i programmi futuri e una interfaccia diretta che consenta di programmare la ricezione o la registrazione di quei programmi, sempre via Internet beninteso.


Fun with Quartz Composer in Snow Leopard and the BBC Radio Schedule
Duncan Robertson 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:

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.
You can download the composition here:

BBCRadioNow1.0.zip

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//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.

Nessun commento: