Split MIDI file into its' tracks
I want to be able to split a midi file into its' 4 tracks inside of max. The reason why I don't want to do it manually in a DAW is I need to do it for 5000 files. I am currently look at splitting them using a js plugin, but I wanted to know if there was a way to do it natively in max?
So far I've found solutions for if it's live midi not midi files or for splitting into channels instead of into tracks. Anyone got any experience with this?
uzi -> detonate -> detonate
(it is more complicated in practice, but that is the famework)
so by using detonate it'll pass out each note individually along with it's track number? If so then I can feed each note out it's separate ways based on the track number using a form of if statement is that what you're saying? This is what I have currently:
If you explained what are you trying to do with this,
one could make better suggestions.
Detonate can also dump ALL events in the midi track.
That dump to max console can be routed
into patch using console object.
console @classfilter detonate
than you can route, split, collect, analyse and whatever you want
with the output data.
if you don't want to plaster max console with that much data, bang message :
;
max clearmaxwindow
at the end of dump...
(havent looked into your patch but)
to split a midifile in max i always recommend to do it the same way as you would do in realtime: load it, play it, sort by tracks and/or channels, record all of them elsewhere, export all of them into files.
after you´ve build it that way you learned a lot about working with data in max.
(if you build your midifile splitter using javascript or [filein], you wont)
this covers it nicely, that´s most of what i also would have to say about this object. (scroll down to bottom for detonate)
http://sites.music.columbia.edu/cmc/courses/g6601/fall2004/week2a/Max43TutorialsAndTopics.pdf
Ah I got it to work well enough for my purposes, I used detonate as Roman suggested to get the track number of each note and then I filter it as I want to using that information. Since I already have a loop I don't need to use uzi.
For context I'm using it to perform Markov chain based analysis of multi-track midi files and I wanted to analyse each track separately to see if that would have an effect on the quality of the output.