<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>insomnia bytes &#187; collections</title>
	<atom:link href="http://bytes.inso.cc/wp/tag/collections/feed/" rel="self" type="application/rss+xml" />
	<link>http://bytes.inso.cc/wp</link>
	<description>Imagination is a nightbird's dream</description>
	<lastBuildDate>Sat, 07 Nov 2009 17:13:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>“XMMS2 Collections” presentation at Metaweb</title>
		<link>http://bytes.inso.cc/wp/2009/11/07/%e2%80%9cxmms2-collections%e2%80%9d-presentation-at-metaweb/</link>
		<comments>http://bytes.inso.cc/wp/2009/11/07/%e2%80%9cxmms2-collections%e2%80%9d-presentation-at-metaweb/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 16:46:27 +0000</pubDate>
		<dc:creator>theefer</dc:creator>
				<category><![CDATA[xmms2]]></category>
		<category><![CDATA[collections]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[slides]]></category>

		<guid isPermaLink="false">http://bytes.inso.cc/wp/?p=930</guid>
		<description><![CDATA[On my way to the Google Summer of Code Mentor Summit 2009, I accepted DraX&#8217;s invitation to give a 1-hour talk about XMMS2 Collections at his work, i.e. Metaweb, in San Francisco.
The topic was somewhat relevant for them as it&#8217;s reminiscent of MQL, the query language they developed for Freebase. It&#8217;s worth noting that although [...]]]></description>
			<content:encoded><![CDATA[<p>On my way to the <em>Google Summer of Code Mentor Summit 2009</em>, I accepted DraX&#8217;s invitation to give a 1-hour talk about <a href="http://wiki.xmms2.xmms.se/wiki/Collections_Concept">XMMS2 Collections</a> at his work, i.e. <a href="http://www.metaweb.com/">Metaweb</a>, in San Francisco.</p>
<p>The topic was somewhat relevant for them as it&#8217;s reminiscent of <a href="http://www.freebase.com/view/en/documentation">MQL</a>, the query language they developed for <a href="http://www.freebase.com/">Freebase</a>. It&#8217;s worth noting that although both share a pool of buzzwords such as “graph”, “loosely-structured”, “querying”, etc, they are not quite the same:</p>
<ul>
<li><strong>Freebase</strong> is essentially a giant graph-database, which you query with <strong>MQL</strong> to retrieve graph fragments.</li>
<li>The <strong>XMMS2 database</strong> is a flat denormalized store, which you query with graph-structured <strong>Collections</strong> to retrieve a list of entries.</li>
</ul>
<p>Note: Collections 2.0 should however allow fancier querying to retrieve tree-shaped structures.</p>
<p>About 10-20 people showed up and listened to me blurbing about the <em>concept</em> of Collections, the <em>rationale</em> behind them, the <em>API</em>, <em>Collections 2.0</em>, possible <em>UI uses</em>, what it represents for the user, pointers to <em>S4</em>, etc.</p>
<p>It&#8217;s all in those over-engineered slides that I have no choice but to put online, under <a href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-Share Alike 2.5 License</a>, for them to live on forever on the internets. And yes, it&#8217;s still either in <a href='http://bytes.inso.cc/wp/wp-content/uploads/2009/11/collections-presentation-20091022-metaweb.key'>evil Keynote format (source)</a>, or <a href='http://bytes.inso.cc/wp/wp-content/uploads/2009/11/collections-presentation-20091022-metaweb.pdf'>in PDF</a>.</p>
<p>Oh and Metaweb, thanks for the food!</p>
]]></content:encoded>
			<wfw:commentRss>http://bytes.inso.cc/wp/2009/11/07/%e2%80%9cxmms2-collections%e2%80%9d-presentation-at-metaweb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dance to the FOSDEM &#8216;09 beat</title>
		<link>http://bytes.inso.cc/wp/2009/02/12/dance-to-the-fosdem-09-beat/</link>
		<comments>http://bytes.inso.cc/wp/2009/02/12/dance-to-the-fosdem-09-beat/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 23:59:07 +0000</pubDate>
		<dc:creator>theefer</dc:creator>
				<category><![CDATA[xmms2]]></category>
		<category><![CDATA[collections]]></category>
		<category><![CDATA[fosdem]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[organisation]]></category>

		<guid isPermaLink="false">http://bytes.inso.cc/wp/?p=849</guid>
		<description><![CDATA[Over last weekend (February 6-8), I shared a fantastic time in Brussels with people from the XMMS2 team (and a few thousands over geeks and almost as many beers). We got together, mostly off our Google Summer of Code money, and spent some IRL time thinking of how to make XMMS2 better. Thanks to everyone [...]]]></description>
			<content:encoded><![CDATA[<p>Over last weekend (February 6-8), I shared a fantastic time in Brussels with people from the XMMS2 team (and a few thousands over geeks and almost as many beers). We got together, mostly off our Google Summer of Code money, and spent some IRL time thinking of how to make XMMS2 better. Thanks to everyone who was involved, it&#8217;s been great fun!</p>
<p>Although tilman and DraX hacked fervently on <a href="http://wiki.xmms2.xmms.se/wiki/Genipc">GenIPC</a>, most of what we worked on wasn&#8217;t code, but rather discussions on the organisation of the project, the status of projects waiting to be merged into the main tree (GenIPC, service clients, collections 2.0), as well as future projects we want to explore, such as mergestatus (a pimped up iteration of <a href="http://git.xmms.se/merge/">the merge page</a>) and an official GUI (yes!).</p>
<p>The main issue we identified with organisation is the lack of clear vision of where we are heading. Projects like GenIPC or mergestatus are being worked on without a general and agreed upon (let alone written down) specification of all they entail. The decision we took was to try to get tru back into a role of project manager and require proper wiki pages to be written about all the major features that are being developed. I personally want to start blogging more about thoughts and projects I&#8217;m working on (I know I&#8217;ve said it before, but this time it is true).</p>
<div class="full-figure"><a href="http://www.flickr.com/photos/9297521@N08/3267454741/" title="Saturday Night Hacking"><img src="http://farm4.static.flickr.com/3301/3267454741_17078916c9.jpg" class="illustration" alt="Saturday Night Hacking" /></a>
<p class="caption"><a href="http://creativecommons.org/licenses/by-nc-sa/2.0/" title="Attribution-NonCommercial-ShareAlike License"><img src="http://bytes.inso.cc/wp/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" class="icon cc-logo" /></a> <a href="http://www.flickr.com/photos/9297521@N08/3267454741/">Saturday Night Hacking</a>, by <a href="http://www.flickr.com/people/theefer/" title="theefer">theefer</a></p>
</div>
<p>I had several discussions with nesciens, who has been hacking on <a href="http://wiki.xmms2.xmms.se/wiki/Summer_of_Code_2008/Collections_2.0">collections 2.0</a> last summer, and we identified different topics that should be explained on the wiki and possibly discussed with the rest of the team:</p>
<ul>
<li><strong><a href="http://wiki.xmms2.xmms.se/wiki/Summer_of_Code_2008/Collections_2.0/Querying_concept">Advanced (insane) queries</a></strong> (to retrieve all sorts of information and structures from the mlib using collections)</li>
<li><strong><a href="http://wiki.xmms2.xmms.se/wiki/Summer_of_Code_2008/Collections_2.0/Source-preference">Source goodness</a></strong> (server magic to make collections select the right value according to a global ranking of sources)</li>
<li><strong>Token operator</strong> (to match tokens, which is what you usually search for, using an external token table)</li>
<li><strong><a href="http://wiki.xmms2.xmms.se/wiki/Summer_of_Code_2008/Collections_2.0/Operator_list">Other new collection operators</a></strong> (in particular, related to treating medialists, i.e. keep collections ordered throughout the DAG)</li>
</ul>
<p>Note: most of the links above are work in progress, meaning they&#8217;re not total rubbish, but don&#8217;t rely on them to launch your personal space capsule.</p>
<p>Other fancy stuff that has been debated:</p>
<ul>
<li>Proper serialisation of the collection DAG over IPC</li>
<li>Usage of <code>xmmsv_t</code> dict to store collection attributes, possibly richer than strings (already started by anders)</li>
<li>Idlist as a simple attribute in Idlist collections</li>
<li>String table (optimisation of strings in the DB to avoid duplication of data)</li>
</ul>
<p>nesciens has already started updating the <a href="http://wiki.xmms2.xmms.se/wiki/Summer_of_Code_2008/Collections_2.0/Todo_list">todolist/roadmap</a>.</p>
<p>And of course, the super exciting new project that nobody even expected: a common effort to work on an official GUI client!</p>
<p>I have a lots of thoughts about this, and I need to summarise all the discussions related to it at FOSDEM. And that will be the topic of my next post!</p>
<p>(Who said you couldn&#8217;t have cliffhangers in blog posts?)</p>
<div class="full-figure"><a href="http://www.flickr.com/photos/9297521@N08/3267461517/" title="Farewell group photo"><img src="http://farm4.static.flickr.com/3430/3267461517_5b717bcb82.jpg" class="illustration" alt="Farewell group photo" /></a>
<p class="caption"><a href="http://creativecommons.org/licenses/by-nc-sa/2.0/" title="Attribution-NonCommercial-ShareAlike License"><img src="http://bytes.inso.cc/wp/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" class="icon cc-logo" /></a> <a href="http://www.flickr.com/photos/9297521@N08/3267461517/">Farewell group photo</a>, by <a href="http://www.flickr.com/people/theefer/" title="theefer">theefer</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://bytes.inso.cc/wp/2009/02/12/dance-to-the-fosdem-09-beat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XMMS2 GSoC 2008 wrap-up</title>
		<link>http://bytes.inso.cc/wp/2008/09/19/xmms2-gsoc-2008-wrap-up/</link>
		<comments>http://bytes.inso.cc/wp/2008/09/19/xmms2-gsoc-2008-wrap-up/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 13:37:55 +0000</pubDate>
		<dc:creator>theefer</dc:creator>
				<category><![CDATA[xmms2]]></category>
		<category><![CDATA[collections]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[genipc]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[nycli]]></category>
		<category><![CDATA[s4]]></category>
		<category><![CDATA[service.clients]]></category>

		<guid isPermaLink="false">http://inso.cc/wp/?p=587</guid>
		<description><![CDATA[I&#8217;m still waiting for nesciens&#8217; conclusion notes about his very successful project, Collections 2.0, but he&#8217;s been busy with his starting university so it will take a few more days.
In the meantime, I wanted to write a wrap-up post about this year&#8217;s mildly successful Google Summer of Code with XMMS2.  Out of 6 projects, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still waiting for nesciens&#8217; conclusion notes about his very successful project, Collections 2.0, but he&#8217;s been busy with his starting university so it will take a few more days.</p>
<p>In the meantime, I wanted to write a wrap-up post about this year&#8217;s mildly successful <a href="http://code.google.com/soc/">Google Summer of Code</a> with <a href="http://xmms2.sf.net/">XMMS2</a>.  Out of 6 projects, we&#8217;ve had 3 successful projects and 3 failed ones.  That&#8217;s a pretty high and disappointing failure rate to be honest.  You always have to be prepared to face unplanned obstacles, but it got a bit out of hand this time.</p>
<p>It is especially frustrating as the projects were all pretty sexy or important, or both.</p>
<p>The long-awaited <strong>Generic IPC</strong> project seems to be one of those cursed projects that nobody manages to get done.  We ran that project last year but it was not finished in time, so Leonid Evdokimov (darkk) took over this year, but he wasn&#8217;t able to complete it either.</p>
<p>We had been lucky to get an extra slot to run the <a href="http://wiki.xmms2.xmms.se/wiki/New_medialib_backend"><strong>S4</strong></a> project, an experimental new backend for the medialib optimized (in structure, space and performance) for the specific semantics of our data (basically, short property strings attached to objects). Unfortunately, Tobias Bengtsson (ydo) got more busy than expected with his master thesis and a major hardware failure put an end to his hopes of completing S4.</p>
<p>The last failing project was probably the most original/experimental: <strong>cloudstream</strong>, or a smart blend of xmms2 local music playing and <a href="http://www.last.fm/">last.fm</a>&#8217;s social &amp; semantic information, allowing to play &#8220;local radios&#8221; of your tracks using a sexy graphical cloud interface.  We were especially excited as it had come as a spontaneous suggestion by the student, Arpith Siromoney.  Sadly, only <a href="http://git.xmms.se/?p=cloudstream.git;a=tree">little code</a> was produced; we hope that the idea will live on and end up being implemented in one way or the other!</p>
<p>On the brighter side of things, the three other projects were a great success and we hope to include them in the -devel tree and the main release ASAP.</p>
<p>Daniel Chokola (puzzles) worked on getting Ning Shi (zeegeek)&#8217;s <strong>Service clients</strong> (which I mentored for GSoC &#8216;07) ready for merge.  He reworked the concept a bit (operations involved, atomicity of registration, etc), gave the API a refresh and rebased the tree onto the latest -devel releases.  From early on, it had also become clear that it would all be nicer with the <a href="http://bugs.xmms2.xmms.se/view.php?id=1835">result/value-split</a> refactoring that had been discussed for some time.  Nobody had time to hack it up so I did, and I worked closely with puzzles to update service clients to use the new code and giving him a hand cleaning up the server-side and IPC layer.  It&#8217;s now a good showcase of the cool new <code>xmmsv_t</code> API!</p>
<p>The first project I mentored was <a href="http://wiki.xmms2.xmms.se/wiki/New_korving_CLI"><strong>nycli</strong></a>, also referred to as &#8220;the new korving CLI&#8221;, a new CLI client for XMMS2 in C that I had started to take over from my previous C++ client, <a href="http://nyello.inso.cc/">nyello</a>.  I had run out of time to work on nycli but Igor Ribeiro de Assis (greafine) did a great job taking over the code, improving it and completing all the missing features and adding some of his own: commands to interact with the playlist, collections and server actions, support for subcommands, file path globbing, interactive status command, and the super cool <em>aliases</em>!</p>
<p>The second student I mentored, Erik Massop (nesciens), hacked heaps of new features into <a href="http://wiki.xmms2.xmms.se/wiki/Collections_Concept">Collections</a> (my GSoC &#8216;06 project): <a href="http://wiki.xmms2.xmms.se/wiki/Summer_of_Code_2008/Collections_2.0/Operator_list">new operators</a> (incl. Order, Limit, generic comparison, Token, etc.), server-side source preferences, support for medialists (ordered collections), new query mechanisms allowing aggregates, functions on values and more complex results, conversion of all values to strings, optimized prefix matching, etc.  Here come <a href="http://wiki.xmms2.xmms.se/wiki/Summer_of_Code_2008/Collections_2.0"><strong>Collections 2.0</strong></a>!</p>
<p>As an organization, we acknowledge our failure at choosing students able to complete their projects in full and in time.  We had a much better success ratio in the previous editions, so I guess this year is a combination of bad luck and small defects on the part of mentors and students.</p>
<p>Next year, I&#8217;d like us to improve communication between mentor and student, and also between the GSoC participants and the XMMS2 community.  Status updates on the planet, clearer project descriptions, better linking throughout the wiki, etc.  I&#8217;d also like to focus on working on a stricter list of objectives, roadmap and deadlines with the student, to help us keep track of progress more formally.  I think we already had a pretty good selection process, but that might be improved too.</p>
<p>Nevertheless, I&#8217;m very happy with the students I mentored (nesciens, greafine, and puzzles unofficially): they all showed dedication and genuine interest in their projects, they were very open to criticism but also ready to provide arguments and new ideas to make solutions more elegant.</p>
<p>I look forward to seeing the GSoC code merged in official releases; it has sometimes taken longer than we would have liked in the past, but nycli and service clients should make it to your Git tree in the near future.  Collections 2.0 still need review and tests, but the possibilities are already quite exciting!</p>
<p>Congratulations to all the successful students, thanks to Google for sponsoring this program, and let&#8217;s make it even more successful next year!</p>
]]></content:encoded>
			<wfw:commentRss>http://bytes.inso.cc/wp/2008/09/19/xmms2-gsoc-2008-wrap-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Collections in the XMMS2 music player</title>
		<link>http://bytes.inso.cc/wp/2007/06/28/collections-in-the-xmms2-music-player/</link>
		<comments>http://bytes.inso.cc/wp/2007/06/28/collections-in-the-xmms2-music-player/#comments</comments>
		<pubDate>Thu, 28 Jun 2007 14:47:37 +0000</pubDate>
		<dc:creator>theefer</dc:creator>
				<category><![CDATA[xmms2]]></category>
		<category><![CDATA[collections]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[lwn]]></category>
		<category><![CDATA[music.player]]></category>
		<category><![CDATA[organization]]></category>

		<guid isPermaLink="false">http://inso.cc/wp/2007/06/28/collections-in-the-xmms2-music-player/</guid>
		<description><![CDATA[This is a repost from the article published in LWN and mentioned earlier on this blog. Thanks to LWN for publishing it in the first place, and to all the people who proofread and commented on it! I hope this will serve as a more up-to-date introduction to Collections in XMMS2 (I should probably post [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is a repost from the article <a href="http://lwn.net/Articles/237952/">published in LWN</a> and <a href="http://inso.cc/wp/2007/06/19/drjekyll-collections-and-other-korvar/">mentioned earlier</a> on this blog. Thanks to <a href="http://lwn.net/">LWN</a> for publishing it in the first place, and to all the people who proofread and <a href="http://lwn.net/Articles/237952/#Comments">commented</a> on it! I hope this will serve as a more up-to-date introduction to Collections in XMMS2 (I should probably post it on the <a href="http://wiki.xmms2.xmms.se/">wiki)</a>. Discussion is welcome, naturally.</em></p>
<p>The number of music players on Linux has been steadily increasing lately, but while these projects have been getting more and more polished, we have yet to see revolutionary improvements in terms of user experience. Indeed, the trend has privileged borrowing as many features as possible from other projects, rather than questioning the reasons behind their design.</p>
<p>This article describes XMMS2&#8217;s attempt to address long-standing limitations of music players, through its new support for <em>Collections</em>. First, I will summarize the rationale behind this feature, then present its concept and implementation. A conclusion about the current state and future directions of Collections will close the article.</p>
<h3>Design rationale</h3>
<p>I have been concerned with the state of music players for a long time. Two years ago, I wrote a <a href="http://inso.cc/wp/2005/07/11/better-music-player-manifesto/">Manifesto for a Better Music Player</a>.  Although my ideas have evolved since then, the general conclusions of that article still hold.</p>
<p>One important argument I made is that the design of a music player should focus on the users&#8217; needs, rather than on a list of well-known features.  All the traditional features (playlist, media library, cover browsing, etc) and hacks (play queue, random mode, etc) stem from the needs users have for:</p>
<ul>
<li>playing music non-linearly</li>
<li>searching for specific media</li>
<li>browsing their media library</li>
<li>organizing their music</li>
</ul>
<p><strong>Non-linear playback</strong> was first introduced in a crude form as the &#8220;random mode&#8221;, directly inspired from legacy CD players. <a href="http://www.apple.com/itunes/">iTunes</a> later popularized its &#8220;<a href="http://www.apple.com/ilife/tutorials/itunes/it4-6.html">Party Shuffle</a>&#8221; mode, which solved the unpredictability of playback by maintaining a queue of randomly selected songs. What we are still waiting for, though, is a smarter mode that would also take into account beat, artist similarity, or other semantic information.</p>
<p>All music players based on a media library provide a <strong>search</strong> feature. Unfortunately, its power is often hindered by annoyingly complex forms used to choose the fields to query. Few developers seem to have noticed the success of Google&#8217;s search interface: minimalistic, but enriched by rating heuristics and a rich syntax for advanced users.</p>
<p>The other axis required by our ever-growing music libraries is <strong>browsing</strong>. Media library browsing is always present in some form, although mostly simplistic and uninspired. When they are not cloning iTunes genre/artist/album filters or cover art browsing, most music players simply present the users with the list of all their media in a plain multi-column layout. Easy to implement, but hard on the eyes for the users. Interestingly, <a href="http://www.foobar2000.org/">Foobar2000</a> (freeware) is the only popular player to allow a <a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=49783">rich customization of the layout</a>, which greatly improves readability.</p>
<p>The lack of features that help users <strong>organize</strong> their media library contributes to the difficulty of addressing the two previous issues. In the physical world, users can arrange their CDs spatially in their own personal way (by artist, date of release, mood, etc), set a couple of albums aside for playing at a party, or highlight their latest acquisitions on a shelf. This lets them build a cognitive map of the location of items. On computer-based music players, however, they are barely provided with the possibility to create playlists, possibly dynamic, but seldom integrated well enough to be used powerfully. Even bare files have richer organizational possibilities, using directories!</p>
<p>The reason behind these limitations is not that they are inherently unsolvable. The truth is that a lot of effort is required to implement new approaches in any of these fields. Experimentation, either conceptual or in terms of interface, is expensive.</p>
<h3>The Collections concept</h3>
<p>The goal of Collections is to address this problem by creating a common abstraction layer. Search, browsing and organization all share one property: they act on subsets of the media library. Computers are especially good at handling sets, but music players haven&#8217;t really exploited that fact yet.</p>
<p>A collection is defined as a subset of the media library.</p>
<p>This set of media (songs) can be dynamic, for instance &#8220;All media by Kraftwerk released prior to 1980&#8243; or &#8220;All media added to the media library last week, except those by Justin Timberlake&#8221;. A static set, for instance hand-picked media selected for parties, is just a special case of dynamic sets.</p>
<p>Note that a collection is not merely what some players call a &#8220;Smart Playlist&#8221; (or &#8220;Dynamic Playlist&#8221;). A &#8220;Smart Playlist&#8221; is only used to play an arbitrary list of media, while a collection is a generic representation of a set of media. For instance, this includes the results of a search, a filtered view of the media library, the list of tracks from a given album, etc.</p>
<p>Because a collection is an abstract representation, it can be used ubiquitously throughout all the features of the music player: browsing, searching in the media library or the playlist, enqueuing, jumping, etc. A collection can also be saved on the server, thus allowing the users to organize their music and reuse their selection in homogeneous and flexible ways.</p>
<h3>Collections for the XMMS2 player</h3>
<p>The XMMS2 project turned out to be the perfect ground to implement collections.  Unlike its popular predecessor <a href="http://www.xmms.org/">XMMS</a>, XMMS2 hasn&#8217;t gathered much attention yet.  However, it features all that you would expect from a recent music player: a media library, support for many audio formats and multiple platforms (Linux, *BSD, OS X, Windows, etc), bindings for many languages (C, C++, Ruby, Python, Perl, Java), and a friendly community open to innovation.</p>
<p>In addition, the player was designed according to a client-server architecture, so that the server is responsible for all the boring work (audio decoding, media library management, tag extraction, etc), while any flavor of user interface can be implemented as a client connected to the server, possibly across the network.</p>
<p>Collections have been implemented in XMMS2 as a <a href="http://code.google.com/soc/2006/xmms2/appinfo.html?csaid=FE080F82D114A39C">student project</a> during the Google Summer of Code 2006, and finally merged into the stable tree on May 20, as part of the <a href="http://wiki.xmms2.xmms.se/index.php/Release:DrJekyll">DrJekyll release</a>.</p>
<p>Support for collections was implemented on the server, as a layer above the media library and playlists (more about that in the implementation details), and exposed to the clients through a collections API. This API allows clients to save collections on the server, query the media library, enqueue the content of a collection, etc. Thus, although the user interface depends on the client, the server and the clients all share the same abstract representation.</p>
<p>Clients are also freed from the need to generate complex SQL queries themselves; instead, they can easily build a (DBMS-agnostic) collection and the tedious query is performed by the server. In addition, a parser is provided to generate a collection from a string with an enriched search syntax.</p>
<p>Collections make it essentially trivial to browse and search the media library. Moreover, advanced features are either natively available or very easy to implement: iTunes-like Party Shuffle, recursive filtering (e.g. search inside the playlist), display Top 10 or never played songs, changing the equalizer settings if the playing song is in a particular collection (e.g. &#8220;Jazz Vinyl rips&#8221;), etc.</p>
<h3>Implementation</h3>
<p>Strictly speaking, collections are implemented as a <em>directed acyclic graph</em> (DAG), each node of which is a collection operator. In fact, because the structure is recursive, each node of the graph corresponds to a collection. This model was chosen to emphasize the aggregated nature of users&#8217; music collections.</p>
<p>Collection operators come in four different flavors:</p>
<ul>
<li>set operators</li>
<li>filter operators</li>
<li>list operators</li>
<li>reference operator</li>
</ul>
<p>The <strong>set operators</strong> take an arbitrary number of operands and returns the collection obtained by applying the corresponding set operation to them. For instance, &#8220;any music by The Beatles <em>or</em> any music by The Rolling Stones&#8221;. Available set operators: union, intersection, complement.</p>
<p>The <strong>filter operators</strong> enforce conditions on properties of the media; the resulting collection only contains the media that match the filtering attributes. For instance, &#8220;all the songs <em>with &#8217;stairway&#8217; in their title</em>&#8220;.  Available filter operators: equals, match (partial matching of strings using wildcards), larger/smaller (for numbers), has (checks whether a property is present).</p>
<p>The <strong>list operators</strong> are a bit special. The basic list operator (called &#8220;idlist&#8221;) does not accept any operands; instead, it simply generates the collection corresponding to the custom list of media it contains. Because list operators store static, ordered lists of media, they are used as playlists in XMMS2! Available list operators: list, queue (pop songs once they have been played), Party Shuffle (takes an operand, used to randomly feed the list with new entries).</p>
<p>The <strong>reference operator</strong> is simply used to refer to the content of a saved collection or playlist. For instance, &#8220;all the songs released in 2007 <em>in the Foo playlist</em>&#8220;. A reference operator is also used to refer to the whole media library (all media).</p>
<p>Now, let&#8217;s illustrate all this with a sample collection structure:</p>
<p><a title="Sample collection diagram" href="http://inso.cc/wp/wp-content/uploads/2007/06/collection-diagram-usecase-3.png"><img class="illu1" src="http://inso.cc/wp/wp-content/uploads/2007/06/collection-diagram-usecase-3.png" alt="Sample collection diagram" /></a></p>
<p>The nodes represent collection operators, while edges simply connect operands to operators.</p>
<p>Here, &#8220;All Media&#8221; is a reference to the whole media library, and we use a Match operator to only keep media for which the artist has a name starting by &#8220;A&#8221; (1). We then take the union (3) of this and the content of the &#8220;Rock 90&#8217;s&#8221; saved collection (2). The result is passed as an operand to a Party Shuffle operator (4), which we save under the name &#8220;Interesting&#8221; (5).</p>
<p>When the user plays the &#8220;Interesting&#8221; playlist, songs are popped from the list as soon as they are finished, and new songs matching the operand collection (3) are automatically enqueued, so that the list always contains at least 20 items. This is specified by the &#8220;size&#8221; attribute of the Party Shuffle. Of course, the user can also edit the playlist and add tracks to it manually.</p>
<p>This is only one example of collections among many. As you can see, the modular structure of collections allows virtually unlimited possibilities. As such, they have been tightly integrated both on the server and in the client API.</p>
<p>On the server, a dedicated module is responsible for handling collection features. When a collection is queried, it serializes the structure into an SQL query, runs it in the media library and returns the matching media, either as a list of media ids or hashes containing the requested media properties. When a collection is saved on the server, it is added to the collection DAG and kept in memory while the server is running. On shutdown, the whole DAG is serialized into the database. Note that playlists are nothing but collections, albeit restricted to list operators and saved into a dedicated namespace.</p>
<p>In the client API, collections introduced many important changes. First, executing raw SQL queries has been deprecated; all queries are now to be performed using collections. Collection data structures can be built either using a set of dedicated functions, or by calling the collection parser on a string given by the user. Finally, many XMMS2 methods have been extended to support collections (e.g. to enqueue media) and new methods allow clients to query, save and retrieve collections from the server.</p>
<p>If you want to learn more about the concept of collections, please have a look at the <a href="http://wiki.xmms2.xmms.se/index.php/Collections_Concept">collections concept page</a> on the XMMS2 wiki. For more details about the implementation, check the <a href="http://wiki.xmms2.xmms.se/index.php/Collections_Design">collections design page</a> and the <a href="http://doxygen.xmms2.xmms.se/clientlib/stable/xmmsclient/group__Collections.html">API documentation</a>.</p>
<h3>Adoption and future directions</h3>
<p>Several <a href="http://wiki.xmms2.xmms.se/index.php/Clients">XMMS2 clients</a> have started offering features based on collections, including <a href="http://nooms.de/projects/abraca/">Abraca</a> (GTK2 client) and <a href="http://www.site.uottawa.ca/~schow031/gntxmms2/">gntxmms2</a> (console client). Other clients have ported search and browsing to the collections API: <a href="http://wiki.xmms2.xmms.se/index.php/Client:Esperanza">Esperanza</a> (Qt4 client), <a href="http://wejp.k.vu/projects/xmms2/">gxmms2</a> (GTK2 client) and the official command-line interface.</p>
<p>Hopefully, client developers will start exploring new directions now that collections are in the main release. The xmms2 CLI client has already been <a href="http://wiki.xmms2.xmms.se/index.php/New_korving_CLI">scheduled for a full rewrite</a>.</p>
<p>Several improvements are also expected to address current limitations of the collections implementation. One limitation is that all collections are treated equally as media sets; if a filter is applied on a playlist, the order and duplicated items will be lost. A smarter internal distinction between lists and sets inside the DAG is in the works. An ordering collection operator could then be introduced to transform a set into an ordered list, as well as an operator to select subsequences of such lists, similarly to SQL LIMIT operation. They could be used to create a collection containing the &#8220;list of the 20 most recently added media&#8221;. The SQL query generator could also be further optimized, unless we decide to replace the database backend completely.</p>
<p>Collections have just made it into the official XMMS2 distribution, but people already use them through features like search, Party Shuffle or groups of songs saved in the media library. They are a powerful toy for developing new features in the clients and hopefully helping users organize and use their music library.</p>
<p>It&#8217;s an exciting time to come up with fresh ideas in the XMMS2 world, and I hope the rest of the developers in the music player community will take the time to reflect on and discuss all these questions earnestly!</p>
]]></content:encoded>
			<wfw:commentRss>http://bytes.inso.cc/wp/2007/06/28/collections-in-the-xmms2-music-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DrJekyll, Collections and other korvar</title>
		<link>http://bytes.inso.cc/wp/2007/06/19/drjekyll-collections-and-other-korvar/</link>
		<comments>http://bytes.inso.cc/wp/2007/06/19/drjekyll-collections-and-other-korvar/#comments</comments>
		<pubDate>Tue, 19 Jun 2007 12:30:52 +0000</pubDate>
		<dc:creator>theefer</dc:creator>
				<category><![CDATA[xmms2]]></category>
		<category><![CDATA[collections]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[nycli]]></category>
		<category><![CDATA[service.clients]]></category>

		<guid isPermaLink="false">http://inso.cc/wp/2007/06/19/drjekyll-collections-and-other-korvar/</guid>
		<description><![CDATA[I haven&#8217;t blogged about XMMS2 in a while now, but a lot has happened since last summer!
First, the new DrJekyll release finally includes the code I developed as part of my Google Summer of Code 2006. That thing where you spend your summer nights coding Free Software on an Open Source project and Google sponsors [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t blogged about <a href="http://wiki.xmms2.xmms.se/">XMMS2</a> in a while now, but a lot has happened since last summer!</p>
<p>First, the new <a href="http://wiki.xmms2.xmms.se/index.php/Release:DrJekyll">DrJekyll</a> release finally includes the code I developed as part of my <a href="http://code.google.com/soc/2006">Google Summer of Code 2006</a>. That thing where you spend your summer nights coding Free Software on an Open Source project and Google sponsors you for it, yes that one. My project was to implement <a href="http://wiki.xmms2.xmms.se/index.php/Collections_Concept">Collections</a>, a new (awesome, life-changing) abstraction layer to help developers give more power to the users for organizing their digital music library, and listening to songs in all sorts of crazy way.</p>
<p>I just <a href="http://lwn.net/Articles/237952/">published an article</a> in the <a href="http://lwn.net/">LWN</a> to explain the how&#8217;s and why&#8217;s of it all. For two weeks, it&#8217;s only available to subscribers, but after that it will be publicly available and I&#8217;ll repost it here, so stay tuned&#8230;</p>
<p>In addition, I&#8217;m now mentoring a student for XMMS2 as part of the <a href="http://code.google.com/soc">Google Summer of Code 2007</a>. <a href="http://eblog.zeegeek.cn/">ZeeGeek</a> is working on <a href="http://wiki.xmms2.xmms.se/index.php/Summer_of_Code_2007/Service_Clients">Service Clients</a>, a new sexy feature to allow XMMS2 clients to offer services to other clients. He&#8217;s doing a great job so far, and I&#8217;m looking forward to more power and modularity in XMMS2!</p>
<p>Finally, I started hacking on the <a href="http://wiki.xmms2.xmms.se/index.php/New_korving_CLI">new korving <acronym title="Command-Line Interface">CLI</acronym></a> (codenamed <em>nycli</em>, because I said so). It&#8217;s in <a href="http://git.xmms.se/?p=xmms2-theefer.git;a=summary">my Git tree on exodus</a>, but it doesn&#8217;t really do anything useful yet (let alone <a href="http://wiki.xmms2.xmms.se/index.php/What_XMMS2_will_not_do">wrestle crocodiles</a>). More on that when it becomes actually usable!</p>
<p>Conclusion: <strong>when the music is end xmms power of the pc</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bytes.inso.cc/wp/2007/06/19/drjekyll-collections-and-other-korvar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manifesto for a Better Music Player</title>
		<link>http://bytes.inso.cc/wp/2005/07/11/better-music-player-manifesto/</link>
		<comments>http://bytes.inso.cc/wp/2005/07/11/better-music-player-manifesto/#comments</comments>
		<pubDate>Sun, 10 Jul 2005 22:48:55 +0000</pubDate>
		<dc:creator>theefer</dc:creator>
				<category><![CDATA[Usability]]></category>
		<category><![CDATA[collections]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[manifesto]]></category>
		<category><![CDATA[music.player]]></category>
		<category><![CDATA[organization]]></category>
		<category><![CDATA[xmms2]]></category>

		<guid isPermaLink="false">http://inso.cc/wp/2005/07/11/better-music-player-manifesto/</guid>
		<description><![CDATA[No perfect music player exists yet.
Apart from your grandma and deaf people, few people do not use computers to play music.  It has become part of the digital experience to listen to music while surfing/chatting/coding/gaming.  And yet, if you ask people, most of those who care the least bit about the usability of [...]]]></description>
			<content:encoded><![CDATA[<p>No perfect music player exists yet.</p>
<p><a title="Amarok’s neat interface" href="http://inso.cc/wp/wp-content/uploads/2007/04/amarok-interface1.png"><img class="illu2" src="http://inso.cc/wp/wp-content/uploads/2007/04/amarok-interface.png" alt="Amarok’s neat interface" /></a>Apart from your grandma and deaf people, few people do <em>not</em> use computers to play music.  It has become part of the digital experience to listen to music while surfing/chatting/coding/gaming.  And yet, if you ask people, most of those who care the least bit about the usability of the programs they use will agree that no music player is perfect.</p>
<p>Windows users will curse in frustration about the unwanted bloat of <a href="http://www.winamp.com/">Winamp 5</a> or the pathetic hegemony of the lesser &#8220;default&#8221; player, <a href="http://www.microsoft.com/windows/windowsmedia/">Windows Media Player</a>.  MacOS X users will point at <a href="http://www.apple.com/itunes/">iTunes</a> with great pride, only to confess that its monolithic perfection is actually spoiled by loads of frustrating details.  Unix users will gladly demonstrate their contempt over the most popular player, <a href="http://www.xmms.org/">XMMS</a>, a convenient but over-simplistic clone of the Winamp 2.* series.  There exist alternative players, but for the sake of argumentative generalisation, let&#8217;s wrap it up this way: they all suck, in some way.</p>
<p>Maybe your 12-year-old sister does not languish for a better, more powerful music player.  Maybe <em>you</em> don&#8217;t care about it either (in which case, it is time to close this tab and go back reading <a href="http://www.thebestpageintheuniverse.net/">the best page in the universe</a>).  But if you think music players could use some improvement, read on.</p>
<p>In this article, we will go through the history of music players, which will be split in three categories: the old playlist-based players (e.g. <a href="http://www.xmms.org/">XMMS</a>, early <a href="http://www.winamp.com/">Winamp</a> versions), the present media-library-based players (e.g. <a href="http://www.apple.com/itunes/">iTunes</a>, <a href="http://www.gnome.org/projects/rhythmbox/">Rhythmbox</a>, <a href="http://www.winamp.com/">Winamp 5</a>) and the alternative client/server-based players (e.g. <a href="http://www.musicpd.org/">Music Player Daemon</a>, <a href="http://wiki.xmms2.xmms.se/">XMMS2</a>).  Studying this evolution and analysing the features of each generation should help us identify the flaws of current music players and design concepts that will bring music playing to a new level.</p>
<h3>Vocabulary</h3>
<p>Before we start discussing the history and future of music players, let&#8217;s make sure we share the same definition of the most important concepts found in music players:</p>
<dl>
<dt>Library</dt>
<dd>The set of all the music the user has on his computer, or at least all the music he asks the music player to handle. </dd>
<dt>Collection</dt>
<dd>A subset of the library, that can be arbitrarily built by the user or correspond to a theme (&#8220;early Pink Floyd live sets&#8221;, &#8220;jazz songs longer than 20 minutes&#8221;) or any other criteria (&#8220;best rated songs&#8221;, &#8220;never played songs&#8221;). </dd>
<dt>Playlist</dt>
<dd>A sequential list of songs to be played. There can be one or several, but usually we refer to <em>the playlist</em> as the list of songs currently queued for playing. </dd>
</dl>
<p>In some players, the boundaries between these different concepts are blurred. For instance, <a href="http://www.apple.com/itunes/">iTunes</a>&#8216; <em>Smart Playlists</em> are obviously playlists (list of files to be played sequentially), but also a sort of collection (since they represent a dynamic subset of the library). We will see that this mix of concepts is at the root of the flaws of today&#8217;s most advanced players.</p>
<h3>Playlist players</h3>
<h4>Simple needs, simple players</h4>
<p><a title="Classic 3-pane XMMS" href="http://inso.cc/wp/wp-content/uploads/2007/04/xmms-simple-3-pane.png"><img class="illu2" src="http://inso.cc/wp/wp-content/uploads/2007/04/xmms-simple-3-pane1.png" alt="Classic 3-pane XMMS (thumbnail)" /></a>In the nineties, with the advent of Napster, CDs and fast personal computers, more and more people started to listen to music on their machine.  But due to the slowness of the 56k connections and the expensiveness of hard drives, they only had few files, usually a couple of hundreds.  Playlist-based players such as <a href="http://www.winamp.com/">Winamp</a> (and its Unix equivalent, <a href="http://www.xmms.org/">XMMS</a>) were suitable: loading files directly from the filesystem to a sequential list was manageable and the size of the library was small enough to be browsed linearly.</p>
<p>Playlist saving/loading features made it possible to keep collections of songs, e.g. an album, a party playlist or songs of a given genre.  However, the process of saving/loading a physical file on the disk manually was cumbersome and not practical.  Moreover, the lists were static: you would have to update the &#8220;rock playlist&#8221; manually everytime you add a new rock song to your library&#8230;  These are the reasons why playlist files were not so popular among most users.</p>
<h4>Hack features to break the sequential flow</h4>
<p><a title="XMMS: Jump window" href="http://inso.cc/wp/wp-content/uploads/2007/04/xmms-jump-window.png"><img class="illu2" src="http://inso.cc/wp/wp-content/uploads/2007/04/xmms-jump-window1.png" alt="XMMS: Jump window (thumbnail)" /></a>The <strong>jump</strong> feature (the J key in <a href="http://www.winamp.com/">Winamp</a> or <a href="http://www.xmms.org/">XMMS</a>) is nothing but a hackish substitute for a decent search mechanism.  Basically, it involves looking for all song titles matching a string in the playlist; it is very fast and simple to use.  However, it quickly shows it limits when you want to look for all songs by a band called &#8220;M&#8221; or even &#8220;Air&#8221;.  The other obvious limitation is that it only searches in the playlist, not the entire library, and it has no knowledge of the song metadata.</p>
<p>The <strong>random play</strong> feature helps break the linearity of the playlist by randomly selecting the next song to play.  Although this feature is very popular, it also has its limitations.  First, it is not possible to preview the random queue, meaning that you only discover what song you jump to when you start playing it.  Not very convenient if you want to avoid jumping to that shameful Britney song you had forgotten to erase.  The second shortcoming is that you cannot introduce a factor (rating, genre, etc) in the randomness: songs are randomly chosen from the whole playlist.</p>
<p><img class="illu2" src="http://inso.cc/wp/wp-content/uploads/2007/04/xmms-queue-playlist.png" alt="XMMS: Queue in the playlist" />The most interesting feature introduced in the playlist-based players is the <strong>queue</strong> feature.  A late hack, which lets you specify a queue of songs to jump to in the playlist instead of just playing the list from top to bottom.  This allows you to avoid moving songs around in the playlist and therefore you can load all your library in the playlist, keep it ordered (e.g. by artist/album) and still impose a playing sequence.  But once again, the feature is a hack and has its flaws: it is impossible to view the queue (except by browsing the playlist and looking for the queued songs) and hard to manage it (reorder/edit).</p>
<h4>Conclusion</h4>
<p>Playlist-based players were efficient with small amounts of music files, but they don&#8217;t scale with today&#8217;s huge libraries. Various features have been hacked to try to improve the user experience, but none is really satisfying.</p>
<p>Users need a better way to manage their music library, with powerful browsing and searching possibilities.  The queue feature also taught us that users want both quick browsing possibilities and control over the playing sequence; we will see that &#8220;real&#8221; collections can help solve this issue in a more natural manner.</p>
<p>These issues have led to the next generation of players, based on a media-library.</p>
<h3>Media-Library players</h3>
<p>Players of the new generation (e.g. <a href="http://www.winamp.com/">Winamp 5</a>, <a href="http://www.apple.com/itunes/">iTunes</a>, <a href="http://www.gnome.org/projects/rhythmbox/">Rhythmbox</a>, <a href="http://www.microsoft.com/windows/windowsmedia/">Windows Media Player</a>) now focus on a structured database of song metadata rather than just files in a sequence.  In addition to artist, album, year or genre fields, additional information can be stored for each song, such as the number of times the song has been played, a user-rating, when the files was added to the library, etc.</p>
<h4>Efficient search and browsing</h4>
<p><a title="Rhythmbox: main window" href="http://inso.cc/wp/wp-content/uploads/2007/04/rhythmbox-main-window.png"><img class="illu2" src="http://inso.cc/wp/wp-content/uploads/2007/04/rhythmbox-main-window1.png" alt="Rhythmbox: main window (thumbnail)" /></a>The introduction of a database of metadata allows powerful search possibilities.  It is possible to search by artist, album, title, or with complex queries combining them and use other properties in the mix (rating, number of times played, etc).  The searches are now performed on the whole library, but remain fast thanks to the caching of the information in a database.  The only possible complaint is that sometimes, interfaces tend to make the search &#8220;too user-friendly&#8221;, thus preventing the experienced users from using complex queries.</p>
<p><a title="Windows MediaPlayer: a lousy tree-based interface" href="http://inso.cc/wp/wp-content/uploads/2007/04/wmp-stupid-tree.png"><img class="illu2" src="http://inso.cc/wp/wp-content/uploads/2007/04/wmp-stupid-tree1.png" alt="Windows MediaPlayer: a lousy tree-based interface (thumbnail)" /></a>Another area that has been greatly improved by the media-library is the browsing experience.  Whereas playlist-based players only relied on a sequential playlist and the filesystem tree, players based on a media-library allow powerful visualisation of the library. Clever browsing through genre/artist/album filters has been introduced by <a href="http://www.apple.com/itunes/">iTunes</a> (followed by <a href="http://www.gnome.org/projects/rhythmbox/">Rhythmbox</a> and <a href="http://www.winamp.com/">Winamp 5</a>), while some others have favoured a much poorer tree interface (<a href="http://www.microsoft.com/windows/windowsmedia/">Windows Media Player</a>, <a href="http://www.musicpd.org/gmpc.shtml">gmpc</a>).</p>
<p>We now agree that the search and browsing possibilities allowed by the media-library are promising.  Let&#8217;s have a look at various players implementing them in different ways.</p>
<h4>Dumb and smart playlists</h4>
<p>Thankfully, the players based on a media-library seem to have heard the complaint about the clumsiness of the saving/loading of playlist files: they all provide a way to directly access playlists from a side-menu.  Good, this makes the concept of playlists usable at last and we will need them, as we will see later on.</p>
<p>More than that, they provide us with a much more powerful concept, <strong>Smart Playlists</strong> (in iTunes&#8217; vocabulary), which are dynamic subsets of the library matching a given set of constraints.  For example, a smart playlist can contain all songs by Led Zeppelin released in 1969, or all rock songs containing &#8220;paranoid&#8221; in their title.  The power of the filters varies between a user-friendly interface and complex, raw queries to the media-library database.  In any case, smart playlists are a very convenient way to create collections to provide selective views on the whole library, thus enhancing the browsing experience.</p>
<h4><a href="http://www.apple.com/itunes/">iTunes</a> (and <a href="http://www.gnome.org/projects/rhythmbox/">Rhythmbox</a>)</h4>
<p><a title="iTunes: party shuffle" href="http://inso.cc/wp/wp-content/uploads/2007/04/itunes-party-shuffle.png"><img class="illu2" src="http://inso.cc/wp/wp-content/uploads/2007/04/itunes-party-shuffle1.png" alt="iTunes: party shuffle (thumbnail)" /></a>Apart from featuring Apple&#8217;s clean and well thought-out interface, <a href="http://www.apple.com/itunes/">iTunes</a> presents a unique concept: the <strong><a href="http://www.apple.com/itunes/playlists.html">Party Shuffle</a></strong>.  Although the name clearly explains what it is all about, let&#8217;s repeat the idea: you choose a playlist to shuffle from and you get a random list of songs.  The interest lies in the fact that you see the random sequence <em>as a playlist</em>, i.e. you see what songs are playing next (and what songs have just been played)!  Of course, it is possible to edit the random list by adding/moving/removing entries, as well as shuffle it again.</p>
<p>What merely sounds like a new feature actually pinpoints the major problem that all existing players suffer from: the clumsy separation of collections and playlists.  The key of the Party Shuffle is that it lets you use a collection you have prepared, without messing with the collection itself, which is better kept ordered. When a user wants to play his &#8220;70&#8217;s Rock&#8221; collection (a Smart Playlist, in iTunes&#8217; vocabulary), he doesn&#8217;t want to ruin the clean artist/album/track sorted list.  What he really wants to do is <em>instantiate his collection as a playlist</em>, and modify the latter rather than the former.  If implemented in a clever interface, this idea will be much more natural than it sounds.</p>
<h4><a href="http://madman.sourceforge.net/">Madman</a></h4>
<p><a title="Madman interface" href="http://inso.cc/wp/wp-content/uploads/2007/04/madman-interface.png"><img class="illu2" src="http://inso.cc/wp/wp-content/uploads/2007/04/madman-interface1.png" alt="Madman interface (thumbnail)" /></a><a href="http://madman.sourceforge.net/">Madman</a> is an interesting music manager running on GNU/Linux.  It is mostly a media-library, as it uses <a href="http://www.xmms.org/">XMMS</a> as a back-end player.  What is interesting about this project is that it does not try to copy any famous player, and is surprisingly successful in its own clever way.</p>
<p>At first, the Qt interface looks a bit poor, with a disappointing tree widget to browse by artist or album. We notice that the interface is split in two: browse the library with filters and queries in the top pane, view the collections in the bottom pane.  The query features are very powerful (regular expressions, last time played, etc) and it is possible to bookmark a query from the browse pane into a new collection with a single button.  Neat.</p>
<p>Among the features, right-clicking on a song allows to play (now, next or eventually) all the songs by the same artist or from the same album.  This shows the importance of the ability to act on groups of songs.  Last but not least, it is also possible to edit the content of a dynamic playlist by adding or removing songs, thus bypassing the filter.  Although it might seem contradictory with the very concept of query-generated playlists, it ends up being a pleasant feature for the user.</p>
<p>One minor feature could be added to the tree-structured dynamic playlists: it would be useful to allow inheritance of the filters down the tree, so as to refine the collections as we go deeper in the branches.</p>
<p>Overall, <a href="http://madman.sourceforge.net/">Madman</a> forms a very clever media-library tool, with loads of nice ideas and interaction choices.  The interface could be improved and should include the actual playlist (rather than relying on XMMS&#8217; playlist), but there is still a lot to learn from this project.</p>
<h4><a href="http://www.winamp.com/">Winamp 5</a></h4>
<p><a title="Winamp 5: media-library and playlist" href="http://inso.cc/wp/wp-content/uploads/2007/04/winamp5-medialibrary.png"><img class="illu2" src="http://inso.cc/wp/wp-content/uploads/2007/04/winamp5-medialibrary1.png" alt="Winamp 5: media-library and playlist (thumbnail)" /></a>The most obvious improvement from the Winamp 2.* versions is the media-library.  Just as other players, it supports filtered browsing, access to playlists from the interface, etc.  However, the rest of the player (the main window/equalizer/playlist trio) remains unchanged. This unfortunately introduces some confusion as playlists appear in two locations: in the media-library <em>and</em> in the old-style playlist pane.</p>
<p>Surprisingly, Winamp 5 is one of the few players to offer &#8220;real&#8221; collections (i.e. impossible to play and to reorder). They really are just subsets of the library, specified by some constraints.  But for some reason, when you browse a view, you cannot use the iTunes-like filters anymore; these are only visible when you browse the whole library.  For the sake of ease of use and consistency, it would have been nicer to keep the same interface for both.  Another flaw of the views is that they <em>have</em> to be dynamic, you cannot have collections to which you manually add and remove songs.</p>
<p>There is no concept of smart playlist at all, but if you double-click on a song in a view, it will replace the current playlist by the songs in the view and play the clicked song&#8230; Believe me, it is as awkward to use as it is to describe. In short, they have implemented interesting concepts but their usage and the user-interaction is confusing, at best.</p>
<h4>Conclusion</h4>
<p>A media-library is a must to improve the browse and search experience.  However, it is only a <em>tool</em> that can be used and presented in different ways.  The actual interface used by the user must be carefully thought-out and include powerful features to maximize the possibilities allowed by that tool.</p>
<p>Almost all players based on a media-library provide acceptable to excellent library browsing, an accessible list of saved playlists, as well as more or less powerful smart playlists.  They still differ from each other in many ways, but they all share the same limitation: developers fixed the problems from the previous generation of players without daring to add a whole new concept: collections.  It might not be obvious at first, but they are the missing piece to improve the browsing of the library.</p>
<p>In today&#8217;s players, the only way to group songs is by putting them in a playlist.  But when someone creates a smart playlist, he is interested in its content, in the resulting set of songs; he doesn&#8217;t want to edit it directly to play it linearly.  This is why Apple has included the Party Shuffle feature: because it allows the user to build a playlist from a subset of her library.</p>
<p>A better music player would introduce collections as a new concept, which would allow to browse and maintain dynamic or static subsets of the entire library.  Playlists could then be created from these collections, either as linear lists or &#8220;Party Shuffle&#8221;-like random lists.  Of course, it would still be possible to completely ignore the existence of collections and use playlists directly; but the availability of this new conceptual layer could prove itself a must for advanced users.</p>
<p>In the next section, we will have a look at the existing client/server players and see whether they seem flexible enough to accommodate all the features and interface we can imagine for a better music player.</p>
<h3>Client/Server players</h3>
<p><a title="XMMS2: command-line interface" href="http://inso.cc/wp/wp-content/uploads/2007/04/xmms2-cli-snapshot.png"><img class="illu2" src="http://inso.cc/wp/wp-content/uploads/2007/04/xmms2-cli-snapshot1.png" alt="XMMS2: command-line interface (thumbnail)" /></a>Client/Server players are not really to be considered the &#8220;next generation&#8221; players.  The underlying architecture does not need to appear to the end-user; it is merely a new way to build music players, possibly allowing features otherwise impossible (multiple clients connected to one server, different client softwares, etc).  The main advantage is that the complexity of the audio decoding and the media-library is isolated in the server, which lets developers focus on the usability of the clients.</p>
<p>There are few working client/server player projects and all are primarily developed for GNU/Linux and Unix.  The oldest is <a href="http://www.mserv.org/">mserv</a>, which works perfectly fine although it is not maintained anymore.  It actually boasts the most advanced multi-user architecture of all, but its implementation makes it hard to interface with: telnet protocol, file-based database, few song properties.</p>
<p><a href="http://www.musicpd.org/">Music Player Daemon (mpd)</a> is a popular alternative, with already plenty of clients, command-line or graphical interface.  It is quite stable, but lacks a real media-library database and advanced song properties.  It is therefore functional but too simple and not very extensible. <a href="http://mpd.wikicities.com/wiki/MusicPlayerDaemonVersion2Plans">MPD2</a> will probably be better in every way, but its development doesn&#8217;t even seem to have started yet.</p>
<p><a href="http://wiki.xmms2.xmms.se/">XMMS2</a> is a convenient alternative, implementing many of MPD2&#8217;s goals. It is still under heavy development but can already be used, although it doesn&#8217;t really have a good client yet.  But as it looks like the most appropriate server to develop for, this might soon change!</p>
<h3>A Better Player</h3>
<p>We can now describe what a &#8220;better player&#8221; would need. However, the goal here is not to describe a concrete implementation of the ideas as a usable program; we will instead focus on the <em>features and concepts</em> that would make a better music player.  They should remain abstract and general enough to be used in very various clients, whatever the platform or the interface (command-line based or graphical).</p>
<h4>A powerful media-library</h4>
<p>As the basis for our player, we need a powerful media-library. It must indeed be fast and support powerful queries (DB back-end) so as to allow advanced and responsive browsing in the player.  It should also handle many song properties, such as the number of times the song has been played, when it was added to the library, etc.</p>
<p>In a client/server architecture, the media-library is handled by the server, and the <a href="http://wiki.xmms2.xmms.se/">XMMS2</a> server has all the features requested above.</p>
<h4>Clever browsing</h4>
<p>Now we have a powerful media-library, we need an equally good interface to browse it.  This depends heavily on the type of interface of the client, but there are enough existing players to learn from the best: favour <a href="http://www.apple.com/itunes/">iTunes</a>-like filters over <a href="http://www.microsoft.com/windows/windowsmedia/">Windows Media Player</a>&#8217;s tree-based interface; provide the customizability of <a href="http://www.foobar2000.org/">Foobar2000</a>; or use completion in a command-line interface.  Defining a good interface is too vast a subject to be discussed here, but it should remain a main objective when developing a better music player.</p>
<p>The search feature must also be both user-friendly and powerful, and all the fields (including extra song properties) should be queriable.  <a href="http://madman.sourceforge.net/">Madman</a>&#8217;s query system is a good example of a powerful solution.</p>
<h4>Easy playlist management</h4>
<p>Once the library has been browsed, the user has chosen songs to play and wants to include them in some playlist.  It should be done naturally and allow multiple actions: play now (possibly stopping the current playback), add as the next song, or play eventually at the end of the current list.  A brilliant example of a bad interface in that regard is <a href="http://www.winamp.com/">Winamp 5</a>&#8217;s: no &#8220;play next&#8221; option (you can only play or enqueue the song), and double-clicking a song in the media-library plays it at once, but it also replaces the content of the playlist by the current view of the media-library!</p>
<h4>Collections and playlists: two main orthogonal concepts</h4>
<p>Collections and playlists ought to be clearly separated and receive equal importance, for they represent two main orthogonal concept in music players.  Collections are unordered subsets of the library, meant to facilitate the browsing of a big library and build arbitrary groups of songs; they are not playable.  Playlists are ordered lists of songs, meant to be played linearly; they can be edited and reordered at any time.  Both collections and playlists are always editable (i.e. add/remove songs).  We will see later on that there are several ways to create playlists.</p>
<p>When it comes to viewing, both concepts offer a different interface.  Collections are browsed in the same way as the library, through search and filters.  Actually, even the library is a collection, as it is just an alias for a top collection matching all the songs.  Playlists are browsed as a list, much the same way as you view the playlist in <a href="http://www.xmms.org/">XMMS</a> or Winamp 2.*.</p>
<p>Collections are organized as a tree structure, playlists as a flat list. As an analogy, collections can be seen as directories, thus forming a hierarchy, whereas playlists can be seen as radio stations. There is always one and only one &#8220;playing&#8221; playlist at any given time, and usually only one collection browsed at a time as well.</p>
<p>There is only one type of collection, which resembles Madman&#8217;s playlists: it can be filled by a subset of the library, specified by a set of constraints, and it can also be edited (add/remove songs) by hand.  Both ways are not exclusive: the collection is first filled with the query (if there is one) before songs are added and removed according to the user&#8217;s modifications.  A simple yet powerful interface should be used to specify the query and view the user&#8217;s modifications.</p>
<p>On the other hand, there are several types of playlists, and more could be added later on.  The three main types are: the list, the queue and the shuffle.  The list corresponds to the usual definition of a playlist, i.e. a static list of songs with a pointer moving down to play the songs sequentially.  The queue is quite similar, except that songs which have been played disappear from the list.  It should be possible to view a short history of the <em>n</em> last played songs.  The shuffle is a dynamic version of the queue fed from the content of a collection: the next <em>k</em> songs to play are randomly chosen from a given collection.  This is the equivalent of <a href="http://www.apple.com/itunes/">iTunes</a>&#8216; Party Shuffle.</p>
<h3>Conclusion</h3>
<p>I don&#8217;t pretend that the ideas developed in this manifesto will lead to a perfect player.  However, I am convinced that they can help develop a <em>better</em> player based on what we can learn from the existing ones.  Proposal for more advanced or revolutionary features will be presented in a future article.</p>
<p>Now in order to avoid sounding like one of these lazy wailers who dump ideas without ever developing them, I already started working on two music player projects which implement the ideas developed in the present article.  Both <a href="http://wiki.xmms2.xmms.se/">XMMS2</a> clients, the first will be a command-line client and the second a graphical client.</p>
<p>Stay tuned&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://bytes.inso.cc/wp/2005/07/11/better-music-player-manifesto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
