Open Source and Music Playback


For me at least, music is an indispensable part of my day; much more so than streaming video or television. I tend to be an active listener; in other words, I’d rather have silence while I’m working and not background music. I don’t want to say that music distracts me; rather music demands my attention.

And, as much as music is an indispensable part of my day, open source is an indispensable part of my life. So it’s natural that the two should come together, in some obvious and even some surprising ways.

A lot of music is not itself open source

Many, or perhaps most, composers and musicians copyright their works and require a royalty of some sort to be paid by those who want to enjoy that music. However, there is music, and sometimes performances of that music, that are either provided under some open license or whose copyright has lapsed over time. If this concept intrigues you, the Free Music Archive is a worthwhile starting point for exploration, and there are many other sources. Fans of historical performances might be interested in the Internet Archive’s 78 RPMs and Cylinder Recordings project.

Open source digital music packaging

In order to have a digital representation of music, we must have a format (for preserving the digital representation), codecs (converters from the analog signal to digital and from digital to analog), metadata (information about the music such as title and artist), and players (applications that know how to navigate a collection of music files and play them back).

The two main open source music formats / codecs / standards are FLAC (Free Lossless Audio Codec) and Ogg Vorbis. Both of these are open, non-proprietary and free of patents and royalties. Both of them deal with a particular means of representing music signals digitally called pulse-code modulation.

PCM is probably the most common such representation and also the basis for various not-so-open standards such as WAV (a proprietary format developed by Microsoft and IBM with no licensing required), MP3 (a proprietary format developed mainly by Fraunhofer Society encumbered by patents, all of which seem to have expired in the EU and the USA at least), WMA (a proprietary format developed by Microsoft), AAC (a proprietary format developed by an industry consortium and used by Apple products), and many more. DSD (a proprietary format developed by Sony and Philips) uses pulse-density modulation rather than PCM.

Lossless formats can be compressed or not, and encoding to that format does not “lose” any information. So compressed or not, lossless music format files can be fairly large. Lossy formats, like Ogg Vorbis and MP3, throw away some of the music (considered to be less important from a psychoacoustic perspective) in order to achieve higher compression rates and create smaller files.

When buying or streaming digital music, it is in one or the other of these various formats. For example, Spotify streams music in Ogg/Vorbis, AAC or HE-AACv2. Music purchased on Bandcamp can be downloaded in MP3, FLACC, AAC, Ogg Vorbis, ALAC, WAV or AIFF.

I don’t stream much, though I have considered using some of the high-quality streaming services out there, such as Qobuz or Tidal. I do buy a fair bit of digital music, often from Bandcamp, but also from HDTracks, ProStudioMasters, 7digital, Linn Records and others. Evidently, selection is an important factor in choosing a music provider, but for me as well is the ability to purchase my music in FLAC format and to be able to carry out the purchase and download without needing to install some kind of proprietary download manager (which is becoming less common these days, but still an annoying mis-feature when the vendor does not support your operating system).

Open source music players

Over the 20 years that I have been using Linux, I have tried out quite a few different open source music players, but the configuration that has stuck for me is:

In no particular order, here are my reasons for choosing this configuration:

  • MPD can be configured to output directly to ALSA hardware devices with no mixing, upsampling, downsampling or other shenanigans going on along the way
    • this is important to me as I often go out of my way to acquire a high resolution version of an album, which in my experience can suffer less from excessive compression and other engineering decisions
    • other parts of the Linux audio chain have been known to apply various transformations along the way that introduce mixing, upsampling, downsampling, gain adjustment and what-have-you that are specially impactful on high-resolution streams
  • Cantata is one of those “wow” pieces of software, built with huge attention to detail and a very high quality product… regrettably no longer in development as of 2022-03-03. Even so, I think I will continue to use it as long as I can.
  • I have two dedicated music servers in my household; one in my upstairs office and one connected to the home stereo; both run MPD and using Cantata running on any of our computers, I can control the playback on either system
  • I have spent a fair bit of time – some would say “obsessively” curating the metadata in my music collection, and the curated profile I have developed for my own use works very well on the MPD – Cantata framework; for example, with albums sorted by the FLAC ALBUMARTISTSORT tag, as well as with the player I use on my Android phone and the small portable standalone player I travel with.

I have used other music players that allow direct connections to ALSA hardware devices but have stayed away from the ones that don’t permit this level of output control.

On both my laptop and home computers, I use a dedicated digital-analog converter (DAC) for music playback. There are plenty of good ones out there, including quite a few around the US$100 price point that is probably comfortable for most people who would invest a fair bit in buying music.

I notice that MPD can also be configured to work with music streaming services, but I haven’t tried that.

Analog open source music packaging

I still have a sizable collection of vinyl records, and I regularly enjoy putting one on the record player. Nice, license-free technology!

I also listen to the Canadian Broadcasting Corporation’s English and French music broadcasts on FM radio, using an analog FM tuner. Also license-free technology.

Why open source?

The Xiph.Org Foundation has a good, though somewhat dated, explanation of why open source music formats, codecs and what-not makes sense.

One of the more recent proprietary music formats is MQA. Here’s what a manufacturer of music playback equipment had to say about the whole idea.

And the reality is that the music industry did not collapse in flaming rubble when music vendors began selling music in open source packaging. Popular music by artists such as Pink Floyd or the Doors or Miles Davis is re-issued time and again in “newly remastered” form and continues to sell. Streaming has definitely changed the way the business works; as did downloads before that; and CDs before that…

So, yeah. Open source music formats and music players for the win!