Playing MIDI files from the 90's on Ubuntu
Friday, September 23, 2022
The motivation
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.
For example, canyon.mid
and passport.mid
3 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 cabextract
âs -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.
In fact, 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 passport.mid
and canyon.mid
.
Quite an adventure just to play some old-school MIDI files. đ
-
Oh yes, some websites would embed MIDI files and play them when the page loaded. Good times. ↩
-
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. ↩
-
Thatâs assuming youâre aware of what 3.5 inch floppy disks đž are. ↩