Maeglin (maeglin73) wrote,
Maeglin
maeglin73

Frustration is the father of invention

You knew that it had 2 parents, right?

Backstory

When I first started streaming music from Last.FM, I found a script called Last.FM Proxy that allowed me to use it with my SoundBridge and home stereo (my preferred way to listen to digital music at home). It worked well for a while, too, but it didn't take long to run into snags.

Between my entertainment center and the rest of my home network is a wireless connection, which at times can be a little flaky. When that happens, or even looks like it MIGHT happen, the SoundBridge can develop an itchy trigger finger when it comes to reconnecting to an audio stream. In the case of LFP, whenever the SoundBridge reconnected, the proxy tried to do the same with regard to the Last.FM servers. Those servers don't like it when you try to restart a song, so at times during the day I would end up with a lot of unwanted track skipping.

My solution

The idea that I had was to separate the Soundbridge<->proxy connection from the proxy<->Last.FM connection. That way, the latter wouldn't be broken up by the former quite so easily, and instead the former would just pick up more or less where it left off.

In theory, this didn't seem that difficult. The difficulty arose in making it happen. Last.FM Proxy is written in Python, which isn't that big a deal (I don't know the language that well, but I can figure it out pretty easily). What was a big deal was the fact that my changes would have to be fairly major, that Python is a huge stickler for indentation, and that the guy that wrote the script didn't believe in using tab characters. That combination of things didn't do a lot for making that project approachable, so I decided to rewrite the thing in a language that I knew a lot better... C++.

So far, so good

At this point, I have a working Last.FM proxy server that streams from their servers to any Shoutcast-compatible streaming client (like the SoundBridge), scrobbles listened tracks to their servers, and implements the basic controls that are currently possible with the Last.FM streaming/scrobbling protocols (not everything that you can do in the Last.FM client, but most of it). I did accomplish my goal of making it resistant to the SoundBridge's twitchiness, and an interesting side effect is that multiple streaming clients can receive the same content at the same time.

What's left? Not a lot. There are some rough edges to smooth out, but not many major pieces left. Those pieces are a user interface of some sort and, oh yeah, a name :-)

The user interface is going to be web-based, using HTML and a healthy dose of JavaScript. I already have what I hope is enough in the server code to support it, so now it's all about web development. I'm also implementing things in the server that could allow for more interesting UIs... things like systray-style apps for GUI environments (starting with Windows, if I go that route). It may even be an interesting first project using Adobe's AIR platform.

The name isn't so easy... I'm coming up dry there. It's unfortunate that the most logical name for the program is taken by the one I'm trying to replace. Any suggestions?
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments