2012
07.24

Being Open

Anyone who has used Elpis since before June 2012 probably knows all too well the pains that it has gone through in regards to Pandora’s very much closed API. Most people probably saw it as little more than the regular (once or twice a month) times when Elpis would suddenly stop working. My view, however, was that of many, many debug logs pouring in from dedicated users with who-knows-what errors telling me that, of course, Pandora has changed something. Again.

For almost the last 2 months, however, not a single change has been because it had to be done in order to make it work again. Large enhancements have even been made, with the release of version 1.4.5 last week. As I mentioned in earlier posts, this is all because that pesky API was completely rewritten to use a different protocol that shouldn’t break as often, if at all. Don’t get me wrong, this is a fantastic thing. But there is still something fundamentally wrong with the way in which all of those changes had to be done. Something that I don’t think I fully appreciated until I spent a lot of time working on implementing the new Last.FM features of the latest version.

To fully explain, you must first understand that the API code used for Elpis is a completely reverse-engineered implementation of what Pandora and their partners use in their products. Not just the old API that I threw away but the new one as well. A great deal of time was spent by dedicated community and myself, sniffing network traffic, pouring over code disassembly, cracking encryptions and generally trying to figure out how the whole system works from very little detail and absolutely no documentation.

My experience with Last.FM, however, was entirely different. It took me two months to complete the first API code for Elpis and that was mostly just porting python code from Pithos and doing a little reverse-engineering. Getting Last.FM to work, however, took less than a week. I admit, that part of that was because I found the a great library called LPFM. But I got more than halfway through a from-scratch implementation of the code I needed before abandoning it and just updating LPFM for my requirements instead. All of this was made possible by the fact that Last.FM has a free and open API.

Granted, the scope of the Last.FM code in Elpis is far from that of the code needed to communicate with Pandora. But for Last.FM, if I had a question of how something worked I could just look it up on their documentation. I could even email someone there and get a swift answer! What was interesting here was how vastly different approaches that Pandora and Last.FM have taken with accessing their systems.

Now, obviously, I understand that both services are of the commercial variety and their ultimate intent is to make a profit. I don’t fault either company for that. But I feel that Pandora’s stance of absolutely no official integration with their service unless you are one of their partners (like XBox, Roku, etc.) is doing them a great disservice. Last.FM, on the other hand, came up with a extremely simple solution to the problem. The API is open and available for all to use and you can get at any data except actually play music when accessing it from a free account. Log in with a paid account, however, and you can do anything you could do with the official clients. This means that anyone can take the documentation and write their own API, in the programming language of their choice and even make their own client, should they choose.

Those fans of Elpis who love it mainly for the hours and hours of Ad-Free listening with only a free account are probably screaming right now. But remember that my stance has always been that if you enjoy listening to Pandora via Elpis you should buy a Pandora One subscription. I would actually rather you do that than donate to me. My intent has never been to detract from Pandora’s revenue, only to free it from the confines of the web.

Also, I understand that Last.FM is setup to be much more of a social service than Pandora. So, only having access to track data and being able to scrobble is not really so much of a problem… if it was, there wouldn’t be over 600 products that support it. I know I’m proud to now count Elpis as one of them. But the sentiment still stands. If Pandora decided tomorrow to open up an API with similar restrictions to Last.FM’s, I would support it in a heartbeat. That’s not to say that the current version of Elpis wouldn’t keep working ;)

Speaking of which; Pandora, my offer still stands… contact me and I’m more than happy to help you make a better desktop client.

In the mean-time at least consider doing what Last.FM does and freeing your data from it’s shackles. I’m sure that if someone really wanted to, they could make Last.FM’s API stream music with a free account but, because they are open about it all, no one seems to have ever felt that need. And because of that, Last.FM has more control over their open system that Pandora has over their closed one.

10 comments so far

Add Your Comment
  1. Link to Pandora’s API
    http://pan-do-ra-api.wikia.com/wiki/Json/5

    • Thanks. That’s actually what I used (and contributed to) when I updated the API.

      • I have a feature request.

        When song begins to play, it is downloaded to a certain folder.
        An m3u playlist file is created within this folder labeled the station’s name including all mp3s played so far.

        • While possible, I cannot comply with the request. This would be in blatant disregard of one of the most major points of the Pandora licensing terms. As such, I will not add that feature. However, if you must, I can recommend Saver2 ( http://ridetheclown.com/wp/saver2/ ).

  2. Whenever I run Elpis, I see my cpu usage go to around 94%. The task that is listed as being responsible is System. As soon as I exit Elpis, the system returns to near-zero cpu usage. Have you heard of this problem? Do you have any idea what could be the cause?

    • The “System” process is the “idle” process… or what percentage is NOT being used. So 94% System is actually a good thing, that means only 6% usage. What percentage does it actually say that Elpis is using? On older systems, I’ve seen it as high as 8-9%.

      • It reports that Elpis is using between 6-8%, which is reasonable. On my system, the idle state is reported separately. Idle is at 6% when System is at 94%. The system is Win7-64bit. I am a programmer by profession so I think that I will get the source for Elpis and run it under the debugger. Then I should be able to break in and see what is going on in more detail. I don’t think that it is Elpis, per se but rather some sub-process that Elpis uses. Thanks for your reply.

        • Ahhh… I just assumed you were talking about System Idle Process.
          In that case… is it only an issue when Elpis is actually playing a song? If so, it’s probably the MP3 decoder. Likely something is screwed up with your audio drivers. Point is, the only thing that would effect the System Kernel process is something in the audio sub-system (Bass Audio Library), however it is far more likely that it has to do with a hardware or driver issue on your system.
          Also, try setting the audio type to AAC and see if the problem continues. AAC uses a different codec whereas MP3 uses the built-in system codec.

  3. I found the problem! There was a sound driver called “stdriverx64.sys” that was consuming all available system resources. It belonged to a software package from NCH called “SoundTap”. I don’t remember installing this package but removing it and rebooting fixed the problem. Thanks for your help. You might want to keep this in the back of your mind in case someone has a similar problem. Process Explorer from SysInternals was key in determining which driver was the cpu hog.

    • Awesome. Thanks for the update! Glad it works now! :)