Armed with a text editor

mu's views on program and recipe! design

April 2007

ReReplayGain Posted 2007.04.07 20:16 PDT

After ending up with too many MP3 files without proper ReplayGain information, and knowing that mp3gain doesn't suit my needs quite right, I went jonesing around in GStreamer once again. Today was my lucky day, though; René Stadler had created a GStreamer element which calculates ReplayGain.

In what's starting to feel usual, Debian doesn't have up to date versions of the software I want to use in either testing or unstable, but this hasn't prevented the maintainer from packaging what I want to use and mirroring it in experimental. After downloading and installing it, I was good to go. First I put together a command-line example of the process, to make sure I knew what was required. Then I munged it into a plugin for Quod Libet.

There's still something fishy about it, as MP3s which I have previously found peak values for above 1.0 are now being reported capped to 1.0; Ogg Vorbis files, on the other hand, correctly exceed this cap and run presumably all the way to 2.0. I hope to clarify my understanding of this probable GStreamer bug shortly, as other than that all values match what I've seen before. I'm quite pleased the results of tonight's work.

(4 Comments ) (0 Trackbacks) gstreamer python quodlibet

February 2006

Quod Libet Copyright Infringement Posted 2006.02.08 20:39 PST

I came home from work today to find I'd missed quite an afternoon. The summary is best shown as a single message from Joe with whom I develop Quod Libet: We got ripped off.

He was tipped off early this afternoon after reading Ross's post about Listen, looking at the screenshot and recognizing the appearance of the OSD. When he looked, he found in some places our copyright was still in place, untouched; in others cut and paste jobs had completely obliterated it. Apparently it's an established project that uses our code, but one without any public links or references to Quod Libet. I got back too late to see the code or the website in question, so I'm not sure what I think of this mess. Hence I'll talk about this in a general fashion, considering this case only as an example.

A lot of people are calling Joe the bad guy for cutting this off with his brusque open letter. There seems to be a belief shared by several anonymous commenters that pointing out in public that someone else did something wrong is a bad thing. I disagree: how else will anyone outside the infringer learn? Especially with a mistake as core to the Free Software community as copyright infringement, everyone needs to be aware of mistakes. More importantly they need to know how to avoid missteps and follow licensing terms correctly. I do find Joe's choice of language regrettable, but his core message is spot on.

We need to take more care of observing copyright and licensing requirements in the community. Anyone writing software and licensing it under any version of the GNU General Public License (GPL) is likely to be trying to contribute to the community so the damage from this scenario (stripping copyrights off GPLv2 and representing them as GPLv2 or later, and as your own work) is small. Assuming the infringer cleans up his mistakes, we will allow him to partake of the code as we would any new licensee.

What if this was darker? What if amongst the code being put into a GPL project there was code that didn't offer open terms at all, much less Free terms like the GPL? What if the aggregated work was being offered as closed source pay-only? Either scenario is anathema to the Free Software community: the first because it weakens us; the second because it takes advantage of us. Should our reactions to these scenarios be so different from the reactions to Joe's letter? I say they shouldn't, but you know everyone would be rooting for the little guy for sticking it to the evil empire.

License intentions are important—it's what ties us together as a community—but carrying through and actually following the licenses is crucial for the survival of our community. I look forward to a validly attributed and licensed Listen appearing soon; let's keep that sharing part of this community working!

(1 Comments ) (0 Trackbacks) copyright quodlibet

December 2005

Where do tags come from? Posted 2005.12.29 11:56 PST

Library-based music players are great. They let you use all sorts of data to tweak your listening habits, or to find the song you want, or to help make sure you don't downloadbuy a song twice by accident. But aside from the data that can be automatically generated like how many times it's played a track, or when the last time was, metadata has to come from somewhere. I don't know of any online sources that provide the richness of data that I want, whether I purchase the track on disc or online. Most of the time I have to tag tracks myself. Here's a quick history of the ways I've done it before Quod Libet.

Early offerings

When I first started ripping my collection in the late 1990s, WinAmp was the pinacle program; MusicMatch Jukebox was a helpful ripper with its own ambitions. I would rip a CD with the latter, and then fix up its tags with the former. Tag editing was limited to ID3v1 and the state of the art tag editor was a simple form allowing me to specify a Title, an Artist, an Album, a Comment, a Genre, a Year and a Track number. If I wanted to edit all the tracks of an album, I had to duplicate the information across the tracks manually.

I believe MusicMatch worked differently and would actually allow me to specify some of these items in bulk. However it would append its own frame to the end of a song, effectively overwriting the real ID3 tag, and when an ID3 tag was appended, it couldn't find its frame. Yes, ID3 tags are a hack. At this stage they weren't even an elegant hack, and intercompatibility wasn't ready.

Free alternatives

Some years later I used the free software equivalents: XMMS and grip. Grip would query CDDB or FreeDB for track information, and automatically add it to an encoded MP3 or Ogg Vorbis track. Thankfully there was no extra frame conflict; ID3v1/ID3v2 had become standard for MP3s by this time, and Ogg Vorbis had its own comment standards. Now that the tools agreed, they worked together well. When CDDB had all the information correct there was no editing work to do; when it did not, grip allowed me to edit it before ripping. The interface was similar to WinAmp's in that there was a form with several entries, but since grip shared items such as Artist and Album, it saved a lot of copy and paste.

Migrations

Not all my albums had good coverage on CDDB. One frequent problem would be spelling and accents for unusual names. After one session, half of my discs had been ripped under artist Moxy Fruvous and half under Moxy Früvous. Other times I would want to change storage conventions, or learn new information that meant my previous tags were wrong. Or I started using Rhythmbox and wanted more informative tags—it's too bad that Rhythmbox is only now starting to get editing capabilities.

At this point grip would be no help unless I were to re-rip and re-encode the tracks, so I turned to cantus. Cantus was the first program I used to rename files based on their tags, or retag files based on their names. Unfortunately cantus was tuned for MP3 with ID3v1 style ID3v2 tags, and was extremely buggy in the version that added support for Ogg Vorbis. I'm sure it's fixed by now, but I've never looked back. Cantus among others never really handled arbitrary tags very well, instead they handled only the ID3v1-esque predefined set.

All together now

When Joe started writing Quod Libet, I knew it was time to bring all the pieces together. I needed good support for converting between filenames and tags, and i needed great ways to apply the same changes to several songs at once. Many programs (the command-line id3v2 tool) would allow you to apply certain changes (setting the artist) to several tracks, but would not support symmetric operations (removing a comment). I would make Quod Libet support doing both at once. As other time-savers became obvious Joe would add them. At this point I'm comfortable saying that Quod Libet's tag editing is top notch. I hear EasyTag is good, but I can't imagine anything actually being better than Quod Libet for how I use it.

(1 Comments ) (0 Trackbacks) metadata quodlibet