Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

play MIDI on Linux #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

brccabral
Copy link

Hi, I was able to pay MIDI files on Linux, just had to install FluidSynth previously.

On Linux need to install fluidsynth, compile with -lfluidsynth and add a midi font file midi_font.sf2.
https://github.com/FluidSynth/fluidsynth

Install fluidsynth (default location is /usr/local)

wget https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.3.2.zip
unzip v2.3.2.zip
cd fluidsynth-2.3.2
mkdir -p build
cd build
cmake ..
cmake --build .
cmake --install .

Compile with -lfluidsynth

g++ -o midi OneLoneCoder_PGE_MIDI.cpp -lfluidsynth -I../BiggerProjects/CarCrimeCity/Part2 -lGL -lpng -lX11 -lpthread -lstdc++fs -std=c++17

Download a MIDI Font (there are many online), or install vlc-plugin-fluidsynth, it adds a default.sf2 at /usr/share/sounds/sf2/default-GM.sf2

sudo apt install vlc-plugin-fluidsynth

Once you have ff7_battle.mid and midi_font.sf2, just run

./midi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant