Saturday, 29 March 2014

Update for 2014/03/29

So, I'm working on creating a music player daemon web front end that I can use from my phone, tablet, whatever, I am currently building it on top of a Raspberry Pi, however I've also ordered a BeagleBone Black to see what difference that makes.

While anyone could throw together a mpd server system on a Pi, I want a real system that responds in real time, complete with WebSockets support so that when one app/device makes the server do something, all clients will be updated.

I have decided to blog my progress and see where I can get, it helps to write all this stuff down.

I spent all last weekend learning Sockets.IO in Node.JS (my original implementation was in Python and used a LOT of polling) and getting the system on par with what I'd done in my Python interface.

I've now completely moved from Python/Django (it is a nice system, but WebSockets/Push Notifications were... Difficult and might very well have involved Node.JS anyway) and I'm already ahead of where I was.

That was last week, so what has happened since?

Along with learning how Node.JS works (module.exports, npm etc) I've been learning the various commands for MPD and creating a JavaScript library for interacting with the server.

I wanted a totally clean separation between the HTML (and other files a theme author might want to use) and the library. As such I developed an event driven library where theme authors will write call back functions to run when the server generates an event, this should allow full artistic freedom when building an interface.

So that's the big design which I am holding to, I have not yet designed a mechanism to implement changing of themes yet, but that will come (hell, since my library isn't complete the default theme isn't even fully developed yet).

What have I achieved so far?

So far, I've implemented five functions based upon the mpd 'setvol' command (up, down, mute, unmute and set), I've enabled data from the server to update part of the display, I've implemented pause, play, next, previous, repeat, shuffle.

I've also just finished implementing a means to get information on artists and albums stored in the MPD database for display in a to be designed user interface.

I'm also looking into cover art, using musicbrainz/coverart. I'm not sure how that works yet, but I'll get there I'm sure.

So I'll stop my rambling and get back to work. Once I'm close to getting the library stable enough to achieve everything MPD does I'll write up some API docs and release them for comment.


Thursday, 20 March 2014


I don't know who (if anyone) reads this, I mean, I barely post, ever, the reality is that my life is just not the sort of exciting, roller coaster, whirlwind life most serious bloggers seem lead.

And that's ok.

I seek a quieter more secluded pace, I'm much happier staying indoors with a reference manual and Vim.

It was during one of those days that an idea came to me, I have, for the longest time, wanted to build cool things, if I may be so open, as a child, my dream was to be, as I called it, 'an inventor'.

This... seemed impossible, I disliked studying pure Mathematics and the physics/chemistry/biology combination they taught in Science class couldn't hold my attention. That was, until I got my teeth seriously into computer science.

I wanted to be the next Apple, even started my own computer company, I created a simple but rather function programming editor, like TextMate, but for Linux. In the end however, all I ever did was remove the odd virus from a Windows machine once a week, I shut up shop just a year after opening.

It's not enough to write software that only I use, it never becomes anything beyond my limited sight. There's something about users who complain and show you exactly what isn't working and why it needs to be fixed. Something about those who want to tinker with the device, who break it open and find ways to make it do things I couldn't have anticipated or even if I wouldn't use, is still pretty damn cool.

Over the last two weeks, an idea has been forming in my mind, one that I've actively been working on.

Frankly, I don't want to reveal too much right now, I want to have more to demonstrate first, what I will say is that it involves a Raspberry Pi, Music, the web and is called 'Etin'.

So... really that's it for now. I hope that I'll have the chance to do more, I spend my evenings and weekends working on it and I've got 5 people who are willing to test what I have, which is great, but for now, I'll have to first finish the software and scrape together enough money to build a handful of prototype devices.

Stay tuned, I guess.