Possibly not spam ramblings and links from the edge of the universe

15Nov/111

LadioCast automation (AppleScript)

Posted by dracoling

Playing music is fun, LadioCast is an awesome tool that lets you broadcast ANY audio from your soundcard to an icecast server. It also lets you mix from multiple sources. Being a simple tool it doesn't grab it's own metadata info or anything fancy like that. There are several common ways to update this info and they're covered other places online. Below I've included my own ladiocast_update script that adds a bit extra to the metadata mix.

Sometimes you want to play a stream for a bit and then drop offline cleanly, but you don't want to hang around to wait for it to finish (sleep is awesome once or twice a month).

Through the magic of AppleScript you can do this. [We can have platform debates later, my whole broadcast kit is in osx right now, get over it.]

This script queries iTunes for the current state (playing, paused, stopped). If the stream is seen playing or paused it updates the metadata in ladiocast with the info from the currently playing track. If it finds that it has stopped it plays the "radio off" playlist (used to give a sign-off message), waits a little bit (for the message to finish) and then kills the stream.