Read .mid file in C
Posted: Mon Jun 01, 2015 4:44 pm
Hello everyone!
I'd like to be able to write a program which reads .mid files and do something at the right time for each note on and note off (for example printf the note when it has to be played or stopped). I don't need all other information like pitch, sysEx or whatever
I thought it would be quite easy, I didn't expect that would be so hard to work on .mid files. I've spent my whole day to understand/search for information/code on the internet but in the end I have nothing.
I've found some codes/explanations but I can't compile it. here or here or http://www.cap-lore.com/EnglishSuites/code/code.html.
Before someone suggests to google midifile.h, already done and dowloaded, I tried to modify the code without success....
I've seen other examples in C# or C++ but i'd rather write a C program or at least in C++. (I want to run it on a Raspberry Pi
)
Thanks !
I'd like to be able to write a program which reads .mid files and do something at the right time for each note on and note off (for example printf the note when it has to be played or stopped). I don't need all other information like pitch, sysEx or whatever
I thought it would be quite easy, I didn't expect that would be so hard to work on .mid files. I've spent my whole day to understand/search for information/code on the internet but in the end I have nothing.
I've found some codes/explanations but I can't compile it. here or here or http://www.cap-lore.com/EnglishSuites/code/code.html.
Before someone suggests to google midifile.h, already done and dowloaded, I tried to modify the code without success....
I've seen other examples in C# or C++ but i'd rather write a C program or at least in C++. (I want to run it on a Raspberry Pi
Thanks !