Posts Tagged ‘lastfm’

iPhone Scrobbling

Dear Apple,

iPhone SettingsiPhone Music SettingsiPhone Last.fm Settings

I’ve had my iPhone almost a year now. It’s been out for a little over twenty-four months, if I can add up right. Is there a decent reason that I have still have to jump through hoops to add music I play to Last.fm? Sure, Last.fm is a comparatively small site1 – but you’re touting Facebook and Flickr exporting features as a pretty major upgrade to iPhoto. Plus, I can’t imagine that something like this would be particularly difficult for you guys to code.

It’s not like scrobbling is really data-intensive, either. Basically, I just don’t see why you haven’t done it yet.

Cheers,

Alex

Click the images for bigger versions. No, you get no points for realising I did them in Photoshop; it’s not tough.

  1. 30 million active users, versus Facebook’s 200 million; so says the Gospel according to Wikipedia

Graph Last.fm Scrobbles by Time of Day

I've put together a little page that uses the Google Chart API to put together a bar graph of what time you played the hundred most recent tracks on your Last.fm profile. I love this API from Google – it's really nice and flexible.

You can find it at http://alex.mullr.net/lastfm/graph/.

Hack Day ‘08

The Last.fm Hack Day took place last month, and I can’t believe I didn’t post anything about it at the time.

Last.fm Hack Day

It was a great day spent (for me) learning the basics of Python and, a technical term here, "pissing about" with the Last.fm API. There was a Microsoft Surface and Xboxes on hand to entertain us, and plenty of free food and drink.

While I didn’t accomplish anything particularly amazing (at the time, it was noted that you could do everything I managed with the actual Last.fm website), the environment was incredibly conducive to producing good code. Plus, some of the people who were actually trying (Your Next Favourite Band?) made some great little things. See the official Last.fm blog post for links to all the apps.

Russ (from Last.fm) and I (and many, many others) both have some photos on Flickr, though his are just a little better. You can see a video that was created of the day on the group page, and I’ve put a copy on S3 in case the original disappears. And yes, unfortunately I do make an appearance… :D

Perceptions

I find it really interesting hearing people’s thoughts on copyright, legality and entitlement. The red is me.

[03/01 00:56:51] limewire has free music
[03/01 00:57:05] limewire’s illegal
[03/01 00:57:37] last fm is doing exactly the same as limewire so technically it should b too
[03/01 00:57:54] except that they pay the artists… :)
[03/01 00:58:32] theres 1 positve

To summarise the conversation: It’s a good thing Last.fm pays artists; people like artists, and music, and want them to stick around (shocking!). Last.fm isn’t fluid enough at the moment, and is losing possible users to (loosely defined) piracy because of it. And it’s not obvious that Last.fm is any more legal than Limewire.

The reason this is being dragged up now is because I received an invitation for Spotify from Ernesto this evening. The complaints I’ve heard about Last.fm are that playing a song sometimes takes too long and it simply doesn’t have the catalog required to keep people interested. Spotify, it seems, solves these problems. After doing a couple of searches with people much more into shit popular music than I am, it passes the catalog test. It also passes the speed test, with songs playing instantly – if you put this in front of someone, I’m not sure it would be immediately apparently that it’s an online service.

The best news? At the end of last month, Spotify announced that they support scrobbling to Last.fm directly from the preferences of their application. The two services can play brilliantly together. Whilst I won’t be paying the £10 a month for Spotify’s premium service (hell, the adverts aren’t even intrusive or often), the UK-based scrobbling site should be glad to hear that they won’t be losing the £1.50 I pay them per month, either.

Update to My Last.fm Scrobbling Test

I spent a bit of time this evening updating my Last.fm scrobbler (if you can call it that), which I have written about before.

It simply makes it a lot easier to use: enter your username and password, click the button (I know the enter key doesn’t work, and I hate myself for not being able to fix it). You’ll move to a page where you need to enter three fields (artist, track and length) and click submit. Done. When compared to the old method, it’s several thousand times better.

I feel much happier. I’m trying to do something interesting with it involving Delicious, but we’ll see if I can get the code working or not…

By the way: not including a giant, massive link to the new page is one of the smartest things I’ve ever done. *facepalm*.

Here’s One I Made Earlier

This is hardly complicated, but it’s something that’s been bugging me. A few minutes later, tada: a script that will open the Last.fm page of the currently playing iTunes track.


tell application "iTunes"
  try
    set theArtist to artist of current track
    set theSong to name of current track
  end try
end tell

tell application "System Events"
  open location "http://www.last.fm/music/" & theArtist & "/_/" & theSong
end tell

–– Alex Muller
–– http://alex.mullr.net/blog/
–– Do what you want with it…
–– Sunday November 9th, 2008

Copy and paste the above into Script Editor (Applications > AppleScript) on the Mac, and hit compile. As the comment in the code says, this is hardly my finest piece of work (at least, I hope it isn’t), so I’m not too bothered what you do with it. Enjoy it, whatever happens…

How Genius Is Genius?

Spent half an hour this evening trying to think on what the deal with iTunes’ new Genius feature is… nobody’s totally clear on how it works, so I thought I’d half-heartedly check into whether it works better for people with a more mainstream music taste or not. Here’s the results from me pulling a few dozen random opinions from Twitter and checking them against Last.fm profiles. The x-axis is an arbitrary score I assigned based on how the Tweet sounded, and the y-axis is an “eclectic” score given by some service. I’m also doing something fun with tags, but don’t know where that’s going yet.

Chart

As you can see, it’s sort-of kind-of maybe conclusive, but nothing that’s going to wow anyone. The people satisfied with Genius tend to have a less eclectic score (more mainstream taste), if that makes sense.

If you want lend me a hand, and can be bothered, give iTunes Genius an overall "satisfaction score" of between 0 and 1. I’ll compare it against your Last.fm music profile (and please leave a link if I don’t know where to find it). This should really be automated, but I don’t have the time, motivation or know how to put it together right now. Cheers!

I’ll post something more substantial when I have something more substantial to work off. Shockingly.

Learning: XMLHttpRequest

Since I first started teaching myself PHP as well as GET and POST methods back in May to throw together a scrobbler for Last.fm, I’ve wanted to update it to make it a little more… AJAX-y (as the kids are saying today).

Yesterday, I started looking into the best way to go about doing this and came across XMLHttpRequest for the first time. Sitting here reading about it, the grin on my face grew: this thing is absolutely perfect.

XMLHttpRequest is a JavaScript object that was created by Microsoft and adopted by Mozilla. You can use it to easily retrieve data via HTTP. Despite its name, it can be used for more than just XML documents, e.g. for JSON.

XMLHttpRequest (XHR) is an API that can be used by JavaScript and other web browser scripting languages to transfer XML and other text data between a web server and a browser.

My plan at the moment is to update the old scrobbler to make it all pretty and more friendly, but I keep on running into problems. For example, XMLHttpRequest only allows data transfer across a single domain name (I might not have described that well, but that’s the case). A search reveals that this is a fairly widely known thing/issue/whatever, and I’m looking at ways to get around it at the moment. As I’m on shared hosting and don’t have access to the server configuration, I’m going to try doing it via PHP. This LiveJournal post is also applicable to the situation.

Anyway, that’s the stuff I’m getting on with at the moment. Now, back to some coding…