Alexander Kojevnikov | Blog

The Boston Hackfest

The GNOME and Mono Festival of Love was a blast! I finally met Bertrand and Aaron -- my fellow Banshee co-maintainers; as well as a lot of GNOME and Mono people. I also met Udesh, the SoC student I'm mentoring this year, who is working on voice control in Banshee.

I reviewed and committed a bunch of (mostly long overdue) patches in Banshee and taglib-sharp, and released a new version of the latter. We also discussed with Udesh his project and went through some technicalities.

I want to thank David for organising the event, GNOME Foundation for covering my plane tickets and our sponsors for making it happen:

GNOME Foundation

Microsoft NERD



Published: 2012-07-05

Tags: banshee gnome

GNOME and Mono Festival of Love

Thanks to the travel sponsorship of the GNOME Foundation, this week I'm going to Boston to attend the hackfest. I will be in Boston from Thursday evening till Sunday afternoon.

Looking forward to finally meeting fellow Banshee developers!

GNOME Foundation

Published: 2012-06-25

Tags: banshee gnome

Updated Play Queue In Banshee

Banshee 1.6 will include an updated Play Queue extension. The changes are already in git master, here are a few teaser screen-shots:

Play Queue in Banshee

Played tracks are not removed from the queue but are shown as greyed out. You can play them again if you want, drag and drop to the back of the queue, delete, etc.

Play Queue Preferences

The number of played tracks to show can be changed from the preferences dialogue.

Fill By option

You can also ask Banshee to automatically update the queue using any shuffle mode (including the new by rating and by score modes). The number of upcoming tracks can also be changed in the preferences.

Fill From

The tracks are taken from the entire library or from any play list.

Refresh and Add More

If you don't like what has been added, you can refresh the upcoming tracks. Or you can add more of them (thanks Sandy!)

Manually added tracks

Tracks added manually are treated differently from those that had been added automatically. When adding, they are inserted to the front of the queue but after other manually-added tracks.

After refresh

Also, they are preserved when you refresh the queue.

That's about it. If you like what you saw you can try the git master version. Otherwise just wait until 1.6 is out, it shouldn't take too long.

Published: 2009-09-23

Tags: banshee gnome

New shuffle modes in Banshee

New shuffle modes Next version of Banshee will introduce two new shuffle modes: by rating and by score. In this post I will explain how they work since the modes can be a bit confusing.

In the random shuffle mode (aka shuffle by song), every track has an equal probability to be selected. For example if our library contains 1,000 tracks, each of them will be chosen with probability

Pt = 1 ÷ 1,000 = 0.001

But what if we want some tracks to be played more often than others? Say we have 100 favourite tracks and want to play each of them three times as often as any other track? In probability terms this can be written as

Ps = 3 × Pt

where s are our favourite tracks and t – the other 900 tracks in the library. Because the sum of all probabilities must be equal to one, we have

100 × 3 × Pt + 900 × Pt = 1 → Pt = 1/1,200

To chose the next track, we can pretend that our library contains 1,200 songs and pick one at random. If the track number is ≤ 100 × 3, we randomly select one of the 100 favourite songs, otherwise we take one of the 900 remaining songs.

If the library is partitioned into n slots, each containing Ci tracks, we will have

i=1,n Ci ⋅ wi ⋅ P1 = 1

where P1 is the probability of selecting a track from the first partition, and wi tells how frequently tracks from the i-th partition should be selected compared to the first one. That is Pi = wi ⋅ P1

Numbers wi are called weights and by changing them we control how often the songs from different slots are played. For example, we could pick a number (lets call it β) and require that songs from the second partition are played β times as often as the songs from the first one, songs from the third β times as often as the songs from the second, and so on. That is, wi = βi-1

For ratings, we have 5 partitions – one for each rating. We could also put all unrated songs into the 3-rd partition (to treat them as songs with 3 stars) so that our entire library is partitioned. Now a good question is what to use for β?

If we take β=1, all songs will have an equal probability to be selected. Note that it's exactly the same as the shuffle by song mode. If we take β=2, songs rated 5 will be played twice as often as songs rated 4, and so on.

In Banshee we use β = φ ≈ 1.61803, also known as the golden ratio. This number has an interesting property:

φn = φn-1 + φn-2

In terms of ratings, it means that songs with 5 stars will be played as often as songs with 4 and 3 stars combined, and so on.

In the shuffle by score mode, the songs are partitioned into 20 slots, first slot for the songs scoring 1…5, second – for 6…10, and the last – for scores 96…100. We also put songs with no score into the 10th slot (46…50).

We cannot use φ for β because this time we have much more partitions – the songs with low scores would be hardly ever played. To keep scores behaving similar to ratings we need to scale the weights:

β = φ¼, wi = φ(i-1)/4

Hope that wasn't too tangled and I promise next post won't include a single formula :)

Published: 2009-09-21

Tags: banshee gnome

Page 1 / 1