Another (Small) Brick from the Wall

I spent my entire afternoon and evening adding CD information to the online MusicBrainz database for two Motorhead albums, one Squares/Joe Satriani album, and one Converge album.

What does this mean?
It means the next time somebody tries to rip these albums to a computer, album and tracklist information will populate automatically when the person would have otherwise needed to enter all of this information manually. (Or possibly have the abcde command-line program crash, which is what happened in my case.)

Why did this take so long?
Because it was done using the MusicBrainz Picard and abcde programs within the new version 8.2 of CentOS Linux.

Why is this relevant?
Because the new digital world spearheaded by Spotify sucks—a lot—and it could be so much better. In the meantime, I will keep my music to myself, thankyouverymuch.

Anything else?
Sometimes when working with Linux, a person feels a very peculiar twinge of productivity mixed with nonproductivity. This can happen when a lot of time and effort is spent performing what would most likely be a routine task on a commercial operating system such as Mac OSX or Windows. On the bright side, there are always important and valuable lessons to be learned on technical excursions such as this one. Plus, a glimpse of how things might actually work better is occasionally earned.

Configuring abcde on CentOS 8 to Utilize MusicBrainz CDDB

If you’re anything like me, you regard Spotify, YouTube Music, Amazon Music, etc. as giant steaming piles of horse shit. If you’re more like me, you also still buy your music on CD and then rip it in a lossless format to your computer (or purchase albums from Bandcamp icon-external-link-12x12 or Soundcloud icon-external-link-12x12 and download FLAC versions of the songs). And if you’re even more like me, you also run Linux as your primary operating system and refuse to grant conniving technology companies like Apple and Microsoft dominion over your music library.

Modified Spotify logo surrounded by a red circle with a red strike through it. [Formatted]

Enter the command-line utility abcde, which is an acronym for A Better CD Encoder. This program previously defaulted to FreeDB to obtain CD artist, album name, and track title information, but sadly this service shut down back in June. This leaves MusicBrainz icon-external-link-12x12 as the next best alternative, but unfortunately abcde hasn’t been updated yet to reference this different database, which effectively renders its music database lookup features unusable.

So if you’re running CentOS 8, follow the steps below to activate the MusicBrainz database for abcde. (These steps will be similar for previous versions of CentOS and other RHEL-derived distributions.)

Also, if you haven’t done so already, delete Windows and install Linux. You’re going to have to do it eventually—yes, really—so might as well get it out of the way now. Don’t worry… it’s free, and also better in every conceivable way except for handholding….

  • Install the major repositories (epel-release, elrepo-release, rpmfusion-free-release, and rpmfusion-nonfree-release)
  • Enable the AppStream and PowerTools repositories by issuing the commands dnf config-manager --set-enabled powertools and dnf config-manager --set-enabled appstream, or by editing the files CentOS-AppStream.repo and CentOS-PowerTools.repo in /etc/yum.repos.d and setting enabled=1.
  • Install the flac-libs package.
  • (Optional) Install the libvorbis and libogg packages.
  • Install the abcde package, or download the latest version from https://abcde.einval.com/wiki/ icon-external-link-12x12 . If downloading, install into /opt, chown -R root:root /opt/abcde-2.9 (or equivalent folder), chmod -R 755 /opt/abcde-2.9, ln -s /opt/abcde-2.9/abcde /usr/local/bin, ln -s /opt/abcde-2.9/cddb-tool /usr/local/bin, and ln -s /opt/abcde-2.9/abcde-musicbrainz-tool /usr/local/bin.
  • dnf install cdparanoia or download from https://xiph.org/paranoia/ icon-external-link-12x12
  • dnf install cd-discid or download from http://linukz.org/cd-discid.shtml icon-external-link-12x12
  • Download and build https://musicbrainz.org/doc/libdiscid icon-external-link-12x12 , which installs into /usr/local/lib. Issue cp ./libdiscid.pc /usr/lib64/pkgconfig from within the build directory to prevent the Package libdiscid was not found in the pkg-config search path. error when issuing perl Makefile.PL for MusicBrainz-DiscID-0.06. This will be installed into /usr/local/lib which must be added to the library path by editing /etc/ld.so.conf and adding the text /usr/local/lib. Finally, update the libraries cache by issuing the ldconfig -v command.
  • Download https://metacpan.org/pod/MusicBrainz::DiscID icon-external-link-12x12 and issue the following commands: tar -xzvf MusicBrainz-DiscID-0.06.tar.gz, perl Makefile.PL, make, make test, and make install. (Check README.md.)
  • Install the perl-Mojolicious package.
  • Download, build and install module https://metacpan.org/release/WebService-MusicBrainz icon-external-link-12x12 .

Also, make sure your ~/.abcde.conf file is updated to reference MusicBrainz and configured for FLAC output (or Ogg/Vorbis if you prefer).

# Specify the method to use to retrieve the track information,
# the alternative is to specify 'musicbrainz':
CDDBMETHOD=musicbrainz
CDDBURL="http://freedb.musicbrainz.org/~cddb/cddb.cgi"

# Specify the encoder to use for FLAC. In this case
# flac is the only choice.
FLACENCODERSYNTAX=flac

# Specify the path to the selected encoder. In most cases the encoder
# should be in your $PATH as I illustrate below, otherwise you will 
# need to specify the full path. For example: /usr/bin/flac
FLAC=flac

# Specify your required encoding options here. Multiple options can
# be selected as '--best --another-option' etc.
# Overall bitrate is about 880 kbs/s with level 8.
FLACOPTS='-s -e -V -8' 

# Output type for FLAC.
OUTPUTTYPE="flac"

And now you’re ready to roll! Piece of cake, right? No..? Well, it’s still worth all the hassle because you will be able to burn CDs to your Linux machine in glorious lossless quality, with full album details, and also keep the grubby fingers of the many crooked schemers at Apple and Microsoft off of your precious music.

I’m guessing the code icon-external-link-12x12 for abcde will eventually be updated to reflect these changes, which would make the instructions above obsolete. If not then I might be writing a related but very different blog post in the future.

Game Developer Confessions, Part 03: Behold! the Micro-NOC

Introducing the new Micro-NOC! Intel NUC7PJYH1 VM hosts, Intel NUC5PPYH web and game servers, Cisco managed Layer 2 switches, Synology NAS devices, SonicWall firewalls… and Linux, Linux and more Linux! (Batteries not included.)

You might be asking, what does this have to do with game development? Bedrock: cultivated workflow, scalable infrastructure, security, devops and—most importantly—sustainable technologies. Oh yeah… and all subdomains and servers are named after planets and characters in Metroid (respectively), which is fucking rad.

A Rather Sharp Distinction Between Administration and Software Development

Excerpt from the book Unix and Linux System Administration Handbook icon-external-link-12x12 icon-search-12x12 by Evi Nemeth icon-external-link-12x12 icon-search-12x12, Garth Snyder icon-external-link-12x12 icon-search-12x12, Trent R. Hein icon-external-link-12x12 icon-search-12x12, and Ben Whaley icon-external-link-12x12 icon-search-12x12

Book cove for "Unix and Linux System Administration Handbook" by Nemeth et al. [Formatted]

The Wikipedia page for “system administrator” includes a nice discussion of the tasks that system administration is generally thought to include. This page currently draws a rather sharp distinction between administration and software development, but in our experience, professional administrators spend much of their time writing scripts. That doesn’t make system administrators developers per se, but it does mean that they need many of the same analytical and architectural skills.