Real-time MIDI playback using RtMidi

Before this, MIDI playback was done by generating an SMF data stream,
which was then played using platform-specific methods (MCI on Windows,
MediaPlayer on Android, SDL_Mixer on other platforms). However, this
approach had an issue where the Y18 command (which reads loop counts and
markers) did not work correctly.

With this change, the MAKOMidi class now uses the RtMidi library to
control MIDI devices in real-time. This approach was used in the
original "System3 for win32", but has now been made cross-platform.

The dependency on RtMidi is optional. If RtMidi is not available at
build time or a MIDI device is unavailable at runtime, FM synthesis will
be used.
This commit is contained in:
kichikuou
2024-08-16 10:11:41 +09:00
parent 3a763412c9
commit 41e69d7610
12 changed files with 521 additions and 435 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
- name: Install Deps
run: |
sudo apt update
sudo apt install libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev
sudo apt install libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev librtmidi-dev
- name: Build
run: |