Loading...

Creating a MIDI player in MS-DOS / BASIC

23,779 views

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Dec 13, 2010

In this tool-assisted education video, I demonstrate how to write a MIDI player from scratch.

Please see this page for more details, including the source code:
https://bisqwit.iki.fi/jutut/kuvat/pr...

Twitter: https://twitter.com/RealBisqwit
Patreon: https://patreon.com/Bisqwit (alternatives at https://iki.fi/bisqwit/donate.html)
Twitch: https://twitch.tv/RealBisqwit
Homepage: https://iki.fi/bisqwit/

MIDI is a Music Interchange file format which describes music in abstract terms such as "piano key C-4 pressed down". A synthesizer is required to reproduce audible music from MIDI files. In this tool-assisted education video, I create one such synthesizer program from scratch, using the OPL3 hardware synthesizer as the backend for generating the actual sounds.

You see me type every line. The resulting program contains the rudimentary features for playing most MIDI files just fine, including the pitch slides and pans, but it lacks other special effects like vibrato, nor does it support any more tunings than the standard equal-interval mathematical tuning. It supports the loopStart/loopEnd mechanism found in authentic Final Fantasy VII MIDI files.

This is probably my best MS-DOS MIDI player so far (at least in some aspects), and I have written two. The first one, written in 1998, however eventually evolved also to convert them into S3Ms...
This was also the most difficult production-for-show so far in terms of getting it right; BASIC has its own unique challenges at debugging it, and I did accidentally introduce many bugs into this program, despite writing it from a script. I did fix them too, though. But more time was consumed doing that than I had planned.

Music played during this video:
- Zoolook by Jogeir Liljedalh (a few seconds in the beginning)
- Predicament / Chrono Cross (BGM during programming)
- Chmmr and Arilou themes / Star Control III (MIDI)
- Barret and battle themes / Final Fantasy VII (MIDI)
- Airship and Big whale themes / Final Fantasy IV (MIDI, sequenced by Andrew Thompson)

Songs begin at:
12:00 FF4 Airship
13:02 FF7 Barret
14:33 SC3 Arilou
15:56 FF7 Battle
17:27 FF4 Big Whale

My favourite part of this video: 08:53 onwards.

P.S. Eventually this program evolved into a C++ opensource project! Check it out here: https://bisqwit.iki.fi/source/adlmidi...

Loading...

Advertisement
When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...