Monday, March 16. 2009
UPnP support in KDE and Amarok Posted by Bart Cerneels
in shanachie at
13:22
Comments (0) Trackbacks (0) UPnP support in KDE and Amarok
During FOSDEM [ade] and I met with Frank Scholz, the lead developer of Coherence. We discussed DLNA/UPnP and how Coherence can be used in KDE and Amarok. The conclusion of this meeting was that we should use Coherence as our base for supporting UPnP services in KDE. The first implementation will be a KIO slave for browsing media stored on remote devices.
UPnP is a network technology using a combination of SSDP, XML and SOAP, with some GENA thrown in for eventing. A group of UPnP services called the UPnP A/V Architecture has been picked up by an industry organization called the Digital Living Network Alliance. DLNA specifies device classes which have to implement specific services and support a minimal set of filetypes and codecs. Coherence is a framework, written in Python but it exposes a DBUS API, that allows an application to participate in the "Digital Home Network". For the moment this means mainly UPnP, but support for Ampache is available and Apple's DAAP is also considered. It's published under the MIT license and is multiplatform. In Amarok we have been planning to integrate UPnP for a long while. But except for a failed Google Summer of Code project last year not a lot of effort has been spend. Thanks to Coherence this will quickly change: in relative short term (read 2.2) we will introduce a UPnP Collection that will list and enable playback of music stored on a DLNA Digital Media Server. ![]() We could even consider publishing the content in the local Collection, basically making Amarok a DMS. Amarok can then track plays on remote devices and use it in the scoring algorithm. Even more advanced functionality would be to control one or more Digital Media Renderes, such as the Philips Streamium, from Amarok. A few mails have been going back and forth between interested developers about discovery of network services in general. In order to simplify using technologies as UPnP, zeroconf, Samba, etc I'm wondering if we can integrate this in Solid. Only the discovery part obviously, using the services would be the task of separate frameworks, such as Coherence. With this functionality in Solid it should be trivial to show a kind of "Network Map" to the user with all the services per device. As you can tell, plenty of cool things to keep a few people busy for a year or 3. Bart Monday, March 16. 2009
Amarok Junior Job: Auto-download new ... Posted by Bart Cerneels
in shanachie at
13:22
Comments (0) Trackbacks (0) Amarok Junior Job: Auto-download new podcasts
A recent comment by progmanos on the post of the 2.0.1.1 release reminded that I still have to implement Podcast episode auto-downloading. In the hurry to get 2.0 released I did add the config option, but forgot to add the actual code to make it work.
![]() In Amarok 2 Podcasts are implemented in classes derived from PodcastProvider. There can be mutliple providers, which allows for instance podcast syncing between Amarok and an iPod. The default provider is SqlPodcastProvider. This is where the auto-download function should get implemented. This is a nicelly contained and not to steep introduction to Amarok development. So it's an excelent Junior Job. If progmanos or anyone else would like to have a go at it, contact me on #amarok on irc.freenode.net. My nickname is Stecchino. Monday, March 16. 2009
Amarok podcasting 2.0 and post-2.0 plans Posted by Bart Cerneels
in shanachie at
13:22
Comments (0) Trackbacks (0) Amarok podcasting 2.0 and post-2.0 plans
Hey fellow developers and users,
In Juli 2007, at Akademy Glasgow I started implementing podcasting support in Amarok2. Since then I was sidetracked a little, as you may be aware. The little time I did manage to spend designing and implementing was short and far from focused. So a lot of features are not finished or just plainly missing. The framework I created underneath suffered from the same lack of focus and is need of a good review. I'm aware there is probably some overdesign and some parts might be to complex. If you feel you can help in that area I suggest you take a look at extragear/multimedia/amarok/src/podcasts . Send questions, comments and suggestions to amarok-devel@kde.org . The 3rd beta from Amarok 2.0 is already out the door and podcasting support is still not finished. In order to make it I had to reduce some goals I had set for myself during those rainy summer days in Scotland. Here's the plan: Amarok 2.0: The focus ATM is on finishing the SqlPodcastProvider, Podcastmodel and PodcastCategory (GUI). SqlPodcastProvider uses tables in the standard SQL database, adds and updates the feeds using PodcastReader and downloads to disk using the regular KIO-jobs. To make the podcasting fully functional though we'll need to reintroduce:
The GUI currently shows all episodes ever read from the feed, which obviously needs to be addressed. The GUI for 2.0 should be very similar, if not identical to Amarok 1.4, probably minus folder tree grouping support since that is better handled generically for all Playlists (which PodcastChannel is in our class diagram). If anyone has a bit of Qt Model/View experience and would like to see podcasting in Amarok 2.0 I suggest you send a mail to amarok-devel@kde.org or ping me on irc (Stecchino on #amarok). Without help we might have to drop it's from 2.0 completely because it's a bit much for me alone to complete and stabilize. Amarok > 2.0: I do have a plan for a complete GUI overhaul post-2.0. I'll get some art and usability advice in another blog post when the time comes. The 2.x releases should see more advanced features being introduced that the framework is already designed to support: For the SqlPodcastProvider specifically:
Monday, March 16. 2009Introducing: Fuzzy Biases
Suppose you're really into music created around the "summer of love" in 1967. Its easy enough it create a filter so you only get music from 1967. We could do that in Amarok 1, but that excludes a lot of music around that period that's just as significant.
Maybe you could do something like asking for everything that's recorded after 1960 but before 1973. That's better, but it's still not really what you mean when you say around 1967. You would prefer tracks closer to 1967 than farther away. This is where "fuzzy biases" come in. The goal with fuzzy biases, is create a playlists that approximately match a value. Generating biased playlists, is always a question of probability distributions. What we are really trying to do here is generate a playlist that fits normal distribution bell-curve. Like this: The horizontal axis is the year, the vertical axis is the probability of getting track of that particular. So the nearer to 1967 the track is, the better chance of it ending up in our playlist it has.Ok, another example. I really just want to listen to some good straight up pop right now. No eleven minute epic folk ballads, no classical, no post-rock, just tight catchy songs. So I make a fuzzy bias to find songs that are about three minutes long. Great. That's a pretty good mix, and I can refine it later with other biases. The fairly vague "Strictness" slider indirectly controls the standard deviation of of the distribution. ![]() How is this different than the old fashion method, just specifying a pair of strict biases? ![]() To get all mathematical on you, that creates a playlist that matches a uniform distribution. ![]() If you've never taken a statistics class and didn't follow any of this, let me summarize:
Monday, March 16. 2009GSoC Update
It's been a pretty laid back week or two for me. Google paid up, and I bought myself a microKorg (to compliment my circuit-bent Casio Sk-1), and I don't have buy my potatoes on credit anymore, which feels good, but a little un-American.
I spent most of these couple weeks just wandering the code, putting an end to bugs that stumbled across my path, but there are couple noteworthy items. First, I have saving playlists more or less working. Which was something I was putting off writing, because it was a hassle, and not the kind of hassle I find very interesting. The other good news is that the solver is about to become much much faster. I switched from hash table sets (QSet) to bit array sets, which are much better suited for the obscene number of intersect and subtract operations I have to do. The result is the solver should be nearly instantaneous. No more 20 second waits when you put in a bunch of biases. I have a pretty expansive todo list, but I'm eager to implement some new types of biases to see what the solver can really do. I've gotten some good suggestions for biases that hadn't occurred to me. Let me know if you have an idea for one, and I may write it up. Monday, March 16. 2009Roll VideoI always loved in grade school when the teacher was too depressed or hung-over to teach the class and just put on a VHS of Raiders of the Lost Ark, or something. As promised, I made a little demonstration for those not daring enough for the svn or nightly (you can admit it, we won't think less of you). (thats: http://www.youtube.com/watch?v=CFg0313x-iU, for the embeded video challenged.) Sorry about the pixelation, it's hard to make out how ridiculously hip my music collection is. It's still a little slow for a lot a biases. Expecially on my aging thinkpad, while trying to record video. That's something I will be working on. The algorithm is gradually growing faster and more complicated. I suppose that's how that works sometimes. For next week, I hope to get saving and loading ironed out, as well as putting more work into the solver. After that I have the much more interesting task of writing news types of biases and making sure they don't take forever to solve. I've already got a lot of interesting suggestions which hadn't occurred to me. It's going to be fun to see what this can really do. Monday, March 16. 2009
Weekly Update: Unhidden Biases Posted by Daniel Jones
in kopophex at
06:22
Comments (0) Trackbacks (0) Weekly Update: Unhidden Biases
Now that dynamic playlists are working, what's missing is a way to actually use them. That's what most of this weeks work went towards.
In Amarok 1, dynamic playlists are one of those great hidden features. They are terrifically powerful and usefull, but a lot casual users don't know about them, or just don't understand how to use them. I had been using Amarok for a while before I discovered them. One of the problems I've been working on is how to present Amarok 2.0 dynamic playlists in a way in which it's more or less obvious what they do. I want it to be an exhibitionist feature, with the functionality all exposed and out in the open, no dialog boxes or menu hierarchies. This week I spent some quality time working on the bias editor (and reminding myself why I don't like gui programming). Since every blog post needs a picture, here's the latest version of the bias editor from just a few minutes ago (not even in svn yet). It's a bit rough arround the edges, but comming along nicely. ![]() That screenshot is slightly faked, but in the next few days the bias editor will start to become functional. I'm pretty excited to see my work actually usable. I also did some important work behind the scenes. This sort of playlist generation can't really be done efficiently in general (it's an NP-hard problem). If you give it a really tough set of biases, it won't break down or freeze up, but it may give you playlist that isn't perfect. Making the solver work well is a matter of heuristics, trial and error, and tweaking. I did a little of that this week, but the real testing and tweaking will happen when the bias editor is up and running. I'll be back here in a week, hopefully demonstrating how to use the new dynamic playlists. Monday, March 16. 2009
Weekly Update, Secret Plans ... Posted by Daniel Jones
in kopophex at
06:22
Comments (0) Trackbacks (0) Weekly Update, Secret Plans Divulged, &c
I've been struggling with how to describe what I've been working on succinctly in conversation. I figure I can get about two sentences in before I start getting blank stares and eye rolls. I've been using something like this:
You know how when you put your ipod on shuffle, it magically knows what you want to listen to next? It's a little like that, but completely customizable, and instead of magic it uses a stochastic optimization algorithm. Then they say something like "Hmm", or "Interesting," and then there's a long uncomfortable silence until someone changes the subject. "Can you believe this weather we're having?" This is Week 2 or so for me, and forgoing things like "sleep" and "food", I've made some significant progress. The core of the bias code is written and more or less works. Random mode in working just dandy and if you're running the nightly or svn of Amarok 2, you can find it under the Playlists tab hiding out at the bottom. Since the bias code is written and works, this is a good time to talk about my secret plan. When a I first proposed biased playlists, I described biases as the chance that track has a certain property. Like "30% chance the next track is Jazz". I even made an aesthetically appalling mockup to show what I meant: ![]() The secret is, that I've designed it to be much more general than that. A bias is any function that maps a playlist to a value in [0,1]. The solver will then try to find a playlist where all the biases are at 0. Blank stares, eye rolls. "Can you believe this weather we're having?" The point is: biases can do a lot more that what I described previously. Really, they can impose any kind of restriction on the random playlist being generated. For instance, Suggestion Mode, where the next track is from a similar artist as the previous, can be implemented as a bias. If Suggestion Mode is just a bias, it can be combined with other biases. We could do Suggestion Mode + 30% Metal + 70% pre-1990, and it will do its best to find a playlist that matches fits. It there is no such playlist, it will just give you the best it can come up with. This also really important because it lets us use fuzzy biases like: "arround 1976", "about 3 minutes", or "hasn't been played in a while". Presumably, users could script their own biases, doing wacky things so playlists are random but tracks have increasing lengths, follow an obscure integer sequence, or their titles spell out a secret message. The next few weeks i will mostly be concentrated on tweaking and optimizing the solver and working on an easy way to create biased playlists. There's a lot of work ahead, but I'm very excited with how it's gone so far. |
Amarok LinksCalendarQuicksearchCategoriesSyndicate This BlogBlog Administration |

