Some progress has been made since the last post about the jukebox project. To properly set expectations, if you read jukebox and thought Cool! This guy resurrected an old jukebox found on trash night with the expectation of seeing pictures of wires, solder and electromagnetic components, you might want to keep moving. The progress thus far has been all software and there are no cool making photos or videos to be had, yet.
However, if you want to read about some starts and stops on getting a simple music server running, stick around…
The Music Server
Since I didn’t have an actual jukebox to poke at, I needed to work on something else. The music server seemed like an obvious choice. The initial idea was to write a simple Python script as the vision for this jukebox doesn’t require much in the way of functionality. With the help of Chat GPT, I had a listen world script playing music in less than five minutes.
After a couple test songs, I started think about what else needed to be added. That led to me thinking about how many people have probably done this already. At that point, I abandoned the idea of creating my own server in favor of using one of the freely available ones. Furthermore, I had the bright idea of configuring it in a Docker container in order to more easily move it to a different device when the time came.
Once again with Chat GPT in hand, I vibe configured (can’t call this coding) Mopidy in a Docker container. Then I noticed that Navidrome had a jukebox mode. So used that instead. As streaming servers, both of these worked great. They indexed audio files quickly and played them via nice web interfaces. But, that’s not exactly what I wanted to do. Enter Navidrome’s jukebox mode! This plays audio on the device it’s installed on and lets one remotely add songs to the queue.
Unfortunately, it doesn’t seem possible to route audio from a Docker container to the system audio on a Mac. I learned this only after Chat GPT hallucinations led me down several dead ends. This was probably going to work fine on Linux though, so all was not lost. I spend a little time understanding the jukebox API and what commands would need to come from the jukebox hardware to play songs on Navidrome.
Then, I spent a few days away from the project. In rethinking things, using a fully featured music streamer for this project seemed like overkill. This just needs to play songs from a queue and the primary UI is buttons on an old jukebox. It doesn’t need multi-client streaming, playlists, album art, etc.
Long story short, I scrapped everything and went back to the simple Python script idea. While I could have done without the Docker detour, I have something now that is doing exactly what I want, and well. Furthermore, it should run just fine as a service on a Raspberry Pi when the time comes.
Next steps…
At this point, there’s not much more I can do without the actual jukebox hardware. I might work on a couple utility type things in the meantime. An obvious drawback of rolling your own simple, music player is that it’s, well, simple. It would be nice to have a more efficient way to index the audio files so they can be called with a button selection (e.g. A1 or J6). Doing this manually loses gets old after the third track. There also needs to be a way to create the title cards because copying and pasting all of them would be a real drag.
Stay tuned…