| File | Date | Author | Commit |
|---|---|---|---|
| .github | 2025-09-11 |
|
[22bd09] Drag and drop support8 |
| gtk3 | 2025-09-11 |
|
[22bd09] Drag and drop support8 |
| linux_midiconverter | 2025-04-26 |
|
[70fba9] Latest |
| linux_midiplayer | 2025-05-07 |
|
[42f70f] On exit |
| msdos | 2025-04-25 |
|
[2eaa3b] Latest |
| msdos_midiconverter | 2025-05-08 |
|
[81e6ea] Latest |
| msdos_midiplayer | 2025-05-09 |
|
[83019e] Strip |
| msdos_wave_player | 2025-05-09 |
|
[5e996c] Latest |
| test | 2025-04-16 |
|
[904e66] First Entry |
| README.md | 2025-04-25 |
|
[116083] Latest |
This repository contains three related MIDI projects that use OPL3 FM synthesis emulation:
All three projects share the same core technology: faithful recreation of the Yamaha OPL3 sound chip commonly found in sound cards like the Sound Blaster 16 and AdLib during the 1990s.
A command-line utility for converting MIDI files to WAV format with high-quality FM synthesis output.
Key Features:
Usage:
./midi2wav input.mid output.wav [volume]
The optional volume parameter (percentage) defaults to 500% (value of 500).
A real-time MIDI file player that uses OPL3 FM synthesis emulation for playback.
Key Features:
Usage:
./midiplayer filename.mid
A MIDI player for DOS systems that uses OPL3 FM synthesis to play through AdLib-compatible sound cards.
Key Features:
Usage:
midiplayer [filename.mid]
Playback Controls:
Requirements:
Building MIDI to WAV Converter:
cd linux_midiconverter
mkdir build && cd build
cmake ..
make
Building Linux MIDI Player:
cd linux_midiplayer
make
The DOS project uses a Dockerfile for easy compilation:
cd msdos
make
The Makefile handles all the necessary steps to create a DOS-compatible executable using the DJGPP compiler in a Docker environment.
The FM synthesis emulation is based on the DOSBox DBOPL emulator, which accurately recreates the Yamaha YMF262 (OPL3) sound chip:
All projects support:
.
├── linux_midiconverter # MIDI to WAV converter
│ ├── dbopl.cpp/h # Core OPL3 emulation
│ ├── dbopl_wrapper.cpp/h # Wrapper for OPL3 emulation with MIDI support
│ ├── instruments.cpp # FM instrument definitions (181 instruments)
│ ├── main.cpp # MIDI to WAV converter application
│ ├── midiplayer.cpp/h # MIDI file parser and conversion logic
│ ├── virtual_mixer.cpp/h # Audio mixing system
│ └── wav_converter.cpp/h # WAV file output support
├── linux_midiplayer # Linux MIDI player
│ ├── dbopl.cpp/h # OPL3 emulation (from DOSBox)
│ ├── dbopl_wrapper.cpp/h # Interface between C MIDI player and C++ OPL3 emulator
│ ├── instruments.c # FM instrument definitions
│ ├── main.c # Player application
│ └── midiplayer.c/h # MIDI playback engine and file parser
├── msdos # DOS MIDI player
│ ├── instruments.c # FM instrument definitions for General MIDI
│ ├── midiplayer.c/h # Main program code
│ └── Makefile # Build configuration for Docker-based compilation
└── test # Test MIDI files
├── futuristic.mid
├── Take-Me-Home-Country-Roads.mid
├── TetrimoneA.mid
├── TetrimoneB.mid
├── TetrimoneC.mid
├── theme.mid
└── title-screen.mid
The OPL3 FM synthesis used in these projects produces a distinctive retro sound characteristic of 1990s PC gaming and demo scene music. Unlike modern sample-based synthesizers, OPL3 generates sounds through mathematical frequency modulation, creating:
In contrast, FluidSynth and other modern sample-based synthesizers:
The OPL3 synthesis in these projects is intentionally designed to recreate the sound of early PC gaming and music production rather than realistic instrument reproduction. This gives MIDI files played through these tools a distinctive retro gaming aesthetic that many find appealing for its nostalgic qualities.
All projects are licensed under the MIT License.