Refer to QMidi.
Only provides the most basic MIDI file read and write functions.
vcpkg install wolf-midifind_package(wolf-midi)
target_link_libraries(${PROJECT_NAME} PRIVATE wolf-midi::wolf-midi)cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config ReleaseOptions:
WOLF_MIDI_BUILD_STATIC(OFFby default): build a static library instead of a shared one.WOLF_MIDI_BUILD_TESTS(OFFby default): build the test executable and register it with CTest.WOLF_MIDI_INSTALL(ONby default): generate the install and CMake package rules.
Tests are not built by default. Enable them explicitly and run with CTest:
cmake -S . -B build -DWOLF_MIDI_BUILD_TESTS=ON
cmake --build build --config Release
ctest --test-dir build -C Release --output-on-failureQuick example:
MidiFile f;
f.load(" .. some filename .. ");
f.save(" .. some filename .. ");You can get the events using f.events() which returns a std::list<MidiEvent*>*.