Playing with high-resolution audio

Some time ago, I’ve found out that under special circumstances I can hear differences between 320 kbps mp3 and CD audio. Now, I’m curious whether I can hear any difference between CD and high-resolution audio.

There is a lot of discussions whether high-resolution audio is a gimmick or a useful thing. Maybe the answer is simple: some people can hear the difference against CD audio, some can’t and some think they can while they can’t. Either of that is fine, one enjoys the music the way he likes it.

However it’s not that easy to find relevant arguments about high-resolution audio. One of the most pro-arguments is that it’s better because it has a higher sampling frequency and a higher bit depth. Yes, it has both, but an explanation whether it actually matters and why is usually missing. On the other hand, there are cons-arguments about „Nyquist theorem“ and „dynamic range“. But they also usually miss meaningful explanations. Yes, according to the Nyquist theorem, CD audio is good enough to capture frequencies up to 22 kHz, i.e. covering the frequency limits of human hearing. But music is not only about frequency but also about volume and tone curve shapes. Imagine what happens e.g. to a sine or another 10 kHz or 11.025 kHz sound curve when it’s sampled on 44.1 kHz. Yes, you get exactly the same tone frequency, but possibly with a lower volume and sounding like a different instrument. And regarding dynamic range, it’s about resolution in the quiet parts. While 16-bit whole-range resolution covers the whole audible specter, less than 10-value range remains to represent quiet but still audible sounds, which looks a bit coarse.

So purely numerically, high resolution audio adds information within nominal human listening range. Whether we can recognize the added information is a different question as well as whether we can percieve inaudible frequencies some way. I guess my tentative answer above holds, but let’s return to the original problem, whether I can hear the difference. The best way to find out is to try it, which is not completely trivial.

The first step is finding true high-resolution audio. Some popular hi-res sites sell overpriced recordings, which I’m not going to buy. Another option is utilizing streaming services offering hi-res audio but I’m not their subscriber. Fortunately, there is a selection of Czech music of various genres in hi-res, not much more expensive than their CD quality versions. I bought five albums of different kinds there that I’d probably buy anyway sooner or later (three contemporary recordings, two older recordings from analog tapes; one classical orchestral work, two single-instrument classical works and two popular music albums with a lot of vocals; one 192 kHz, two 96 kHz, one 88.2 kHz, one 48 kHz and all 24-bit). For a total additional price of about one pizza I could obtain their hi-res versions. This is worth the fun, isn’t it?

The second step is how to play hi-res audio. Besides the obvious need of having an audio system capable of playing hi-res audio, there are also software issues. The PulseAudio thing clearly tries to solve different problems than playing hi-res audio (well, I wonder again which ones — my recent experiences include heavily distorted sound on normal play and inability to switch to a different sound input for a running application) and it’s best to avoid it. Fortunately, there is a way to prevent PulseAudio from touching a USB DAC. Then it’s possible to use the DAC safely with a player that can send sound data to the DAC directly, without any sound processing and conversions. I used VLC with ALSA output. Another option is to use Volumio on a dedicated device (such as Raspberry Pi), which does the right thing out of the box.

The third step is to get something to compare the hi-res version to. The mp3’s bundled with the hi-res recordings are lossy and I can’t be sure they weren’t processed differently. I used sox utility to convert the audio to a CD like quality, i.e. 16 bit depth and 48 or 44.1 kHz frequency (depending on the original hi-res frequency):

sox FILE.flac -r 48000 -b 16 FILE-cd.flac

The fourth step is finding a calm moment when it’s possible to listen to the music carefully, without disruptions and background noise. This is the most tricky thing!

Finally, the fifth step is actually listening to the music.

And the result? I couldn’t hear any difference.

Back to Vanilla Music

I have found out that I was mistaken, Odyssey Android music player cannot always play the tracks in the right order. Additionally, it has sometimes problems (as many Android music players have) with non-ASCII characters in file tags. So I’m returning back to using Vanilla Music. I abandoned it when it was incapable to play newly added albums whatever I tried to do. This seems to be fixed now. And there are also no problems with non-ASCII characters so far.

Another good news about my phone is that the occasional very short (and very annoying) interruptions of music play (regardless of the music player used) are, hopefully, also no longer present.

It’s sooo nice when one can play music on a mobile phone.

Switching from Firefox to Brave

The new Firefox ESR release has hit my desktop this week. Debian stable is stable; except for Firefox. Firefox ESR releases last only for about one year. Debian release cycle is typically about two years so in order to keep up with security fixes, Debian stable has to switch to a new major Firefox version once a year. That means replacing old bugs with new ones in Firefox more often than in the rest of the system.

This time, color management has stopped working for me after the update. The only way I’ve found to avoid green faces and/or completely false colors at some places was to disable color management completely. (Yes, using those cryptic undocumented numeric values in about:config.) I don’t know what’s wrong, the rest of my system hasn’t changed and all the other color management capable applications work normally. There are reports about color management bugs in Firefox 77 and later (the ESR version is 78). It’s not a critical problem, I can use a different browser when I need to see accurate colors, but it’s still annoying. But what is worse, such a kind of regression indicates that there is something wrong with Firefox development.

Firefox is dying and IMHO one of the reasons is that it stops offering attractive features to its users. Which of the new Firefox features introduced in the last years do you use? I can’t recall any. Which of the old Firefox features removed in the last years do you miss? I can recall several.

Firefox has still some significant advantages over most other web browsers: It can still browse the web, it’s free software and it doesn’t track its users (this may be a bit arguable but there is a clear difference against the most popular web browser). But I’m afraid Firefox won’t survive and we will be able to use only proprietary web browsers in the future, returning to what we had a quarter century ago. There is at least hope we won’t remain just with The Only Mighty Web Browser on GNU/Linux.

Enough is enough and I think it’s time to start looking around. Firefox has already set my web browser UI expectations so low during the time that there is little barrier to start preparing for the future by switching to a different browser. So I’m switching to Brave. Well, who knows how long that web browser survives. But it’s free software, based on a popular code base, led by Brendan Eich, and with an interesting approach to privacy, advertisements and content creators. And yes, color management works in Brave.

The Brave concept is definitely worth to try. Replacing spying advertisements with micropayments should have already been here long time ago and I’m happy we have finally something that starts pushing the very needed change seriously. It’s currently only a half-step IMO because of the use of cryptocurrencies (the concept of money based on wasting electricity is flawed) and requiring me either to accept privacy-respecting advertisements (no, thank you, I’m not interested in advertisements) or to upload my identity card to an internet service (I don’t know why Binance needs it for small exchanges; there is no such need when using real money). So I’m taking also only a half-step now and just switching to Brave and not joining its Rewards program. Hopefully the service will evolve and will allow me to use real money sooner or later to reward content creators.

Natalika

Who remembers the old times when most music albums were not available on streaming services and couldn’t be bought online as downloadable archives? In the pre-online music era, there was a lot of amazing recordings by non-mainstream artists that are no longer available nowadays.

I was lucky a couple of times and discovered great old CDs in some “forgotten” e-shops or in second-hand stores. A few of those old recordings were released again. But most of them are unfortunately inaccessible, maybe forever.

One of the recordings that I’ve missed were albums by Natalika. That amazing world music band was quite popular for a few years around 2000 (in the sense that it even appeared on TV several times). And then the band disappeared for long time. IIRC their CDs were never available in normal distribution so I’ve never seen them in CD shops. And I think their online presence was irregular during the time. From time to time, I recalled the band but couldn’t find their CDs anywhere at the moment.

I’ve recently recalled the band again and found out that they have a working web site and their 20 years old CDs are still available. What a discovery! I ordered the CDs and now I can enjoy listening to those great pieces of music, which were previously missing in my music archive. AFAIK those CDs are the last unsold pieces, which won’t be available anymore in any form once they are sold out. If you like that kind of music, grab them while you can, they are worth it.

User-Centric Payment System for streaming

Deezer’s push for User-Centric Payment System (UCPS) looks like the right step. It has always annoyed me that, because I don’t stream much, my money spent on streaming goes mostly to the popular music that I don’t listen to. I wonder whether the planned Deezer move to UCPS will really happen.

In any case, one of good ways to support the artists one listens to is buying their albums. If I really like some album, I buy it.

A usable music player for Android

It’s surprisingly difficult to find a music player that works. I have the following minimum requirements on a usable music player for Android:

  • It is free software.
  • It can play music.
  • It can play album tracks in the correct order.
  • It can search by artist and by album.
  • It can recognize music library updates.

There are many free music players for Android. But finding the album I want to play and to play it in the correct order is a problem for most of them.

I could find (exactly) one music player on F-Droid that works: Odyssey. So far it looks flawless, it’s well usable and can play music well. And it’s licensed under GPLv3, which is another plus.

Free navigation software

There is quite a lot of free navigation software based on OpenStreetMap, but it’s somewhat difficult to find something that actually works for the given purpose. I feel like I need to document for myself what to use. And why not share the documentation? Hence this blog post.

It’s easy on Android – there’s OsmAnd there. OsmAnd is somewhat difficult to use but otherwise it’s nice, working well and providing a lot of useful features.

It’s less easy on desktop. After some searching I got amazed by BRouter, which is a navigation backend capable of offline OpenStreetMap based navigation. That’s a killer feature itself, but BRouter also provides another outstanding feature. You can create complex BRouter profiles describing your navigational preferences, which is especially useful for bike navigation. BRouter can’t be used without reading its documentation first and it takes some effort to make it running. But it’s not too difficult and once BRouter is up, it’s amazing.

BRouter can be used on both desktop and Android, but it’s just a backend server. You need some frontend to actually use it. You can use OsmAnd on Android. There is a very plain BRouter application to set up the server and then BRouter can be chosen as the navigation backend in OsmAnd preferences. As for desktop, you can use Web client for BRouter. It can be used locally or as an online Web application, with your selected set of profiles. There is also an online demo for testing BRouter with its included profiles (there are more profiles available from third parties, see documentation).

For simpler planning, especially for making simple sequences of track points used e.g. by some Garmin devices, FoxtrotGPS is well usable. Unfortunately FoxtrotGPS seems incapable of displaying complex GPX tracks. But then there is GPX Viewer, which is nice for viewing GPX tracks.

Using Polar M460 on GNU/Linux

In short: Use Garmin if you can afford it.

The problem with Polar devices is that they are not only proprietary themselves but you can’t operate them without using additional proprietary software. If you don’t like the default Polar M460 sport profiles and screens (and no, you won’t like them), you must find someone with Windows (or Apple) computer. You must install Polar software on the computer and use it twice: First to register the device at Polar and upgrade its firmware and then, after you prepare your setup in the Polar Web application, to change the device settings.

Good news is that then you won’t need Windows anymore, unless you want to change device profiles and screens or to upgrade firmware again. But you’ll still want to retrieve data from your device regularly. You can do that using the Windows application, using a proprietary Polar Android application or (fortunately!) you can do that even on GNU/Linux.

Thanks to the authors of bipolar and v800_downloader it’s possible to download and convert data from some Polar devices. It’s also the only way to get the data without sharing it with Polar. To download and convert data from Polar M460 you need a slightly modified version of v800_downloader (v800_downloader is unfortunately abandoned, so the changes can’t be integrated into the original version). It works for me and I can get complete recorded data: time, GPS position, GPS altitude, barometric altitude, temperature, distance, speed, cadence, heart rate, heart rate variability, and some summary data. There are sometimes problems such as that stored sessions can’t be listed or the downloaded data is incomplete. Reconnecting and/or restarting v800_downloader helps in such cases.

To use online and other features such as syncing data to Polar Web, mobile notifications, Strava segments, or route upload, you still need Polar Android or Windows proprietary applications (so no luck if you have a free software OS without Google Play on your mobile phone). All you can do with Polar M460 without using additional proprietary software is to use its built-in display functions and to download logged data. But that’s already quite a lot, especially for those who don’t race, don’t want to upload their private data anywhere and don’t need proprietary fitness analysis functions.

Why do I think that using Garmin devices instead of Polar or other vendors’ devices might be a better idea? As far as I know Garmin devices still expose logged data via USB mass storage protocol and it’s possible to set up most of their functionality without using external software. So there is no trouble with their basic usage, Garmin allows at least using the basic device functions. You also get navigation functions and ANT+ support with most devices.

Is there still any reason to use Polar M460 then? Well, Polar M460 is a nice device equipped with all the common sensors, either internal or external. Up until recently, only very expensive Garmin devices supported Bluetooth (which matters if you want to use devices such as Polar OH1). You can buy Polar M460 for a good price today, Garmin is much more expensive and since Garmin devices are still proprietary (although with less need to use additional proprietary software) you waste your money on a proprietary device. But the price difference may be erased with the new Garmin Edge 130, which looks interesting (I don’t know whether it works with GNU/Linux though).

BTW, very similar problems are with Polar OH1. You need a Windows computer to initialize the device and to upgrade its firmware. If you are interested in using it as an independent device, there is still some chance to download logged heart rate from it.

25 years of Linux

The 25th anniversary of Linux has been celebrated recently. I can’t remain silent about it because Linux has been playing an important role in my life.

In 1980’s, Richard Stallman started a heroic and successful effort to create a free operating system in response to the unfortunate dominance of proprietary operating systems. But in 1990’s, his GNU project was still missing a very important part – the operating system kernel. This gap was filled in by Linus Torvalds when he started working on a new operating system kernel called Linux and decided to publish it under the GNU General Public License.

I’m not sure why exactly Linux took the place and became so popular. Perhaps it was the right thing coming at the right moment. When I first heard about Linux, it was IIRC around 1993, it looked like an amazing alternative to the world dominated by the unbelievably inferior Microsoft systems, complemented by proprietary Unix systems that were anything but a suitable operating systems for a student’s PC. The only real alternative to DOS and its graphical add-on called Windows was the BSD family of systems. But Linux, perhaps due to being a young system, was less hardware demanding and I could run it, including the X Window System, on my PC equipped with 4 MB RAM. I abandoned DOS/Windows and soon switched to using GNU/Linux exclusively.

It was a lucky choice and it founded the direction of my professional carrier. I didn’t bother to pick the best things from different worlds and to use different operating systems for different purposes. I instead focused on the right thing and solving the numerous problems I faced when I started using GNU/Linux. I learned that freedom has its price but when one is ready to pay it without looking aside, it brings a great revenue.

I’ve been a GNU/Linux user for more than half of my life. The proprietary vendors who tried to lock users inside their proprietary systems, similarly as they try to do today with e.g. smartphones and IoT devices (despite they often run on top of the Linux kernel!), have failed to put the advancing free operating system to irrelevance. I can still use GNU/Linux and I can make my living by developing free software on Linux.