Hi all, MIDI newbie here.
I'm looking for a way to extract all the melody information about a midi track that I exported from a DAW (Logic, in this case).
That would be: time, note on/off, note number, velocity and so forth...
In the end, my goal is to use that information to plug it into a graphic software (Blender) using a Python script, in order to visually illustrate the melody the way I want.
I've only managed to open the file in a text format, and I don't understand much of what I have here (see image attached).
Any idea of the way I should approach this problem?
Well this is a standard MIDI file, you would need to open it rather as binary. See the "Standard MIDI File" section of the complete MIDI specification at https://www.midi.org/specifications/item/the-midi-1-0-specification for the file format.
If you are looking for something ready to use, try one of the suggestions at http://stackoverflow.com/questions/2933938/reading-a-midi-file-in-python or e.g. https://mido.readthedocs.io/en/latest/parsing.html
Don't think of any way that has a graphic user interface?
Welp, I'm also kind of new to python and to coding in general. This seems like a huge challenge but if it's the only way, I'll try to understand how these python libraries work.
Does Logic not have an "event list" amongst its features?
This should give you most of the information you require.
A sequencer that I use occasionally to show all MIDI data is a freebie called Sekaiju.
See the event list below.
(Click to enlarge it.)
You can convert a MIDI file to/from CSV format, which may be friendly for scripting: