Author Topic: AutoDJ - Creating a custom radio  (Read 12579 times)

Alainn

  • Guest
Last.fm radio has an option to build a standard radio based on a maximum of 3 tags, however these are used as an AND-station: play music that is Rock AND Hip-Hop AND Opera. This will usually result in very few tracks since there isn't a lot of music like that.

It is however possible to create a radio that is build with much more options since the Last.fm uses RQL (Radio Query Language) and it looks like a long series of letters. Thankfully you don't have to know (another) tech language since there is an excellent web-interface that takes care of this:

ComboFM (http://www.combofm.de)
When you first enter the site you only need to enter your (or anybody else') Last.fm username to start building your own custom radio. You can add artists, tags, specific peoples libraries or their friends libraries, personal radio (Library, Mix Radio, Neighbours, Recommendations and (all) Friends), just click on any you want to add to your current Query or enter the name of one that isn't shown. You can delete items from it by clicking on the [X] and drag'n'drop items to get a different sequence.

When you have multiple items in your query, you get an extra option that makes this work even better than Last.fm's default: you can set the option to AND (the tracks needs to be both items), OR (the track can be either item) and NOT (the track can not be in the following item).

Some examples of when this is useful: say you want to play your recommendations but only the ones that are tagged with electronic, or the library of that friend with excellent taste in Blues but not the tracks that you already know.

Note however that this works only at track-level not artist-level: So a track from an artist tagged as dark ambient would play if it isn't tagged as dark ambient itself. (http://www.last.fm/forum/21716/_/616299/_/14770039)

When you've added+sorted your items you then copy the link for Last.fm Software to Notepad and copy everything after "lastfm://", next you go to "stream tracks from:" in the AutoDJ, change it to custom and paste it in "lastfm://". Press Start DJ

Some examples:
folk OR cajun OR bluegrass NOT classic rock NOT female vocalists
will give the following link:
lastfm://rql/dGFnOiJmb2xrIiBvciB0YWc6ImNhanVuIiBvciB0YWc6ImJsdWVncmFzcyIgbm90IHRhZzoiY2xhc3NpYyByb2NrIiBub3QgdGFnOiJmZW1hbGUgdm9jYWxpc3RzIiBvcHQ6ZGlzY292ZXJ5fHRydWU=

Tag vandalism - Since tags for artists are added by the listeners there will be some people who find it funny to tag artists like Justin Bieber with "speedmetal" or "death metal", very "funny" until you want to listen to a tag like that. A workaround for this is to make a radio where the tracks need to be tagged with more versions:
(tag:"death metal" and tag:"brutal death metal")
(tag:"hip-hop" and tag:"rap")
You can add these parenthesis by using an encoder/decoder like http://rumkin.com/tools/compression/base64.php (webinterface), just copy everything after "rql/", paste into the decoder and you see the normal version of your radio. Make the changes you want, press "Encode to base64" and paste the resulting string in its proper place.

List of possible items:
Name   Value   Description
user           [username]   personal station
library   [username]   a users library
loved   [username]   loved tracks of user. After Nov 17 2010 this station is not available anymore!
rec      [username]   recommendations for a user
neigh   [username]   neighbour radio of user
adv      [username]   Play a user's mix radio.
simart   "[artist name]"   Similiar artists of an artist. Keep the quotes around.
tag      [tag]   Global tag radio
group   "Group Name" or [groupid]   Group radio
opt:rep|   [0-1](default: 0.5)   Specifies the track repetition, means how long it will take until the track is played again
opt:mainstr|   [0-1] (default: 0.5)   Type of tracks played(obscure to popular)
opt:discovery|   [true|false] (default: false)   Discovery mode on/off

Note: if the radio uses 240+ characters it only works with the AutoDJ, Radio Stations in MB can't use links of this length.

Sources:
Source code and bug tracker: https://github.com/tburny/combofm
Blog post with the list of possible items: http://burnysblog.blogspot.nl/2010/04/combo-station-urls.html
Last.fm forum thread about ComboFM: http://www.last.fm/forum/21716/_/616299/1
interesting info in that thread:
Discovery-mode is outdated (http://www.last.fm/forum/21716/_/616299/_/18505455)
Last Edit: September 23, 2012, 05:10:53 PM by Alainn

desplantes

  • Guest
Very efficient. I tried with up to 20 tags yesterday :

rql/dGFnOiJnZXJtYW4gamF6eiIgb3IgdGFnOiJjb250ZW1wb3JhcnkgamF6eiIgb3IgdGFnOiJhdmFudGdhcmRlIiBvciB0YWc6ImV4cGVyaW1lbnRhbCIgb3IgdGFnOiJhdmFudC1wcm9nIiBvciB0YWc6InJpbyIgb3IgdGFnOiJ6ZXVobCIgb3IgdGFnOiJ0b3ktcG9wIiBvciB0YWc6InJvY2sgaW4gb3Bwb3NpdGlvbiIgb3IgdGFnOiJhdmFudC1wcm9nIiBub3QgdGFnOiJmZW1hbGUgdm9jYWxpc3RzIiBvciB0YWc6InN0cmFuZ2Ugd2F2ZSIgb3IgdGFnOiJqYXBhbmVzZSIgb3IgdGFnOiJrcmF1dHJvY2siIG9yIHRhZzoibmFpdmUiIG9yIHRhZzoiZnJlZSBqYXp6IiBvciB0YWc6ImVsZWN0cm9uaWMiIG9yIHRhZzoibG8tZmkiIG5vdCB0YWc6InJvY2siIG9yIHRhZzoiYXJ0aXN0cyB3aG8gYXJlIGxhc3RmbSB1c2VycyIgb3B0Om1haW5zdHJ8MC4xIG9wdDpyZXBldGl0aW9ufDAuMQ==

tag german jazz or tag contemporary jazz or tag avantgarde or tag experimental or tag avant-prog or tag rio or tag zeuhl or tag toy-pop or tag rock in opposition or tag avant-prog not tag female vocalist or tag strange wave or tag japanese or tag krautrock or tag naive or tag free jazz or tag electronic or tag lo-fi not tag rock or tag artists who are lastfm users

I put twice "avant-prog" by mistake.

As I'm a newbie, for the ones who want a more "step to step" tuto (it took me 1/4 of an hour to get how to handle it) you can have the code above by clicking on the "tweet" button on Combo.f.m.
Last Edit: September 17, 2012, 07:18:03 AM by desplantes

OrB

  • Guest
maybe someone like to explore the syntax of the 'long series of letters' with a base64-decoder
eg. notepad++/plugins/MIME Tools

Alainn

  • Guest
There is a faster option: http://rumkin.com/tools/compression/base64.php

My current station is lastfm://rql/cmVjOkFsYWlubiBvciByZWM6cm9sYW5ka2lyayBvciByZWM6dGVtdWppbjEyMzQ=, decode from base64 on the string cmVjOkFsYWlubiBvciByZWM6cm9sYW5ka2lyayBvciByZWM6dGVtdWppbjEyMzQ= and you get: rec:Alainn or rec:rolandkirk or rec:temujin1234 (Yep, you can listen to other peoples recommendations ^_^)

However, the Encode to base 64-option is even better since you now have the option to use parentheses: (tag:"hip-hop" and tag:"rap") or (tag:"indonesia" and tag:"indonesian") or (tag:"africa" and tag:"african") results in the following string: KHRhZzoiaGlwLWhvcCIgYW5kIHRhZzoicmFwIikgb3IgKHRhZzoiaW5kb25lc2lhIiBhbmQgdGFnOiJpbmRvbmVzaWFuIikgb3IgKHRhZzoiYWZyaWNhIiBhbmQgdGFnOiJhZnJpY2FuIik= You only have to append that behind "rql/" :)


Alainn

  • Guest
@desplantes: have a look at KGxpYnJhcnk6QXRhcmF4aWFpbmMgb3IgbGlicmFyeTpjZWxlcjIwMDggb3IgbGlicmFyeTpEci1Eb2N0b3Igb3IgbGlicmFyeTogdHJvdWdoIG9yIGxpYnJhcnk6bXVzaW51bSBvciBsaWJyYXJ5OnJpY2hhcmRsaW50ZXIgb3IgbGlicmFyeTpkcnVtYWJveTcwKSBub3QgKGxpYnJhcnk6IHJvbGFuZGtpcmsgb3IgbGlicmFyeTp1c2VybmFtZW9mam9zaCk= Add more people for flavour, but it's basically automated hunting while staying safe?

Update: Bugger! No it isn't, I'll post tomorrow why.
Last Edit: September 17, 2012, 01:35:15 AM by Alainn


desplantes

  • Guest
@desplantes: have a look at KGxpYnJhcnk6QXRhcmF4aWFpbmMgb3IgbGlicmFyeTpjZWxlcjIwMDggb3IgbGlicmFyeTpEci1Eb2N0b3Igb3IgbGlicmFyeTogdHJvdWdoIG9yIGxpYnJhcnk6bXVzaW51bSBvciBsaWJyYXJ5OnJpY2hhcmRsaW50ZXIgb3IgbGlicmFyeTpkcnVtYWJveTcwKSBub3QgKGxpYnJhcnk6IHJvbGFuZGtpcmsgb3IgbGlicmFyeTp1c2VybmFtZW9mam9zaCk= Add more people for flavour, but it's basically automated hunting while staying safe?
I add "not library:Lifein204"  ;)