mp3

  • Matt and Jessamyn discuss the week in Metaflter that was. They have a nice rapport, and I think it'll be a great way to find gems across MeFi that I might have missed. (It's like a living, breathing sidebar!)
    filed under: metafilter, mp3, podcasts
  • Cringely speculates that the *real* purpose of the AppleTV is building a massive P2P network for iTunes video distribution. Clever!
    filed under: media, tv, video, mac
  • Someday everything will be tagged whether we know it or not. I, for one, welcome our new powdery RFID overlords.
    filed under: future, privacy, security, tagging

Now Hearing This

I added a sidebar to the front page here at onfocus that shows the last few albums (with cover art) I've listened to in iTunes. Let's skip why I might want to do this for now, and just jump into the how. People have been doing this since MP3 players have existed, and there are several services that can do this for you now. I send my tracks to Last.fm, and there's My Strands—both of these services have HTML snippets you can add to your site that will show some aspect of what you're listening to. Last.fm is great at putting together charts of tracks and artists, but does nothing with albums. So I had to code my own "now listening" widget to show recent albums. Here's how it works in case anyone out there wants to do something similar:
On My Server
My server has a Perl CGI script called getAlbum.cgi that accepts an artist and album name. Once getAlbum receives an artist and album, it searches for a match on Amazon via their API. If a match is found, it puts a little HTML together with the details, adds the album to a local HTML file: now-hearing.html, and removes the last entry. I include the file in my weblog, and that's what you see in the sidebar.
On My PC
With the server script in place, I just needed a little glue between the server and iTunes. A Windows script called now-playing.vbs checks to see if iTunes is open and playing, and then sends the current artist and album to the server. I set the script to run every 20 minutes with the Windows Task Scheduler. It doesn't grab everything that's playing (especially if I'm shuffling around), but it gets pretty close.
On My Mac
I use more than one computer, so I didn't want my Mac to be left behind. I set up an AppleScript that basically does the same thing as the PC script. Instead of using an outside process to run the script at regular intervals, I used the AppleScript idle handler to hit the server every 20 minutes. Then I set the script to open when I log in.
Here's the Code
If you want to try this setup, you can grab the code: You'll need to edit the scripts a bit so they're pointing to your version of getAlbum.cgi on your server, but that's about it. These scripts are working well for me, and they didn't take very long to put together. And hey, who else is going to play Toots and the Maytals back to back with Ladytron? These types of idiosyncrasies need to be put on display!
  • you can get the best of the web at mathowie's community blog (excepting pancakes)
    filed under: music, mp3, joke
  • "To investigate more formally, I purchased some time on a computer cluster and downloaded a copy of the Wikipedia archives. I wrote a little program to go through each edit and count how much of it remained in the latest version..."
    filed under: wikipedia, statistics