3 Things to Think About Before Building Your Lossless Music Collection
When building a lossless music collection, some issues may be late but always present. Make preemptive moves before they undermine the quality of your music collection. This article shares my thoughts and practice.
Folder & File Naming
There are only two hard things in Computer Science: cache invalidation and naming things.
—— Philip Lewis Karlton (1947–1997)
Some people read this as a joke, and some people do not. The more critical the reader is, the higher the demand for good nomenclature.
Downloaded albums will likely keep the filenames and folder names specified by distributors for a long time. From a distributor’s perspective, the supplier (record label) is the first-level directory, while the supplier’s internal SKU (catalog number) is the second-level directory. It is easy to understand why this single downloaded from NativeDSD has a file name starting with PTC5186924:
Things may be different for other folders:
Crazy filename such as 04. Suis-je gentille ainsi? … Obéissons quand leur voix appelle.flac are common for classical albums.
When “consistency is more important than perfection” is well recognized, it is hard to believe these wild filenames and folder names belong to a high-quality music collection. You, on the other side of the screen, may already have ideas for improvement! Before we start, let’s see if your best naming scheme still suffers from these issues:
- You have entered dozens to hundreds of characters for each album (in the filenames and folder names), but the player usually ignores such information. Players prefer the tags embedded in audio files or the music metadata obtained via scraping. Browsing, searching, and other features are based on such music metadata. The smarter the player, the less helpful filenames and folder names are.
- Complex naming conventions lose their versatility and beauty. Even if you conceived a well-thought-out naming scheme, you wouldn’t recommend it to a friend —— she’d think you were obsessive-compulsive.
- When you have a collection of nearly a hundred albums, you suspect you have violated your convention. You search for tools that can perform automated checks or rely on scripts to keep them in sync.
- If you use a tag editor to modify the tags of audio files, you may need to redo that for the filenames and folder names or accept that they are drifting away.
- Sometimes you feel that the flattened structure (all albums placed directly under ~/music/) lacks refinement; sometimes you think that the hierarchical structure (such as ~/music/beethoven/symphonies) is less practical —— should the first level be composer or artist? What about albums with multiple composers?
- For classical music lovers, should the key (e.g., C minor), common title (e.g., Pathétique), and opus number (e.g., Op. 13) of the work be included? If the record label gave the album a standalone title (e.g., A Window in Time), you might not be able to get any helpful information about the work from the folder and file names.
Think about it slowly. The core conflict is:
- Music metadata is multi-dimensional, mutable, and adaptable to different scenarios.
- The filesystem uses a fixed and persisted topology and has to be planned in advance.
CD Rips with Pops or Clicks
Lossless audio can be extracted from audio CDs. Local music collection, therefore, has a higher degree of freedom than streaming services. But even if you use dedicated digital audio extraction apps (such as XLD, EAC, etc.) with built-in cache busting (Karlton was not joking) and multi-pass technologies, it is still impossible to completely avoid pops, clicks, or digital silence, which occurs more often when the audio CD is physically damaged.
AccurateRip technology, developed by dBpoweramp, was born in 2003. The AccurateRip database contains the checksums of almost 5 million audio CDs (as of 2023). Compare your rip to the AccurateRip database to see which track(s) are broken.
Here comes another issue: what if you know a rip is broken? You still can’t fix it (exceptions exist). CUETools technology, developed by Grigory Chudov, came into being in 2008. Reed-Solomon (RS) error correction codes of almost 7 million audio CDs are stored in the CUETools database (as of 2023), which can correct error patterns commonly seen in broken rips.
You can use AccurateRip to identify ripping errors and fix them with CUETools (XLD can perform AccurateRip verification, CUETools doesn’t have a macOS release currently). Remember: this should be done before playback. At the end of the day, we only have one need —— no pops or clicks.
Inconsistent File Formats
When a $50 SSD can hold 4,000 CD-quality lossless albums, I no longer worry about the storage cost of local lossless music collections. But I always pay attention to the file formats.
Encoding and decoding of lossless audio files are, well, lossless. There is no substantial difference between different formats of lossless audio files regarding sound quality. We can easily convert from WavPack to FLAC, Apple Lossless to Monkey’s Audio, or WAV, as long as the integrity is not compromised.
Differences in lossless audio files fall into three categories:
- File format —— such as .flac vs. .ape
- Encoder (implementation & version) —— such as libFLAC 1.4.3 vs. 0.9, some codecs have multiple implementations
- Encoding parameters —— compression levels, block sizes, etc.
A specific audio file represents a point in this three-dimensional space. Looking at the following facts, you may understand why a high-quality music collection should choose the file format, encoder, and encoding parameters cautiously:
- If you edit music metadata tags by yourself, you may already know that different file formats have different support for music metadata tags.
- The decoding speed differs several to dozens of times with different encoding parameters. During playback, you will experience different buffering speeds or CPU usage.
- Some files created by legacy encoders will gradually lose 100% support from players (both Monkey’s Audio and WavPack have the concept of Legacy Files). If an audio file is considered legacy, you may need to transcode it some years later to play.
Perhaps you have already made some efforts for consistency:
- Store DSD audio in .dsf files
- Store PCM audio in .flac files
- Store CD rips in single audio files with .cue sheets
- Be consistent on encoders and encoding parameters
Congratulations, this is a huge step! But there are still some issues:
- You want to use single audio files with .cue sheets to ensure you won’t lose some tracks accidentally, but .cue sheets don’t play well with high-res and DSD audio.
- You cannot use read-only storage (such as a write-protected NAS folder/SD card) to archive your audio files (changes to music metadata tags need to be written back to the audio files).
I just finished a long march only to avoid frontal conflict with these issues ab initio. Fortunately, you don’t have to do that again because I have taught the new Tonal app my methodology.
You can add music to your Tonal collection using the “+” button at the top of the sidebar.
An Opinionated Player
Three requirements must be met before adding an album to your Tonal collection.
Tonal only supports lossless music in these formats:
- FLAC (.flac)
- Monkey’s Audio (.ape)
- WavPack (.wv or .wv + .wvc)
- Apple Lossless (.m4a)
- WAV (.wav)
- AIFF (.aiff)
- DSD (.dsf or .dff, including DST encoded .dff)
- SACD (.iso)
You may think: that’s fine — the article is titled lossless music, and most mainstream lossless audio formats are on the list already.
Let’s look at the second requirement:
Complete Discs Only
Tonal accepts complete discs — a folder with several audio files or a single audio file with a .cue sheet. When Tonal believes some tracks are missing, it would say no.
This requirement may still be acceptable if you collect complete albums or listen to classical music. An album is like an art exhibition — it is easier to get the curator’s idea when watching it completely.
This is also a pre-condition for gapless playback.
Let’s look at the last requirement:
AccurateRip Verified (for CD Rips)
When adding a disc in CD-Quality (16/44), Tonal performs AccurateRip verification automatically. If AccurateRip believes there are ripping errors, Tonal will try to fix them automatically using CUETools. Discs that fail to be repaired will be excluded from your Tonal collection.
Tonal is the first macOS app with CUETools error correction built-in (although not in the traditional form). That’s the secret of Tonal’s click-free playback.
“Managed” Music Collection
Once albums are added to your collection, Tonal will not read the original files. Tonal uses a managed directory to store packed lossless audio data in a uniform encoding (but no music metadata). The benefits are:
- You no longer need to manage filenames and folder names by yourself.
- You can experience consistent buffering speed and CPU usage regardless of playing any album.
Your music collection is stored in ~/Music/Tonal/ by default, but you can easily move it to an external drive or NAS. I stash a 1TB SD card inside the SD card reader of my MacBook Pro, solely for my music collection managed by Tonal.
I am tired of managing scattered folders manually. Tonal’s turnkey solution allows me to remain true to our original aspiration. If you have difficulty accepting Tonal’s vision of a managed music collection, please think about it this way:
You have thousands of photos on your iPhone, but you don’t view your photos as “a collection of images and folders.” You don’t name each photo and usually don’t care much about formats like HEIF, HEIC, JPEG, or PNG.
Because you have the Photos app.
Before You Start
Tonal is a misfit in many ways — it does not fit everyone’s needs, and for those who choose Tonal, Tonal won’t be their only player:
- Due to the always bit-accurate strategy, you can neither listen to 192 kHz albums on your Mac’s built-in speakers nor play a DSD album on a PCM-only D/A converter.
- Tonal collects albums into its managed directory, which contains packed lossless audio data in a uniform encoding (but no music metadata). If you cannot make an extra, standalone space for Tonal, whether internal or external, on a NAS or an SD card, there may be a better time for you to experience Tonal.
- Tonal accepts lossless and complete discs only. CD-quality discs must also be AccurateRip verified (Tonal uses CUETools to repair broken rips automatically).
You can download Tonal for free from the Mac App Store if such limitations are acceptable. At only 25 MB, Tonal is lightweight. The free version has no restrictions on features or usage. You can add up to 20 (CD-quality or high-res) discs to build a mini collection of your favorite artists.
A one-time (non-subscription) in-app purchase, priced at $99.99 for the introductory period, is offered to remove the limit. There is an even better way to unlock — if you have reviewed Tonal, please contact me for a free coupon; if you have conducted an in-depth review, an additional coupon will be provided to share with your best friend.
Please read the complete User’s Guide before downloading.
This article introduces how Tonal leverages the concept of a managed collection to solve three common problems when building a lossless music collection (inconsistent filesystem naming, broken rips with pops/clicks, and inconsistent file formats). This may not be the most interesting one in the series of articles on Tonal:
- Read Secrets of Audiophile Playback on macOS to learn how Tonal handles bit-accurate playback without introducing any playback setting. Even if you don’t like Tonal, you can better understand how mainstream audiophile players work in the context of bit-accurate playback.
- For those who still cannot find a player with first-class support for classical music, New Classical Music Experience on macOS explains why Tonal’s support for classical music is in the details. Much of this article applies to other music genres as well.
- Music Metadata Without Tags reveals Tonal’s genuinely original thinking. Editing music metadata in Tonal is fun and can bring your music collection to a new level.