Sunday, 1 February 2009

beware the revolution

I joined twitter.  If anyone wishes to follow my thoughts an extremely terse form, this can be done here:

Also, I added a feed in the lower right on this page.  As you may have already noticed.

Wednesday, 28 January 2009

ah semantics

So I'm fairly certain this has been discussed before, but I'm going to pose the question again.  Music Information Retrieval or something else?  I prefer the term Music Informatics as I find it to be more generally encompassing of the sort of work that get labeled with the more well used term music information retrieval, but perhaps not?

The (re)birth of a properly open artist centric social music platform?

So apparently muxtape has been reborn as  a sort of attempt to do MySpace Music correctly.  It seems to early to tell if this will work out for them, but I'm really  hoping that 'correctly' means a gratuitously open api and quality linking open data compatible rdf.  Though really none of that will matter if they don't get past the critical mass threshold of users/participants.  We'll classify this one as wait and see...

pretty DJs make playlists

or at least I do.  I'm going to be mixing records this evening on Goldsmiths student radio.  From 6-8pm GMT.  Standard fair, drum 'n bass, breakcore, *core (that's a new genre I'm declaring.  The hip kids pronounce it wild card core).  Mixed live, in all its glory.  I'm going to try to be in the freenode irc channel #wiredradio , but this may or may not work out.  Also, if you have an aversion to visiting websites, but like using the internet, the stream is:
 rtsp://owl.gold.ac.uk/Wired 
If you throw that uri into something that can deal with streaming aac (I hope you're happy Richard...) you should be good. Quicktime Player works, so does VLC, as does any player built on ffmpeg.

right.  back to writing up this ISMIR tutorial proposal.

Wednesday, 12 November 2008

speaking of making playlists

I'll be making some the old fashion way and broadcasting the result tonight (and every wednesday) from 6pm (GMT, about a half hour from the post time) till 8pm on Goldsmith Student Radio.  Live D'n'B and breakcore!

Sunday, 12 October 2008

mypyspace status update

So MyPySpace has been getting a facelift.  Kurt with some input from users (we apparently have users!  Who knew.) has been refactoring the rdf translators and fine tuning the myspace ontology as well.  Most (all?) of these changes are also being reflected into the live service.  While all of this has been going on, I've refactored the page scraping, crawling and downloading into a much more sensible class architecture from it former stream of consciousness implementation (I believe the polite description is 'research code').  It still has quite a ways to go (alpha!) but it's starting to resemble an actual library.  If you want to play with my refactored bits you can check them out like this:

> svn co https://mypyspace.svn.sourceforge.net/svnroot/mypyspace/myspaceCrawler/trunk/ myspaceCrawler

then you can do nifty things like the following (inside your favorite python interpreter or script, I'm using ipython here):

In [1]: import mpsUser

In [2]: gearmonkey = mpsUser.mpsUser('http://www.myspace.com/gearmonkey')

You simply give the class a valid myspace user url to initialize it (this is my artist page.  If you want to play with this, don't feel the need to listen to my music...)

In [3]: gearmonkey.isArtist
Out[3]: True


In [4]: gearmonkey.downloadTracks('~/Music/mpsUsertest/gearmonkey/')
INFO:root:No ID3 header found for /Users/bfields/Music/mpsUsertest/gearmonkey/1_Cheeky.mp3; creating tag from scratch
INFO:root:No ID3 header found for /Users/bfields/Music/mpsUsertest/gearmonkey/2_TrainTune.mp3; creating tag from scratch
INFO:root:No ID3 header found for /Users/bfields/Music/mpsUsertest/gearmonkey/3_Give Way.mp3; creating tag from scratch
INFO:root:No ID3 header found for /Users/bfields/Music/mpsUsertest/gearmonkey/4_En La Selva Mvt II GMO vip.mp3; creating tag from scratch
Out[4]: (4, 4)

Then you can find out if your user is an artist by checking the boolean isArtist.  If it's an Artist, you can download their songs.  That return value is a tuple of (songs successfully downloaded, downloads attempted). 

In [5]: gearmonkey.songs[0].title
Out[5]: u'Cheeky'

As part of the download process, each song is an instance of the class mpsSong (more on that class in a bit).

You can use the mpsUser class to crawl the artist network like this:

In [6]: artistFriends = gearmonkey.findArtistTopFriends()

In [7]: artistFriends
Out[7]: 
[mpsUser.mpsUser instance at 0x1a3a7b0,
 mpsUser.mpsUser instance at 0x1c5d788,
 mpsUser.mpsUser instance at 0x1a3ad50,
 mpsUser.mpsUser instance at 0x1a3a968,
 mpsUser.mpsUser instance at 0x1c7fc88]

In [8]: artistFriends[0].artist
Out[8]: u'Mike'

In [9]: for entry in artistFriends:
   ...:     print entry.artist
   ...:    
Mike
Otto Von Schirach
GEIN
The Dead Hookers' Bridge Club
EVOL


In [10]: artistFriends[2].downloadTracks('~/Music/mpsUsertest/GEIN/')
INFO:root:No ID3 header found for /Users/bfields/Music/mpsUsertest/GEIN/1_Life Of Sin GEIN edit.mp3; creating tag from scratch
INFO:root:No ID3 header found for /Users/bfields/Music/mpsUsertest/GEIN/2_Deadly Algorhythm GEIN Remix.mp3; creating tag from scratch
INFO:root:No ID3 header found for /Users/bfields/Music/mpsUsertest/GEIN/3_GEIN KJ Sawka Break the Enemy.mp3; creating tag from scratch
INFO:root:No ID3 header found for /Users/bfields/Music/mpsUsertest/GEIN/4_GEIN  Warden.mp3; creating tag from scratch
INFO:root:No ID3 header found for /Users/bfields/Music/mpsUsertest/GEIN/5_GEIN vsThe ChosenAbomination.mp3; creating tag from scratch
INFO:root:No ID3 header found for /Users/bfields/Music/mpsUsertest/GEIN/6_GEIN  Hell Audio rmx.mp3; creating tag from scratch
Out[10]: (6, 6)

In [11]: artistFriends[2].topFriends
Out[11]: 
[u'11187934',
 u'2123795',
 u'2177245',
 u'706581',
 u'20492111',
 u'66601290',
 u'5017015',
 u'207669100',
 u'52365642',
 u'2186134',
 u'3378431',
 u'55609497',
 u'30244',
 u'26629700',
 u'80613962',
 u'74772580',
 u'28841051',
 u'317327']

In [12]: geinArtistFriends = artistFriends[2].findArtistTopFriends()

In [13]: geinArtistFriends
Out[13]: 
[mpsUser.mpsUser instance at 0x1d83a30,
 mpsUser.mpsUser instance at 0x1d95710,
 mpsUser.mpsUser instance at 0x1d99198,
 mpsUser.mpsUser instance at 0x1d95be8,
 mpsUser.mpsUser instance at 0x1d956c0,
 mpsUser.mpsUser instance at 0x1e6fa80,
 mpsUser.mpsUser instance at 0x1e81b98,
 mpsUser.mpsUser instance at 0x1da7080,
 mpsUser.mpsUser instance at 0x1e81b70,
 mpsUser.mpsUser instance at 0x1f2dee0]

In [14]: for friend in geinArtistFriends:
   ....:     print friend.artist
   ....:    
EVOL
GUERILLAƂ®
THE GUN
Habit Recordings
Mumblz / Delusional
Tech Itch
Lost Soul Recordings
None
Donny
NECRO THE SEXORCIST SPECIAL EDITION CD/DVD SOON!!!


and so on and so forth.  Once you've initialized the songs for an artist you can use the mpsSong class structure to find things out about the songs as well:

In [15]: gearmonkey.songs
Out[16]: 
[mpsUser.mpsSong instance at 0x1a155d0,
 mpsUser.mpsSong instance at 0x1a2ff08,
 mpsUser.mpsSong instance at 0x1a338f0,
 mpsUser.mpsSong instance at 0x1a338c8]

In [17]: for song in gearmonkey.songs:
   ....:     print song.title + " by " + song.parent.artist + " has been played " + song.playcount + " times." 
   ....:    
Cheeky by G_M_O has been played 117 times.
TrainTune by G_M_O has been played 168 times.
Give Way by G_M_O has been played 88 times.
En La Selva Mvt II GMO vip by G_M_O has been played 9 times.

In [18]: 


There are also some simple hooks to call fftExtract on the songs of an artist but I'll save those bits for another post.   One quick note, I don't believe we've fixed the bug that prevents song downloads in the US (and maybe Canada), but the url requests have been changed slightly so if anyone tries it over there let me know.  All the scraping should be fine in the States and everything should work everywhere else.  Also, you need the mutagen ID3 tag library installed prior to using this.  

If any readers do give this a try let me know if you have any thoughts (especially interface related) down below.

Wednesday, 17 September 2008

introductory thoughts on a playlist generation task in MIREX 2009

I'm currently knee deep in ISMIR activities, of which I will do a more thorough write up when everything has finished. Now, however, I think it will be useful to briefly discuss a MIREX 2009 task I'll be pushing for, that of automatic playlist generation. I think it will be very useful to formalize as much of this task as possible as soon as possible, in effort to encourage participation and avoid the nearly standardized MIREX august rush.

With that in mind, here some the basic starting questions followed by my [brief and biased] thinking on them:

  1. What is a playlist?

    From wikipedia:
    In its most general form, a playlist is simply a list of songs. The term has several specialized meanings in the realms of radio broadcasting and personal computers.
    The term originally came about in the early days of top 40 radio formats when stations would devise (and, eventually, publish) a limited list of songs to be played. ...
    As music storage and playback using personal computers became common, the term playlist was adopted by various media player software programs intended to organize and control music on a PC such as Nexus from NexTune. ...
    Some websites allow categorization, editing, and listening of playlists online, such as Project Playlist, Plurn, imeem and Webjay. ...

    This is a sensible starting place from a broad definitional stand, especially when we acknowledge that the exact MIREX will obviously be a subset within the idea of a playlist (more on that later...)

  2. How do we quantitatively evaluate an automatically generated playlist?
    Upon a brief reflection this is clearly the sticky bit. As such this question is being posed prior to any sort attempt to specify an exact task. Functionally speaking, if the evaluation is properly specified the ask description will practically fall out of it.
    There seem to be a few approach to this, though many tend to revolve around an idea of mining some form of ground truth out of crowd wisdom (here and here for instance)

  3. And of course, what exactly should the task be?
    Again, this is of course all very draftish, but my prime thought on this is to have a highly specific task of one (or all) of the following forms: query with song A B C algorithm generates song D (and perhaps song E, where order matters), the simple deviation of that form given A B E, generate C D. The other possibility is something alog the lines of give a query song and provide the next song that should occur in the list.

So anyway, those are my initial thoughts on this potential task for next years MIREX. Please comment if you have thoughts...