Convert MIDI to text and back?
10 hours ago, Implosivetech said:Could you recommend a program to open with?
To just open and see binary content you can use any hex editor around there (I use Hex Editor Neo), as someone already mentioned. What I was saying was to use programming language of a choice because after all you want to do is
Quotewill then run a custom code, and convert each note to an ascii character
For example in C++
std::ifstream input( "C:\\file.mid", std::ios::binary ); std::vector<char> buffer(( std::istreambuf_iterator<char>(input)), (std::istreambuf_iterator<char>()));
this would read all the data from the MIDI file and store it into a buffer. After that you need some sort of a loop which would go thru the buffer and find all note on and off events and do what ever you want to do with it.
You can take a look here for MIDI file specification so you can find corresponding events and make proper algorithms according to it https://www.cs.cmu.edu/~music/cmsip/readings/Standard-MIDI-file-format-updated.pdf
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now