And 37th in the Mixcloud Interview Chart is … The Coiled Spring

*Music swells as he walks up to the stage, shaking hands and hugging people as he goes*

“Wow. This is… this is such an honour. Not to mention a surprise! This represents such a validation of what we’ve been trying to do, that it means so much more. The Coiled Spring is not just a podcast, but a labour of love, an outlet, a valve, a forum, a mouthpiece, a soapbox. One could say it has a lot of potential!

“Seriously though. I want to thank the makers of the free and open source software that makes the creation process so smooth and enjoyable, the guests for agreeing to be grist for my little independent mill, but most of all, the listeners. You are the people who make this all possible, and worthwhile.

“There are so many independently-produced podcasts out there. The big commercial podcasts, with their high budgets and production values, professional presenters, merry-go-round of big-name guests, sponsored by credit cards and DRM-infested audiobooks, they provide entertainment, yes. But for hand-crafted personally-inspired listening, you can’t go wrong with an indie.”

*Music starts playing over speech, as usher approaches to encourage him off*

“So I’d just like to say thank you to my wonderful wife Cassie, who’s been so supportive and indulgent of this project, and finally to my beautiful children, Edith and Arthur. You are my world and my life, and it’s past your bedtime! Thank you!”


Podcast Creation Script – Update

I’m just now posting the latest episodes, and they will all be generated using the updated version of my podcast creation script as described here.

The basic script calls a series of functions:

  • cs_set_variables, cs_set_filenames – set required variables and filenames
  • cs_choose_background_color – choose a background colour for the art, generated based on the episode number in such a way as to have it change significantly for each episode.
  • cs_art_background – create background using ImageMagick
  • cs_art_texts – generate text images
  • cs_art_logo – generate Coiled Spring logo image
  • cs_art_cover – generate cover image
  • cs_art_combine – combine all images into the complete cover art
  • cs_audio_speech – generate all the speech using espeak
  • cs_audio_fix_existing – fix all input audio files for sample rate etc using SoX.
  • cs_audio_logotone – create interstitial logotone using speech and random beeps
  • cs_audio_mix_intro – mix the intro music and the intro speech
  • cs_audio_concat_process – string together all the audio files into the complete episode, process using a dynamic compression algorithm to improve the sound, and then convert to MP3
  • cs_audio_tag – Use eyeD3 to tag the MP3 file with the title and episode number
  • cs_delete_working – delete all the working files

To do

There are still some improvements I could make. The following list includes stuff I thought of when I originally posted the script. Some are now fixed, some are redundant, some are new ideas.

  • I’m sure the script as it stands has some inefficiencies in it. I would like to fix it if I get the chance, or if anyone fancied lending me a hand.
  • Is bash the best language to use? Seems fine to me.
  • Generate multiple logotones instead of just having one repeated. Perhaps say, “End of Part 1 of the Coiled Spring” etc. Use different random beeps in each one, or even a different sound effect. Just leave it for now.
  • Use a seeded random generator to make sure the background color changes sufficiently between episodes. Maybe base it on the episode number and title for predictability. (Alternatively, use a trick to combine the title and episode number, turn it into the color, and not be random at all.) Done. If you’re interested, the background colour is generation is described in a separate blog post.
  • Alternatively, generate the artwork first using a random colour, display the result, and then only proceed to create the sound file when the artwork is approved. I did this for a while, until the colour generation was fixed.
  • Get rid of so many temporary files by using pipes and other things to feed results of one command to another command directly.
  • Understand the artwork filter – make it more like GIMP‘s “colour to alpha” function. Perhaps a normalization before the process starts. I found a script someone wrote that does a pretty good job.
  • Tweak the compression settings to improve the audio quality. I’m happy with it for now.
  • Tweak the sample rate to improve the audio quality. I’m happy with it now.
  • Put the reused files in a different directory, and create the new files in their own directory. This is tricky with bash. Done.
  • Get the script to open a browser, go to OpenStreetMap, find a relevant place (maybe ask for a location (or just a URL to be simple)), use a command-line screenshot tool to grab the map, use ImageMagick to manipulate the image (rotate, crop, filter), and then use that as a background. Maybe just provide a map image, and randomly crop it for each episode. I’ve decided to use a particular image for each episode, filtered specially.
  • Tweak the settings to make the voice a little better (the espeak voice, obviously, ahem). I’m happy with it for now.

Background Colour Selection

This is a super specific technical post, but it was something I worked to figure out, and I said I would document how things got done, so here it is.

The generated artwork is done in a certain style. The text and logo remain the same, the big episode number is always there, and a different processed foreground image is used each time to reflect the subject of the episode.

  1. The background colour must change each time.
  2. It must always be a certain brightness and saturation of colour – no dark browns or shocking picks.
  3. Choosing randomly runs the risk of choosing the same colour twice in a row, or too close a choice.
  4. Just incrementing the colour with the episode number wouldn’t change enough.

Here’s what I came up with. ImageMagick uses various colour models, including RGB and CMYK. But I chose HSL. This takes three values, representing Hue, Saturation, and Lightness.

Saturation is the richness of the colour. I didn’t want things too rich or bright, but rather a toned-down level like those on the Penguin paperbacks I was inspired by. After some experimentation, I chose a level of about 50%. It didn’t have to change for each episode.

Lightness is pretty self-explanatory. The colour had to be light enough to show up the processed black artwork, but dark enough to show up the white text. After some experimentation, I chose a level of about 30%. It didn’t have to change for each episode.

Hue is the actual colour, and is a value of 0-360 around a colour wheel. This colour picking website shows it all quite well, and was very useful in figuring this all out. Hue had to change for each episode.

In order to meet all the criteria listed above, this is the calculation used to generate the colour:

CS_Episode_Colour="hsl($(((episode_number*hue_increment) % 360))%,${saturation},${lightness})"


saturation = 50%, lightness = 30%, hue_increment = 171

What this does is create a HSL specification string in the form “hsl(0-360,0-100%,0-100%)” by taking the episode number, multiplying it by a value called “hue_increment”, dividing by 360 and taking the modulus (remainder), and setting the saturation and lightness values to the regular chosen values. Taking the modulus ensured that the value was within the range 0-360.

Where did I get 171 from? Once the other values had been settled, this was the one that took the most deciding. The way the calculation works, the value jumps by 171 each time, and the modulus ensures that it loops round when it’s greater than 360. Experimentation showed that the value of 171 gave a good change each episode, while not being too regular.

And that’s how the episode number dictates the background colour of the artwork.