I’m pleased to see there has remained some residual interest about the music player posts I made last year. Last summer, my friend Evan and I discussed the idea further and wrote some prototype code, but found that certain desirable pieces of the desktop infrastructure (notably xesam, but also improvements to existing components such as gvfs) were not yet mature enough for serious use.

Rest assured that I haven’t forgotten about this project, and more or less still hate iTunes. Progress since the summer on those desktop infrastructure projects gives me hope that it might become possible to begin more serious prototyping work later this year. If that happens, then I will dump my ideas here and hope for some guidance from everybody who reads this. Yes, that’s right – all 4 of you 🙂

Before we left Switzerland, we booked six nights of stay at the Hotel Comfort Davout Nation, Paris.

When we arrived for checkin, the main office had lost our booking and had to give us a room temporarily for the first evening. Our non-smoking double reaked of cigarette smoke. The double bed’s sheets had specks of dirt and a few stray hairs, and the bedspread/comforter had several dubious stains. The room was so “cozy” that one small suitcase occupied about a quarter of the free floor area. The advertised remote control for our ceiling-mounted cable television was nowhere to be found, and the volume controls on the television itself were missing. We never saw the advertised coffee maker, but that was OK since we wouldn’t have wanted to spare even that much valuable space.

The continental breakfast around 9:00 the next morning made me wonder whether the French Revolution had actually brought about as much change as my schooling had led me to expect. There were two baguette heels (and no plates), a basket full packets of jam (and no knives), orange juice (and no glasses), and a coffee machine (and no mugs). When a hotel employee came out to refill one or two of these lacking items, a small stampede of hungry wildebeast-people would clear them out again in seconds.

When we complained at the front desk about the smoke in our room and asked for another, the rabid mongoose of a maid behind the counter responded by sustaining a wounded hyena laugh for about thirty seconds. It was awkward. The other guy at front desk insisted that the hotel was too full to give us a room that fulfilled our non-smoking booking, but we threatened to leave so they moved us to an even smaller not non-smoking room that was inexplicably smoke free.

In summary, I heartily recommend this hotel to persons who wish their own life stories were being written by Franz Kafka.


  • Dirt
  • Tinyness
  • Smoky stench
  • Inadequate breakfast
  • Questionable neighborhood


  • Easy access to metro.

The Plan

On Tuesday morning I left DIA for Perugia. As anyone reading this likely knows, I had a little bit of an ordeal set up for myself:

  1. Denver -> New York (3h 15m)
  2. Layover in New York (4h 45m)
  3. New York -> Shannon, Ireland (6h 15m)
  4. Layover in Shannon (~5h)
  5. Shannon -> London (~1h)
  6. Layover in London (~2h)
  7. London -> Rome (more hours still)

Which, all told, comes to around 27 hours between taking off at DIA to landing at Rome. Doh. That sounds painful. With that itinerary booked and reserved, then, here’s what actually happened.

The Story

Tuesday my flight from Denver to Kennedy airport in New York City took off on time and according to plan. It was a nice flight; they provided free satellite television, and had very nice legroom for coach. I sat next to a nice banjo player coming back from a bluegrass festival in Telluride. Navigating Kennedy airport was kind of a pain, since it is very large and I had to change terminals; it took at least an hour and a half to claim my baggage, check it in again for the flight to Shannon, and find my way to my gate. I still had a couple of hours left to kill, so I figured I’d get some dinner and text M-dawg to say that I’d arrived safely and so forth. When I got to the gate, however, I found that they’d overbooked the flight, and I didn’t have a seat. D’oh. The customer service representative at the desk offered to pay volunteers $400 worth of airline vouchers plus a free night’s stay at a New York hotel in exchange for taking the next night’s flight, but with all the connecting flights needed to make, this looked grim. I half-jokingly suggested that if she’d to put me on a flight directly to, say, Rome instead, I’d be more than happy to make her life easier. To my surprise she took my suggestion very seriously, and while she found no flights directly to Rome, she did manage to switch me to a flight directly to Pisa leaving that very same evening instead. I was kind of surprised. I was more surprised when she switched my return flight from Shannon (which would have also been a bit of a bummer) to a return flight from the more expensive London Gatwick at no extra charge, and also gave me $400 worth of vouchers. If you subtract that from the $500 cost of the original ticket to Shannon and the $200 or so flights from Shannon to Rome, that amounts to a net $300 ticket to Italy and back from London during peak season. I doubt I’ll ever find a deal like that again 🙂

The flight to Pisa went excellently – I managed for sleep for a few hours, saw the Alps blocking the cold and rain from getting down into Italy, and then landed on a gorgeous sunny day. Then, the other shoe dropped. At baggage claim, it became clear that my luggage hadn’t been successfully transferred into the Pisa plane in time for takeoff. It was time to press on, however, and so I reported loss at the baggage tracking station and set off with just my backpack to start catching trains to Perugia so I could meet up with M-dawg. On advice from a localperson I started to walk to the Pisa Centrale station, 2km from the airport. My attempts to get there resulted in probably 5km worth of walking, and included fruitless expeditions down residential roads, small-scale residential highways and eventually a muddy ditch next to a highway. After a lot of this, I began to wonder if — dispite typically male American discomfort with doing this — it was time to ask someone, but right as I was about to do I stumbled (accidentally) into the rear entrance to the train station. Hooray! Victory! Home free!

Except, not really. I hadn’t ridden a train since I was a child, and had no experience navigating Italian rail. The train was departing almost immediately, and so I ran on to it just in time before I had a chance to ask the ticket-selling man where I should actually be getting on and off. The ticket had a bunch of cities written on it, which I initially figured would be transfer points. When I asked a nice Scottish couple for some help, they weren’t sure either, but said out that they were taking this train directly back to their hotel near the Firenze S.M.N. (“Santa Maria Nouvello” (sp?)), the second station listed on my ticket; they knew it would go at least that far. They also warned that I’d get a lecture from train conductors if I didn’t get my ticket stamped. Clearly I wasn’t going to have to stop at the first stop listed on my ticket, so my initial guess was way out in left field. My next guess was the opposite: maybe all these cities were simply landmarks along one line. Perhaps if I stayed on the train, it would take me directly to the final station on the list, Terontolo, which I’d seen on a trenitalia map connecting to Perugia. This seemed like a promising new hypothesis; pleased with myself, I watched the Italian country side fly by. One thing I noticed was the distinctive red logo of a chain of supermarkets called “coop.” There were many different locations along this rail line, in a distinctively diverse set of buildings, some of which had been built in the 19th century, and some in the 21st. When the train arrived at Firenze S.M.N., I bade farewell, and stayed on. The train huffed and puffed and got going very nicely, and everything was going swimmingly.  This was excellent!  “I’ll be there in no time,” I thought.

Right about then, I started noticing that the “coop” buildings looked kind of familiar.  Now, in that part of Italy, pretty much all of the buildings look similar, but these looked familiar in an unnerving sort of exactly-identical sort of way.  Hrm.  After clumsily getting help opening the train door from a stylish young Italian girl about my age who probably thought I was trying to hit on her, I got out, and saw that indeed I’d passed this station before.  D’oh.  It seems that Firenze S.M.N had been the end of that line, and I’d come right back in the opposite direction.  Oh well.  I hadn’t punched any tickets yet, so at least I couldn’t get in trouble for cheating and using the same ticket twice when I hopped on another train going the opposite direction back to good ol’ Firenze S.M.N again.

Now I was right confused, but I knew I needed to get to Terontola, so I got off at Firenze S.M.N. and wandered around for a good while looking for useful information.  The obvious place with the big ol’ “i” in a circle around it had a long line that wasn’t moving at all, so I skipped that; plus, I still don’t like asking questions, and figuring stuff out on my own is more fun.  I searched for probably 10 minutes for a display of a rail map somewhere, but there was nothing.  There were also big printed displays of all the trains scheduled to arrive and depart the station for the whole day, but they also showed just the final destinations for the train with some smaller bits of text underneath them.  The big boards also only said the final destinations of the soonest-to-depart trains.  Unfortunately, the next city on my ticket (Arezzo) was not a final destination, which tended to be larger cities like Rome or Milan.  Grrr.  In desperation, I went back to the printed displays again, but this time I noticed that each final destination had some stations written underneath it.  And times!  Aha!  At this point I finally put 2 and 2 together and realized that these would be the stations that the train would pass on the way to their final destination.  I found one that would pass Arezzo (and only Arezzo) on its way to Rome.  Hooray!  I went to get some pizza across the street from the station, where I learned how to say water (“acqua”) and ask how much something costs (“quanti costo”), and then hopped the train.  After a little more thought, I finally realized that the stations listed on my ticket didn’t actually tell me anything about how to get to Perugia, except that if I use those stations I won’t get charged or ejected by a conductor.  My final strategy of looking for the nearest to the last station listed on my ticket as possible on the departures list at a train station worked well for the last leg of the trip, and I arrived in Perugia yesterday evening at 20:15 local time (12:15 PM mountain time), 29 hours after I left Boulder.

Current status of my baggage: who knows.

Some Haiku

3 April, 2007

An oak stirs
Acorn shells

Tossed to a side:
Compost heap

A car
Finds a pebble

I’ve gotten all sorts of good feedback since my friend ChipX86 was nice enough to add visibility to my post! 🙂 I had intended to avoid talking about any implementation details in that post, but many comments made me realize I had lost sight of that goal, so unfortunately my limited discussion of those details gave a few of you an understandably skewed view of how I’d like to approach this. Still, your comments were a helpful mix of suggestions, constructive criticism, and support. Thanks everyone, I appreciate it! There were enough comments that I’m not going to try answering all of them individually. My next steps will be writing post 2/2 about architecture (as promised) with many of y’all’s ideas in mind, possibly revising post 1/2 (or putting it on a wiki) to reflect my reaction to many of your concerns about my initial ideas, and then finally putting together my SoC application 🙂

As a college student studying engineering and music performance, and as a loonix geek, I’ve spent far too much time thinking about music players. Some of the first hacking projects I worked on in high school were tools to sensibly shuffle and play my music library. Now I’m more interested in the GNOME desktop, user interface design, and integration; I’d like to combine some of these ideas to take music playback on the GNOME desktop beyond iTunes.

In this frighteningly long post/article, I’m going to lay those ideas out in hopes of getting some helpful feedback. 🙂

State of the music playback and management: some context
First generation music players dutifully do their thing when the file manager tells them to. They show you the awesome metadata for each “song”¹. A point arrived a few years ago when people started realizing that a track’s metadata can be more useful than its file name in a single library, because file names are typically an inconsistent jumble that are redundant with tagged metadata anyways. Searching through directories full of this sort of file is a pain unless you’re obsessive enough (like, say, me or David) to go through and sort things using some sort of recursive renaming tool and then tweak by hand.

Apple’s iTunes took a step toward rectifying the situation. It integrated nicely with the iPod and that crazy internet shopping thing, but it also took the metadata feature a step further, and made the jumbled file names invisible to the user. It favored metadata instead. This turned out pretty nicely, and a whole slew of GNOME applications have imitated this idea to varying extents: rhythmbox is the most obvious (since its goal seems to be to replicate iTunes as closely as possible), but banshee, quodlibet, listen, and muine do too, somewhat.

Those projects have done a good job with that, but I think we can do better. Here’s why:

  • Beagle and Tracker already index music metadata. Why index them separately? Let’s not.
  • None of the existing GNOME music players integrates all that well into the desktop infrastructure (nautilus, menus, the panel..) yet. Let’s make this better.
  • Shuffling has always been horribly sloppy in every music player I’ve ever seen. This is not an exaggeration. We can make track selection more intelligent, and improve transitions.

¹ Pet peeve: this term is perpetually inaccurate in music-playing software. I don’t care how hip you’re trying to be, or what your target denominator is. A much less annoying word choice is “track.” A “song” is a specific term with a specific meaning. That meaning is not “the stuff in this sound file” any more than it is a measure of disk space. A symphony is not a “song,” a jazz tune is not necessarily a “song,” and anything that’s a dance is not a “song,” so please don’t write software that assumes every track in my library is a song. Thank you.

Bone to Pick #1: Metadata indexing
The second generation of music players was ahead of the desktop curve in terms of the metadata/tagging craze. Desktops are slowly evolving in that direction; in GNOME this is driven by the beagle and tracker indexing tools. If this trend continues, file names may no longer be relevant on desktops within a few years. Awesomely, these services also index music. Yay! This means we shouldn’t need to do that separately in music players any more, right? Jamie McCracken has stated plans to start implementing this via a tracker backend into rhythmbox soon, but in the meantime consider this (very nonscientific) survey of system resources consumed by some GNOME music players for my ~5000 track library:

  • Memory consumption on startup:
    • banshee: 62M
    • listen: 78M (!more than firefox with 4 tabs open to fancy JS pages)
    • quodlibet: 46M
    • rhythmbox: 32M
  • Disk space consumption of library index:
    • banshee: 7M
    • rhythmbox: 3M
    • quodlibet: 2M
    • listen: 7M

Bone to Pick #2: Shuffling
As I said above, this is horribly sloppy in every single player I have ever seen or used. Music players have supported this feature since they first appeared, so it’s kind of impressive to me that nobody does it right. A proper shuffler should be able to semi-intelligently group tracks together, and insert an appropriate brief delay between tracks and groups, pretty much like a DJ on the radio who might play more than one genre. Yet I’ve still only ever observed exactly two different approaches of grouping files for shuffling, and they are both rigid and simplistic, and I haven’t seen audio transition options in any of the GNOME players.

The most common approach (a la iTunes, rhythmbox, banshee, listen, and quodlibet) is to select a random track out of the library’s lnog list of tracks. With this scheme, it is inevitable (in my library certainly) that tracks are chosen from somewhere in the middle of a symphony, or that 30-second “Stop” track from The Wall, or a spoken-word segue in a Kanye West album, or another track that generally don’t make sense out of context. This drives me crazy. Unless your music library is made up of Brittney Spears-alikes and random singles (which is admittedly actually kind of common), this approach to shuffling will not be very satisfying, and will demand frequent intervention by the user.

The second common approach has been to select and play a random album (as in muine and quodlibet). This approach has drawbacks too: any tracks I have that are missing an album tag tend to get ignored. Further, if I start listening to certain sets end-to-end (e.g., any Beck albums, or Bach or Shostakovich Preludes and Fugues) I’m likely to go slightly crazy and move on.

It seems clear to me that rigidly enforcing either of these shuffling schemes doesn’t work well. I want to be able to group some albums (like The Wall) entirely together, split some into smaller groups (i.e., each prelude paired with its fugue), or even play every track separately (such as Beck albums). How to go about doing this? Most generally, different genres ought to grouped and treated differently by default, according to the traditions of that genre. Multi-movement classical pieces, modal jazz albums (hoo-ray Miles Davis!), and progrock typically require the context of the rest of the group in order to make sense. Folk music, most rock, big band jazz, and many ethnic musics are sometimes placed on an album for convenience rather than artistic cohesion, and users may be used to hearing them as singles on the radio, so there is often little reason for them to be grouped together. Clearly these defaults are rough stereotypes; it would still be necessary to provide a mechanism to tweak grouping individually, but it would be a start.

The last shuffling issue I’d like to address is that of song transitions. This is another situation where traditions vary by musical genre and artist. Typically in classical music, for example, you don’t want to add any extra delay in between movements, because it will fubar the flow, but every player I’ve used adds a delay while it loads the next file. On the other hand, it’s traditional in many popular idioms (and can sound rather nice) to let a finished song hang in the air for a second or two between tracks, or to crossfade (I understand this is possible in Amarok.. why shouldn’t GNOME players be able to do this?).

Bone to Pick #3: Desktop Integration
And now the fun part. Music playback has become a staple task for desktop computers. Desktop instant messaging developers recognized the same fact about their arena, and started the telepathy project, yet I haven’t seen anything like this for music playback.

I think we can avoid the monolithic (and frankly often sluggish) iTunes-alike music playback approach by adopting a decentralized dbus-based music infrastructure remeniscent of the telepathy design:

  • A playback application with a minimal interface. Its jobs could be to
    • Prioritize playback requests from other components (or let PulseAudio do this?)
    • Handle *all* aspects of playback using gstreamer
    • Higher-priority playback requests preempt lower-priority playback requests by pausing, fading or muting to background
    • Lower-priority playback requests queued for playback after higher-priority requests
    • Not need to know anything about music libraries
    • React intelligently to preemption requests (for new files or from PulseAudio)
    • Sit (in the panel?) and respond to control and information requests over dbus.
  • A shuffling app in to configure and generate pseudorandom/ambient playback (like a radio DJ) appropriately for the relevant style of music
    • Play at lowest priority; requests probably preempted in the player when specific files are requested by other components
  • A metadata search app to find and play specific sets/tracks – why not do this in nautilus using beagle or tracker?
    • Send requests to player when user opens a set or track
    • Inside music:/// URI in nautilus?
  • A podcast/internet radio browsing app – could even be firefox+google reader..
  • A tagging/metadata management app?
  • An iTunes store app?
  • A portable music player handling app?

Mostly in this post I’ve focused on what I’d like to do. In Part 2, I’ll discuss more about how I plan to do it. I’d love feedback from anyone who happens to read this. My secret plan is to apply to GNOME to start part of this as a Google SoC project!

“Hello world”

18 February, 2007

Here in full technicolor is the fruit of the prevailing, passive social pressures that my friends and p.g.o have unknowingly brought to bear.