Midi Parser is a tiny C++ library made to simplify reading binary Midi files.
Midi Parser is written in C++ and uses <cstdio>
library for reading files so any device
that supports those will be able to run Midi Parser. The parser may optionally use STL if your device supports it.
- Navigate to the releases page and download the archive for the latest release.
- Extract the files from archive into your project directory. (Note: source archive includes both source files and headers. Depending on your environment, you may need to place them in different directories.)
- Open
Options.h
file and set the options there:- Set the
USE_BIG_ENDIAN
macro totrue
if your system is big-endian. - Set the
USE_STL
macro totrue
if you can use STL.
- Set the
- Include library into your code:
#include "Midi.h"
- Instantiate the
Midi
object as follows:Midi midiFile {"path_to_file.mid"};
. - You can find a simple program using Midi Parser in the
main.cpp
file. - For the full library reference, please check the documentation.