About

Build: v0.0.0-20251107220000-1c68b8386897

Mildred began in 2003 when I learned that the ⅛ in monaural jack in the back of my 400-disc CD player could be connected to my computer's parallel port in order to read the CD player's status and send it commands. I immediately started working on programs to determine the current disc that was playing (the album titles could be programmed into the CD player, or, in some cases, read from the disc itself). Then programs to select a particular disc and track. While working on those, I started compiling a Postgres database of the artists, albums, and songs in my collection. Eventually I had enough programs and bash scripts cobbled together to provide my own "radio station", with the ability to select and play playlists or random songs.

With the groundwork laid, I started working on a web interface (written in PHP) to the database, exposing the currently playing song, and allowing for songs to be requested via the web. Along the way I bought another 400-disc changer, and daisy chained it into the existing system. The players had a cross-fading function, which meant that the tunes were non-stop, as each player could cue a song while the other player was playing.[^1] This basic system saw several rapid iterations in style and PHP version. I added basic scheduling support so in the evenings the music would be more mellow, while during the day they were more up-beat. I also started recording song ratings in the database, along with a history of which songs were played when. Using these as inputs I added "smart random" functionality to bias Mildred towards playing my favorite songs, but also make sure songs that I hadn't heard in a while got their chance to shine.

The next logical step was to integrate it with Icecast to stream my music over the Internet so that my friends could listen in and request songs from my collection too.

With hard drive prices coming down, the move to digital was inevitable, but ripping almost 800 CDs was going to be tedious to say the least. Fortunately, in addition to the ⅛ in monaural jack that let me control my CD players, they also had optical outputs which could be connected to a computer sound card to provide a digital signal from the players. Since I had already built scripts to cue specific discs, and a database to know the song titles, I was able to write a program to go through each CD in my collection, cue it, play it, and rip it to disk—all automatically. It took over two weeks to work through my entire collection, but it beat the heck out of loading each disc into my PC manually. As an added bonus, the files were each named and tagged appropriately. I wired up the wonderful Muisc Player Daemon to handle playing my new FLAC library and a new era of Mildred began.

In 2005 I started reading about Ruby on Rails, and I knew I had to rewrite Mildred, again, but this time in Ruby. This proved to be both a daunting task, but also a rewarding one as it helped me professionally (I worked with Rails for about five years). Mildred saw a number of iterations that included experiments using the nascent JavaScript and jQuery drag-and-drop functionality to provide a view of the play queue, allowing songs, albums, and artist "power blocks" to be added, removed, and re-ordered in the queue.

In 2014 I once again got the rewrite itch. I'd been working with Golang at work and wanted to see if I could make the song selection engine in Mildred faster. I also wanted to try a Docker deployment strategy. I'd had fun writing an Elm SPA for work too. So, I rolled up my sleeves and started to re-write Mildred yet again, this time with a Golang backend, Elm frontend, and with Docker deployment the whole way along. The result is what you see now: https://mildred.xmtp.net/.

TODO explain how the mildred-next project came to be.

[^1]: It took each player at most 45 seconds to select a disc and cue a track, so my software ignored all songs shorter than 45 seconds—I wanted to keep the music flowing! This vestigial requirement still exists.

headphones