Playing MIDI files from the 90's on Ubuntu
Friday, September 23, 2022
Another post triggered from a YouTube video on retro computing. 😉
While watching that video, the host mentioned how
passport.mid was the best MIDI file, or something to that extent.
That got me thinking:
I haven’t listened to MIDI files in ages.
I remember playing MIDI files back in my middle and high school days because downloading or (gasp) streaming high-fidelity audio over the Web just wasn’t a thing yet. It was still years away before cable modems and ADSL became widely available. (ISDN was a thing in Japan, but that’s a story for another day.) Internet connections were tens of kilobits per second, which was a few kilobytes per second.
Since MIDI files were mere kilobytes in size and there were many websites distributing them.1 The files essentially contained instructions for a sound card to synthesize music.2 As the files did not contain sampled audio like PCM WAV or MP3 files, they were tiny in comparison.
Full of nostalgia, I just needed to listen to MIDI files which came with Windows.
Finding MIDI files
Older version of Windows came with a couple of well-known MIDI files as part of the install.
passport.mid3 were included in Windows 95 and 98.
(And maybe later, or before; I think I’ve seen them in Windows 3.1 as well.)
The closest source I had was a Windows 98 Second Edition (SE) CD.
The next challenge was extracting the MIDI files from the installation CD.
Windows uses (used?) CAB (“cabinet”) files (
.cab extension) for archive files.
Each of these files are 1.8 MiB in size, which seems to indicate these were prepared to be written to floppy disks.
Wait, didn’t 3.5 inch floppy disks have a capacity of 1.44 MB, you ask?4
True, unless you were Microsoft which used the Distribution Media Format to pack more data into each disk. This allowed them to use less media (less cost) and had a nice side effect of being a copy protection measure, as it’s harder to duplicate such disks.
Back to opening these files. The standard Archiver application in Ubuntu wouldn’t open these files correctly (they’d turn up empty), so I needed something else.
Extracting CAB files
In order to extract the CAB files, I had to use cabextract.
This was a simple
apt install away, no big deal.
Next, choosing the CAB file to extract.
You could use
-l option to view the contents of the file.
However, attempting to open a particular file will fail for cabinets that span multiple CAB files which is the case with the Windows 98 installation files.
cabextract tells us that right in second line of the help text:
cabextract --help Usage: cabextract [options] [-d dir] <cabinet file(s)> This will extract all files from a cabinet or executable cabinet. For multi-part cabinets, only specify the first file in the set. ... snip ...
Therefore, I had to extract a bunch CAB files in order to extract the few MIDI files.
Playing the MIDI file
Now that I got hold of
passport.mid, I thought I was on the final stretch.
Opening it in VLC media player should work because, what doesn’t VLC play??
You guessed it: turns out, it doesn’t play MIDI files out of the box. 😛
There’s a VLC plugin using FluidSynth software synthesizer to allow playback of MIDI files.
So after a quick
apt install vlc-plugin-fluidsynth, VLC was able to play
Quite an adventure just to play some old-school MIDI files. 😉
Some sound cards weren’t very good at synthesizing music on hardware. Software synthesizers were available which used the CPU to synthesize music which many times sounded better; that is if that’s all you wanted to do, as it often used lots of CPU power. ↩
Little did I know that the name “passport” came from the creators of those MIDI files, Passport Designs. The company in its latest incarnation (“Passport Music Software, LLC”) was around until early this year when it was announced they’d be closing their business. ↩