Tuesday, April 13, 2010

Goodbye Windows, welcome Kubuntu

Yesterday I discovered that my Windows 7 RC1 reboots all 2 hours(which I already had expected) and there was a Kubuntu 9.10 CD lying on my desktop. As I successfully use it on my company's laptop with no issues, I decided its the right time to install it for my private everyday use, too.
Said and done. But after installing the nvidia drivers plus a dist-upgrade, KDE won't show anymore and I discovered it was not 64-Bit. Jens recommended me to try Kubuntu Lucid Lynx (10.04 beta 2) and now I am a really happy and satisfied Kubuntu user.
The installation process itself was quite laggy, but finally it worked fine, including current Firefox and Thunderbird (yeah, finally 3.0). Before I did anything other, I searched for proprietary graphics drivers (for my NDVIA card) via the "Hardware Drivers" utitly of KDE. Surpise, surprise, everything already set up and running fine! WLAN - no problem. Sound over S/PDIF - no problem(just push up the digital device in Multimedia settings for all media types).
When it came to S/PDIF for VideoLAN player, it costed me some time, but finally I just tried setting the sampling frequency to 48000 and it worked fine again :)
Then a pidgin here, a KsCD there, all fine.
I even installed a really cool game called Kobo Deluxe (a 2D space shooter) which ran without any issues!

It came me into mind that the (K)ubuntu logo, the nice-looking ring, could be a wedding ring: Once you get first familiar and then married with Ubuntu Linux, you won't be able to betray it - it's just to awesome to really going back to windows :D
Besides Windows 7 costs about 85 Euro for Home Premium with nearly no usable software(okay except Media Center maybe) and with Ubuntu (and other Linux distributions) you can get everything for free, can take a look at the source, report bugs which are quickly solved in most cases and there's so many free software available in places where the appropiate windows replacement would cost hundreds of dollars. Just think about The GIMP vs. Adobe Photoshop...

Just COOOL! 8-)

Thursday, April 08, 2010

Combo.fm or how I learned to really love last.fm

In a recent post I wrote about the new client and combo stations(plus some technical details in the last one).

What is a combo station? A combination of last.fm radio stations, which are coonnectable by using "and", "or" and "not" (plus some nifty extra options, I'll come back to that point later on).

As it took always a very long time to create those combo station urls by hand, I wrote a nice application(which seems to be stable, but also may contain bugs). So I'd like to introduce you into Combo.fm, as I call it. Written in pure Java, using NetBeans(too bad it's not eclipse, but NB has the better GUI creator :P) and the best thing: GPL license(with the restriction of non-commercial use) and source included :) Note that the Last.fm API bindings for Java by JRoar are used, you can also obtain a fresh copy from http://code.google.com/p/lastfm-java/

But I guess you came here because you want to listen to combo stations, so click the link below(sorry for hosting on RS, had no better place atm):

Download Combo.fm

You can run it via "java -jar ComboFm.jar" from the ComboFm/dist/ folder from your OS console. (Hopefully a linux distibution :P)

For Windows users:
  1. Create a file named "runComboFm.cmd" inside the folder to where you unextracted Combo.fm
  2. Open it with Notepad(right click -> Open With -> > Notepad/Editor)
  3. Paste the following code:
    @echo off
    java -jar ComboFm/dist/ComboFm.jar
  4. Save file, close Notepad and run the file by double-clicking on it.
  5. Have fun ;)
If I'm on windows again, I'll add a starter app :)

Usage instructions
Basically you just select a station type on the top left, select or type a value at the combo box beneath and hit "Add->". If you want to change the logical connector, you can just select the station on the right from the list box and select another(like 'and' or 'not'). Thereby, you can ignore the 'or' of the last item(tiny UI bug, doesn't affect the result). Don't worry if you added a station by mistake, you can just hit "Remove" to remove the selected station from the list.
Now let's concern with the sliders and the checkbox at the middle left.
Mainstream controls the amount obscure/mainstream music you want to listen to(left = 100% obscure, right = 100% mainstream). Setting this to 100% obscure will result in an interesting station.
  • Repetition steers the repetition rate of the artists.
  • Discovery switches discovery mode on or off.
Now just click one of the 'Copy' buttons.

Web browser url:Paste direcly in your browser's address bar and hit return.
Radio client url:Listen to the station with your favourite Last.fm client.For desktop client, paste the url in the text box of the player's start screen(where you tune into stations) an hit play.

My Personal opinion is that combo stations drastically improve the listening experience of the Last.fm radio, even if you only play with the sliders you can listen to very awesome tracks you didn't knew yet or of which you forgot the name a very long time ago. Good Job, Last.fm. I really love it!

And to you, dear reader:
Happy listening! I hope you enjoy Combo.fm right in these minutes.

Note: Combo stations is a pre-alpha feature of Last.fm, so you take the consequences if you use Combo.fm for listening to these stations! I am not responsible for what you do and cannot take any risks resulting in the usage of Combo.fm.

Combo station urls

In this blog post I'll tell you how to create Last.fm combo station urls. Last.fm station urls always start with "lastfm://". For combo station urls, an example might look like
lastfm://rql/dGFnOnBvcCBub3Qgc2ltYXJ0OiJMYWR5IEdhZ2Ei
See that long character string after rql/ ? That is just simple Base64 encoding and RQL means "Radio Query Language". If you'd use a decoder like this one,it will decode to
tag:pop not simart:"Lady Gaga"
So, there are key-value pairs and logical connectors (valid ones are 'and', 'or' and 'not'). The above query means "play everything in direction of 'pop' tag, but not Lady Gaga's similiar artists". I think you got the idea...
The point I did not mention yet is that there are some nice options available. Let's change our query a bit:
tag:pop not simart:"Lady Gaga" opt:mainstr|0.55 opt:rep|0.6 opt:discovery|true
Huh? Lots of opt(ions)! mainstr stands for "Maintream", where the value range is from 0-1(0% to 100%). The less the value, the more unknown artists will occur in your station. Same goes for rep(etition), but in this case you can control the artist(or track?) repetition rate. I think "discovery" is kind of self-explanatory(discovery mode on/off). Here you got a nice table with names, values and descriptions:
NameValueDescription
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
ptag[tag of user]|[username]Personal tag radio of a user. The '|' is NO or!. After Nov 17 2010 this station is not available anymore!
playlist[playlist-id]A playlist station. Use user.getPlaylist API call to get playlist id's of a user's playlist. After Nov 17 2010 this station is not available anymore!
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 that the options are all optional and thus have a default value. Connect name and value with a ':', except for the opt: values. If a value contains a space, it must be enclosed with double-quotes(""). Known Issues
  • Discovery mode is subscribers only.
  • In the Base64 RFC specification there is a space after 76 characters in the encoded string. Apparently the web and the desktop client cannot handle this space, so you have to remove it and everything will work fine.
Have fun with constructing the urls and implementing it in your app!
Very much thanks to Norman (nova77LF)(glorious creator of the Radio Query Language) for clarification on some points :)