extracting notes out of MIDI files

:o I had a look at some MIDI data extracted from William Tell Overture and got it to work... however would like to be able to extract the data from some other MIDI files I have.

Wondering if anyone has some code or knows of a program that can do this.

The Midifile library in my code repository may be what you need. Links below.

:o OK thanks for the quick reply and links... will have a look.

Found some code earlier that sort of does it but... I'm not musical and trying to make sense of it.

It creates simple data with tones and on off times. I've used it with synth code to play midi files.

Search for my post about a 6 voice midi player I made. It has code to read this data.

shawnlg:
GitHub - LenShustek/miditones: Convert MIDI files to a simplified time-ordered sequence of note commands

It creates simple data with tones and on off times. I've used it with synth code to play midi files.

Search for my post about a 6 voice midi player I made. It has code to read this data.

Thanks for that, I had a look at miditones and a few other resources and have finally got code working in VB.net with an interface.

Got it producing test code tonight that works great. Fur Elise plays back faithfully after adjusting code to enable different note durations. The interface at the moment is very basic but it enables easy debugging of extracted data and processing into simple commands for playing back. It will eventually have options to pick what channels are included and what fields (ie. channel, duration, volume)

I noticed a lot of files I was looking at have volume control which makes a huge difference to some... will have to incorporate this as well.

A few screen shots.