fbpx
Skip to main content

MIDI Forum

Extracting practica...
 
Notifications
Clear all

Extracting practical data from a midi file

5 Posts
4 Users
0 Reactions
25.8 K Views
Bobby Wapap
Posts: 2
New Member
Topic starter
 

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?

 
Posted : 28/07/2016 4:06 am
Jan Kučera
Posts: 17
Eminent Member
 

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

 
Posted : 28/07/2016 6:54 am
Bobby Wapap
Posts: 2
New Member
Topic starter
 

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.

 
Posted : 29/07/2016 12:10 am
JohnG
Posts: 226
 

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.)

 
Posted : 15/04/2020 3:04 am
Pedro Lopez-Cabanillas
Posts: 154
Estimable Member
 

You can convert a MIDI file to/from CSV format, which may be friendly for scripting:

https://www.fourmilab.ch/webtools/midicsv/

 
Posted : 17/04/2020 1:51 pm
Share: