The triumph of technology over technology
Aug. 12th, 2024 12:10 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
SUCK IT, APPLE, YOU LOSERS, YOUR AIRPLAY PIECE OF CRAP IS FIXED.
Ahem. That is to say, I found a way around one of AirPlay's known persistent bugs. Since this calls for both gloating and some documentation, here we go.
AirPlay (Apple's stream-music-over-wifi protocol) has two known bugs that are incredibly annoying and have not been fixed for twenty years. (Cue gnashing of teeth, etc.)
1: You can't edit a song's metadata in iTunes/Music while AirPlay is enabled. Want to change the genre? Add a comment? Fix the artist's name? Too bad! Even worse, sometimes it will look like the tags were changed, but the change will not actually be written to the file, and as soon as you turn AirPlay off five years worth of changes will disappear and leave you screaming into the void. Just as a totally random example. All you can do about this is turn AirPlay off every time you want to edit the metadata, so the changes take.
2: iTunes/Music has a setting that will normalize the loudness of songs--that is, adjust the gain so they all play at about the same loudness regardless of what the actual file is recorded at. But this setting doesn't work while you're using AirPlay! So if you have, for example, playlists with songs from different artists, it's very likely you'll either constantly be adjusting the volume or just living with the nails-on-blackboard unevenness.
I have over 9000 songs in my music library and mostly listen to mixed playlists, so you can imagine that this became fairly critical when I finally decided AirPlay was the best option for my upstairs speakers. Thankfully, while I still can't do anything about 1, I have found a solution for 2. It requires several steps, and that you be on a laptop/desktop rather than a tablet or phone.
First, go Music's menu View > View Options and select "kind" from the options under File. This will show you what's an mp3 and what's a different format, such as AAC. "Purchased AAC" is especially critical, here. Download any purchased music that may be lurking on the cloud (that's under Song, once you select one or more such files). Once you have all your non-mp3 files a) showing and b) on the local drive, select them all and drag them to the desktop to copy them out of Music.
Next, open (or download if you don't have it) Audacity. Don't bother opening any files, just the application. Going to Tools > Apply Macro > Palette will get you the pre-loaded macros, and the one you want is MP3 Conversion. Once that window is open, select "Files" at the bottom right and then select all your non-mp3 files. If you have a lot, the conversion will take a while, so go get tea or pull up some fic or whatever.
Once all your song files are converted to mp3, drag them into Music and (after checking them) delete the non-mp3 versions from Music. (Keep the exported originals, if you want the backup.)
Now you're ready for the fun part! Go get MP3 Normalizer from Amvidia. This is a program to re-write and export mp3s at whatever loudness you select; the original files are preserved and you get new copies all with the same loudness. You can use it once in free-trial mode before it asks you to pay, but you'll want to keep using it so I'd count it money well spent. Adjust any settings you want (I'd recommend setting the conversion to Loudness rather than Peak, and to -20 LUFTs rather than the default). Choose an output folder that you can find easily, select your Music library folder as the input, and let her rip! It will search through all the sub-folders in the tree with no extra direction.
This application chugged through over 9400 song files in one go, for me, with no errors or dropped tracks. It took six hours, but it did the job, and did it while I had Plex streaming video going. And now all my playlists have nice and even loudness, even with AirPlay running. Best fifteen bucks I ever spent.
Once all the files are normalized (the application will duplicate your library's file structure and retain all metadata tags), navigate to Music's library folder in Finder. Take a deep breath for courage, drag your original library folder somewhere else for archiving, and drag in the exported library folder that MP3 Normalizer has created. Because every file has the same name and same filepath, Music will simply play the new files seamlessly and all your playlists etc. are preserved.
Done!
Of course, I'm going to need to do the mp3-conversion and normalizing steps again every time I add new music, but between Audacity's batch conversion and MP3 Normalizer's batch conversion, this should not be onerous. Annoying, but not onerous.
Ahem. That is to say, I found a way around one of AirPlay's known persistent bugs. Since this calls for both gloating and some documentation, here we go.
AirPlay (Apple's stream-music-over-wifi protocol) has two known bugs that are incredibly annoying and have not been fixed for twenty years. (Cue gnashing of teeth, etc.)
1: You can't edit a song's metadata in iTunes/Music while AirPlay is enabled. Want to change the genre? Add a comment? Fix the artist's name? Too bad! Even worse, sometimes it will look like the tags were changed, but the change will not actually be written to the file, and as soon as you turn AirPlay off five years worth of changes will disappear and leave you screaming into the void. Just as a totally random example. All you can do about this is turn AirPlay off every time you want to edit the metadata, so the changes take.
2: iTunes/Music has a setting that will normalize the loudness of songs--that is, adjust the gain so they all play at about the same loudness regardless of what the actual file is recorded at. But this setting doesn't work while you're using AirPlay! So if you have, for example, playlists with songs from different artists, it's very likely you'll either constantly be adjusting the volume or just living with the nails-on-blackboard unevenness.
I have over 9000 songs in my music library and mostly listen to mixed playlists, so you can imagine that this became fairly critical when I finally decided AirPlay was the best option for my upstairs speakers. Thankfully, while I still can't do anything about 1, I have found a solution for 2. It requires several steps, and that you be on a laptop/desktop rather than a tablet or phone.
First, go Music's menu View > View Options and select "kind" from the options under File. This will show you what's an mp3 and what's a different format, such as AAC. "Purchased AAC" is especially critical, here. Download any purchased music that may be lurking on the cloud (that's under Song, once you select one or more such files). Once you have all your non-mp3 files a) showing and b) on the local drive, select them all and drag them to the desktop to copy them out of Music.
Next, open (or download if you don't have it) Audacity. Don't bother opening any files, just the application. Going to Tools > Apply Macro > Palette will get you the pre-loaded macros, and the one you want is MP3 Conversion. Once that window is open, select "Files" at the bottom right and then select all your non-mp3 files. If you have a lot, the conversion will take a while, so go get tea or pull up some fic or whatever.
Once all your song files are converted to mp3, drag them into Music and (after checking them) delete the non-mp3 versions from Music. (Keep the exported originals, if you want the backup.)
Now you're ready for the fun part! Go get MP3 Normalizer from Amvidia. This is a program to re-write and export mp3s at whatever loudness you select; the original files are preserved and you get new copies all with the same loudness. You can use it once in free-trial mode before it asks you to pay, but you'll want to keep using it so I'd count it money well spent. Adjust any settings you want (I'd recommend setting the conversion to Loudness rather than Peak, and to -20 LUFTs rather than the default). Choose an output folder that you can find easily, select your Music library folder as the input, and let her rip! It will search through all the sub-folders in the tree with no extra direction.
This application chugged through over 9400 song files in one go, for me, with no errors or dropped tracks. It took six hours, but it did the job, and did it while I had Plex streaming video going. And now all my playlists have nice and even loudness, even with AirPlay running. Best fifteen bucks I ever spent.
Once all the files are normalized (the application will duplicate your library's file structure and retain all metadata tags), navigate to Music's library folder in Finder. Take a deep breath for courage, drag your original library folder somewhere else for archiving, and drag in the exported library folder that MP3 Normalizer has created. Because every file has the same name and same filepath, Music will simply play the new files seamlessly and all your playlists etc. are preserved.
Done!
Of course, I'm going to need to do the mp3-conversion and normalizing steps again every time I add new music, but between Audacity's batch conversion and MP3 Normalizer's batch conversion, this should not be onerous. Annoying, but not onerous.