MIDI file utility

Post any examples or modules that you want to share here
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: MIDI file utility

Post by KG_is_back »

kortezzzz wrote:Tested it on 3.0.6 and it seems working. Also the rewind" feature is very cool. Wondering if there is any way to just extraxt the full midi data out of the file without playing the notes. String format is welcome since it can easily set parmeters of any kind of Ruby based note\step sequencer inside FS. In that way, we can use the file utility as solid midi data extracter insteed of a player :)


You indeed can.

Code: Select all

file=MidiFile.load_file(path) #opens and parses the midi file
list_of_midi_events= file.tracks[0].events #gets array of midi events from track 0 of the midi file


Note, the midi events are various subclasses of MidiEvent. To get corresponding Midi objects that flowstone recognizes, you must call .to_midi method on them (which will usually return nil, because the feature is not fully implemented yet). However, the MidiEvent objects are more useful, because they also contain time-position within.

A full blown midi editor is indeed a planned feature...
User avatar
kortezzzz
Posts: 763
Joined: Tue Mar 19, 2013 4:21 pm

Re: MIDI file utility

Post by kortezzzz »

KG_is_back wrote: A full blown midi editor is indeed a planned feature...


Great KG, I'll be waiting for this :D

Thanks!!!
keyjslider1
Posts: 20
Joined: Tue Mar 13, 2018 2:19 pm

Re: MIDI file utility

Post by keyjslider1 »

KG_is_back wrote:This project is an early prototype .


Awesome work, KG. It could be also great to create utility, doing the opposite job: convert the raw MIDI data, in a form like being represented by a MIDI-Split prim with a PPQ-based time signature alignment, into MIDI file. Optionally the feature of copying into MIDI-clipboard (like in FL Studio)... I for the sure will need this option for my project of MIDI-processor for live composition, but I will barely achieve the level enough I'd be capable of doing this utility by myself...
Post Reply