Bembel-B Blog

2009/04/26

Keeping Track of Upcoming Music Releases with Soundamus

One thing I was missing for many many years is a (free) Internet service, that informs you of new music releases for specific artists. I even thought about making such a thing myself. A year ago or so I discovered such a service called soundamus which I highly recommend! One ingenious feature is the integration with one’s Last.fm stats.Last.fm Social Music Revolution

But the artists considered aren’t limited to your Last.fm profile. Other services like Pandora are also supported and you can alternatively manually define which artists you’d like to track.

The resulting list of upcoming releases is available as webpages, an RSS feed and iCal. So you can also integrate that iCal feed into a calendar software like Google Calendar. From my understanding, the data of releases is from Amazon Webservices, so more obscure releases might not be included (but I didn’t notice that so far).

Here are examples for the available data sources for my Last.fm profile:

There are more features and new features are being added. Check out the Last.fm Group for details on that.

2008/03/11

Scrobbling Everywhere All the Time

I must confess I’ve become quite a Last.fm fanboy. :) So what would be more important than keeping track of as much music playing as possible. Scrobbling the plays of my PC audioplayer Amarok and Foobar2000 ain’t that spectacular, but feeding statistics of my mobile MP3 Player SanDisk Sansa e200 and my stand-alone player Pinnacle SoundBridge HomeMusic (licensed by Roku) I consider being more of that kind.Last.fm Social Music Revolution

Scrobbling Sansa e200 with Rockbox

Precondition is using the great alternative Firmware Rockbox. It already has the Audioscrobbler logging built in. To submit the logs I use the PC application QTScrobbler under Linux (and occasionally Windows). That’s very easy and convenient. Just be sure to set your Sansa’s clock somewhat correct.

Scrobbling SoundBridge with Firefly Mediaserver

To gain access to my whole music collection without having a PC running, I’m using the fine Linksys NSLU2 NAS running the Firefly Mediaserver (aka. mt-daapd) with a cheapo 160 GB USB HDD (Storage) and a 2 GB USB Flash Drive (OS) attached. I’ve had a working setup using the alternative NSLU2 firmware Unslung, but soon switched to Debian ARM, for its greater versatility and more straight forward configuration.

I’ll write more detailed posts on the NSLU2 soon, especially regarding Firefly and fixed-point Transcoding and Last.fm Radio. But for now a quick overview on the setup, which should be possible on other platforms and for any streaming client too.

I obtained the Firefly Mediaserver prebuilt from the Firefly website. Installation is quite easy and well documented.

Submission to Last.fm is done by the Python application Lastfmsubmitd. As the name suggests it’s a daemon permanently waiting for data to be submitted. That data is gathered from text files placed e.g. in /var/spool/lastfm. Under Unslung I had to manually install it from source (python setup.py install), and for Debian it’s in the apt repo (but I built a deb package of the recent version found in Debian unstable).

Creating the data files is done periodically by a shell script based on what I found in the Firefly Forum. It’s run every 5 minutes by cron and queries the “last played field” of Firefly’s collection database and outputs results to Lastfmsubmitd’s spool directory.
That’s my current shell script (converting GMT+1 timestamps to UTC by substracting 3600 seconds):

#!/bin/bash

# fetch newly played songs from fireflydb and write
# into lastfmsubmitd readable format

# config
SQLITE=sqlite3
DATABASE=/var/cache/mt-daapd/songs3.db
LASTFILE=/var/cache/mt-daapd/lastfmsubmit.date
DBLSFILE=/var/cache/mt-daapd/lastfmsubmit.ls
TMPDIR=/tmp
SPOOLDIR=/var/spool/lastfm


# get last run time
if [ -e "$LASTFILE" ]
then
  . "$LASTFILE"
else
  LASTRUN=0
fi

# get last database file date
if [ -e "$DBLSFILE" ]
then       
  . "$DBLSFILE"
else     
  DBLSRUN=
fi

# exit when database file unchanged
DBLSNOW=`ls -l "$DATABASE"`
if [ "$DBLSRUN" == "$DBLSNOW" ]
then
  exit
fi

# log file date
echo "DBLSRUN=\"$DBLSNOW\"" > "$DBLSFILE"

# query database
OUTFILE=$(mktemp "$TMPDIR"/mt-daapd-XXXXXXXX)
"$SQLITE" "$DATABASE" 'SELECT artist,album,title,track,song_length,time_played FROM songs where time_played > '"$LASTRUN"' ORDER BY time_played ASC;' | gawk -F '|' '{ printf "---\nartist: \"%s\"\nalbum: \"%s\"\ntitle: \"%s\"\ntrack: %s\nlength: %d\ntime: !timestamp %s\n",$1,$2,$3,$4,$5/1000,strftime("%Y-%m-%d %T",$6-3600) }' > "$OUTFILE"

# place non-zero result into spool, else drop file
if [ -s "$OUTFILE" ]
then
  chmod 664 "$OUTFILE"
  mv "$OUTFILE" "$SPOOLDIR"
else
  rm "$OUTFILE"
fi

# log query date
echo "LASTRUN="`date +%s` > "$LASTFILE"

Downside of this solution is, Firefly will only consider a track as played, if it has been completely and continuously been played. So skipping or pausing a track will cause it to not be submitted.
Also there’s no separation between Podcasts and the rest of my music collection. What I haven’t tried yet, is the behaviour when playing web radio via Firefly playlists, as I do all radio streaming directly through the SoundBridge user interface.
To iron out the downsides using the same approach, the first one would need changes to the Firefly code I guess, the others could probably be fixed modifying the shell script.

2007/05/23

Last.fm’s New Full Length Track Playlists and Radio

Filed under: Internet radio,Last.fm,music,sound,websites — FrankZabbath @ 17:40

Last.fm just keeps getting better and better! In their May 2007 news announcement they present their extended full length track streaming offers.
Last.fm Social Music Revolution
Before that AFAIK you could only hear all streamable tracks full length when having subscribed (for free) by listening to a last.fm radio station (neighbour radio for example). There were very few songs, that could be listened full length by everyone.

Now any (unsubscribed) visitor can tune in to their own full length track radio station for any artist or tag etc.! Try for yourself!

Subscribed users can now also create full length tracklist. As soon as more than 15 different artists are added, the playlist will contain full length tracks, but in shuffled order.
To try that out I took the time and added most of my current top 50 artists into a more than 270 tracks playlist.

Enjoy! :D

2006/01/23

Musical and social networking, acoustic fingerprints, music file tagging

Extend your musical experience, get your music files tagged correctly easier.
Last.fm Social Music Revolution

Last.fm

This free service is a combination of a musical and social network web-application based on the Audioscrobbler technology. You have to submit the music you listen to with your PC’s mediaplayer(s) via plugins, e.g. for me Rhythmbox, XMMS, Winamp. Based on that data, charts of your most “favorite” music are calculated and compared to other charts. Thereby you will be recommended artists you haven’t listened to yet and also people with comparable musical taste. You can also listen to webradio in context to your taste. Paying subscribers will get their own personalised webradio.
There are lots of other features (like fan listings and groups), so best check it out yourself.
I haven’t done research on whether this service is thrustworthy, but they seem to be quite nice ppl there! :) Privacy is taken seriously (server logs are deleted every 3 days) and the content is Creative Commons licensed. I guess they are enthusiasts (musically and IT-related) and earn their money through subscriptions, Amazon affiliation, reputation.
In the future Last.fm’s database will be fully coherent with MusicBrainz, in order to avoid collecting badly/differently tagged music data. So if available, use a plugin with MusicBrainz integration and/or tag your files like in the MusicBrainz database.
You can take a peek at my userpage at Last.fm.

MusicBrainz

A database collecting metadata (artist, album, title etc.) for every audio track. Tracks are identified by their acoustic fingerprints (TRM); that’s some checksum magically generated by the amplitude, frequency spectrum, length of a audio track, as far as I understand. The data is user-maintained.
On the project website you can browse the database, download software and keep yourself informed about the project’s development.

Tagging your music files (with Linux)

I tried 3 MusicBrainz enabled taggers for Linux. Most of my problems are probably caused by my old and broken Linux installation (Fedora Core 3), where the RPM database got wiped. With RPM and up-to-date software this shouldn’t be that much of a hassle.
So unfortunately I only got QMBTagger to run. There’s an (new) official MusicBrainz tagger called Picard Tagger, but I obviously failed to update from source to the required wxWindows/wxPython version. Kid3 compilation aborted with an error.
There are many tagging applications around, but my favorite so far is EasyTag! But no MusicBrainz support (at least in my version).
Guidelines for MusicBrainz compliant tagging seem to be: Use correct English upper- and lowercase spelling (e.g. “Tales from the Crypt” and not “Tales From The Crypt”), keep foreign spelling as-is (what about non latin letters?), keep “The”-prefix (i.e. “The Doors” and not “Doors”), don’t add anything to the album title like “CD2” or “EP”. But this is just my impression! I bet there’s an official guideline somewhere on the project site. And in the end, as this is user-driven, any spelling could be “correct”.. :/
And there’s also libid3tag and its command line utilities, which can be handy for mass tagging and checking tags..

Other interesting music related sites

Allmusic
A vast database of artists/bands featuring professional artist and album reviews, style categories, discographies and more.

Discogs
A community-based discography database.

Liveplasma
A neat 2D map displaying artists’/bands’ relations in style and involved persons(?). Formerly called Musicplasma.

rolldabeats
A database for drum & bass, jungle and related music.

Musicline
A (mainstream) music portal in German language including the commercial “rororo Rock Lexikon”.

ChangeLog

[2006-04-22: Add tags.]

Blog at WordPress.com.