Handling, organizing and listening to music
How I manage and listen to music.
Getting music
There are several ways to obtain music nowadays:
- Rip it from CDs Use ExactAudioCopy on a Windows machine with an optical disc drive (they still exist outside museums).
- Rip it from vinyl Use a turntable, a good analog-to-digital audio converter, and Audacity to record it. Audacity offers filters to reduce noise and remove cracks and pops.
- Download from web 2.01 websites
youtube-dl is the Swiss Army knife for downloading from those sites. Check if your local radio stations have a player or
Mediathek
. - Some radio stations provide their shows as podcasts.
- Some DJs run their own podcast to promote themselves.
- Buy it online.
Before the import
Transcode to a supported format
These tools come in handy:
- ffmpeg, the Swiss Army knife for audio and video en-/trans-/decoding on the command line.
- XLD to transcode audio files, split one file to tracks, etc.
If you want lossless encodes in an iTunes library, transcode the files to Apple Lossless. XLD handles this case nicely.
Set and clean ID3 tags
-
MusicBrainz Picard matches the files’ acoustic fingerprints against freedb2 and sets their tags accordingly.
-
Use mp3tag to derive ID3 tags from folder and file names and to fix ID3/APEv2 tags. Mp3tag is a power tool for mass manipulating and cleaning tags. It’s outstanding and works well within Wine. Nothing comes close to it, and it is the only reason I keep Wine installed.
Wine is holding me back from upgrading to macOS Catalina as it does not support 64-bit-only OSes yet. I’m, by the way, wary of the Music app that ships with macOS Catalina.
Import files to library and organizing
All my music files are managed by iTunes. iTunes is really good at handling large music collections. I subscribe to iTunes Match to have the music available on all my devices.
iTunes Match restrictions
iTunes Match is sometimes slow.
It matches clean versions of lyrically explicit tracks. It’s annoying, but since voices distract me in music and I rarely listen to rap, it does not affect me much. I also keep the original files instead of replacing them with the matched version.
If you listen to DJ mixes, you will hit iTunes Match’s two-hour or 200 MB file size limit.
Most of these mixes are distributed as MP3. mp3splt splits the files evenly without re-encoding.
Rating with a schema
After importing new tracks, I start rating them. Over time I’ve developed a rating schema (on a scale of 0 to 5 stars).
0 stars: new to library, needs to be rated1 stars: rated to not keep.2 stars: keep for a reason, but the track is probably not great3 stars: an average track4 stars: a good track5 stars: a personal favorite track
Stars is useful to rate music via hotkey.
Accurate genre field
I try to set specific genres: Instead of Rock I narrow it down to Rock/Metal or even Rock/Metal/Black. Here are a few other specific examples:
Drum & Bass/Jump-UpHouse/BassTechno/AcidTechno/Hard
Tagging something as Pop is basically avoiding setting a genre. For Pop I started adding the decade like this: Pop/60, Pop/70, …, Pop/00, Pop/10, Pop/20.3
Clean up the iTunes library with beaTunes
beaTunes not only analyzes the content of each track, but also inspects the iTunes library. The inspection detects illogical tags, missing compilation tags, different notations of the same artist, finds duplicates, etc.
Go through the findings and commit the changes.
Determining the Key and Energy with Mixed in Key
Mixed in Key analyses the key and energy of music files.4
Create a smart playlist MiK todo that lists all files without Energy or BPM and with a rating greater than or equal to 2 stars.
Creating playlists
Creating smart playlists makes much more sense with rated and analyzed tracks. Name them wisely. I tend to follow the BEM naming convention5 and name them roughly like this:
stars__4stars__4+--bpm-124-127
Smart playlists
Set up a handful of smart playlists:
- For energy levels (filter rules depend on your Mixed in Key configuration)
- For each possible rating (Stars 0, Stars 1, …, Stars 5)
- For Added in the last x weeks/months I have those for 4 weeks and 6 months and call them added-4w and added-6m.
My rating scheme (see above) leads to two special Star playlists:
- Stars 0 is my
to rate
playlist. - Stars 1 is my
to remove
playlist.
Now you can create smart playlists like these:
- Banger tracks: Track is in playlist Energy 8 and Stars 5.
- Calm popular music: Genre begins with
Popand is in playlist Energy 4 or Energy 5. - Hard Techno post 2010: Genre begins with
Techno/Hardandyear >= 2010, in playlist Energy 6, 7, 8, 9. - More than 4 stars
- More than 4 stars and in BPM range 124 to 127
- Long and calm tracks: longer than x minutes, energy less than 5
Using beaTunes
In beaTunes you can set up criteria like Instrumentation
, Key
, Speed
, etc. and let it create a playlist for you based on a seed track selection. That is super nice and the results are good.
Over time, I noticed I do not use that feature much. I’m fine with the smart playlists.
Backup
- I use rsync to sync the Music folder to my NAS:
rsync --archive --verbose --human-readable \
--itemize-changes --progress \
--prune-empty-dirs --delete \
-e ssh ~/Music/iTunes me@NAS:~/backup/Music
- Export the playlists with Doug’s Batch Export Playlists script. ⚠️ Make sure to export your Stars playlists! iTunes does not save the rating in the files’ tags. With those playlists you can recover your ratings.
- Add the exported playlists to a git repository and commit the changes, then push to a remote host.
Playing music
iTunes
With iTunes Match I can listen to my music on any of my devices.
On desktop, I work with my smart playlists and the Column Browser
in the Song
view mode:

With MPD and Cantata
To play music on my stereo I launch Cantata to control MPD, which is connected to it via HDMI. It plays the files from my NAS. I scp the exported playlists (with corrected file URLs) to MPD’s playlists folder.
DJ set preparation
When creating a DJ set, I keep a playlist of A tracks as a track pool. Traktor reads my iTunes library, and I usually pick tracks from that pool and go with it.
Some mixes need more preparation. Then I create a plain old playlist in iTunes first and use that in Traktor Pro 3.
