Even though it's only been a couple weeks since I started podcasting, it's clear that much of the music I'll send out will have begun life on a computer via a notation program such as Rosegarden, which is essentially an electronic version of blank music paper. If you're a latter-day Beethoven, that's all you need to write your masterpiece. If you then want it performed by a robot orchestra for posterity, you need additional tools. Here's how I get from my mind's ear to podcast-ready audio.

  1. Install Rosegarden, TiMidity++, and LAME.
  2. Launch Rosegarden.
  3. Write amazing music, saving frequently in case computer goes out of tune.
  4. When finished, export to MIDI from the menu, saving as my-amazing-music.mid.
  5. $ midi2mp3 my-amazing-music.mid
  6. Publish my-amazing-music.mp3.

Here's midi2mp3:

#!/bin/sh

midi2wav()
{
        timidity -OaS -o "$1".aif "$1".mid && rm "$1".mid
}

wav2mp3()
{
        lame "$1".aif "$1".mp3 && rm "$1".aif
}

die()
{
        echo 2>&1 "$@"
        exit 1
}

main()
{
        local filename
        [ $# -eq 1 ] || die "usage: $0 filename.mid"
        filename=`basename "$1" .mid`
        cd `dirname "$1"`
        midi2wav "$filename" || die "error: midi2wav failed"
        wav2mp3 "$filename" || die "error: wav2mp3 failed"
}

main "$@"
exit $?