Devious Fish
pianod History

Pianod History

pianod started in 2012 as a Pandora music client for home automation and multi-listener environments. With a line-oriented socket interface, the player could be controlled via TCP/IP sockets; telnet, nc, and a shell script were common ways to control playback. The software used an open-source library, libpiano, to interface with Pandora; pianod’s language, C, was chosen based on this library.

When WebSockets RFC 6455 were standardized, a web-based client was added. Initially this required an external program, but to simplify things WebSocket support was integrated into pianod’s communication layer (named “Football”), along with a rudimentary HTTP server.

Growing complexity and a list of new features in early 2014 suggested a redesign. In October, a new architecture was planned and coding commenced, switching from C to C++. A C++ wrapper was added around the communication layer, but over time the rest of the code has been updated or refactored to better reflect C++ and the STL. Snippets of the original C code remain, especially within the Pandora source. Architecturally pianod2 changed to support new features: multiple music sources (such as a local collection and Pandora), multiple outputs (“rooms”), and integration with the open-source projects ffmpeg or libav to provide playback.

pianod2’s filesystem source takes ideas from mserv (mserv.org), and reuses an enhanced filter algorithm provided as a patch for that project. The filter turned out to be incredibly useful when performing cross-source actions, such as adding a seed to Pandora from a song playing off a local filesystem. Fulfilling requirements such as these, along with enhancements to the filter, created edit fatigue in the filter which eventually lead to refactoring it to C++, which helped clean up the code and ensure its reliability.

pianod2 was gradually fleshed out to the feature set of the original, then expanded with new features such as crossfading.

Orchid, an OS X pre-packaged application, was created using the pianod2 engine with a Mac user interface and preferences pane. This is still early in its development.

libav’s evolution has lead to problems, and support for it was dropped in favor of gstreamer.