> From: Mark Constable <markc@xxxxxxxxx> > > A crude but extremely simple option is to use midicomp and tweak the ascii > output anywhich way you care to with any scripting language on the planet. > Sure, there is no GUI and it's only a one shot process but there is > nothing you could not do to a MIDI file with some persistence. What is a > total bonus is that once a technique is perfected then it can be easily > batched, ie; to normalize the volume settings of any MIDI file, to always > put the kick drum dead center, change any kick1 to kick2... and so on. I > used to have a bunch of macros and scripts for Kate (KDE editor) that made > working with the intermediate ascii output quite easy... I could make > changes and one menu option would pipe the changes thru midicomp -c and > then into timidity so I could preview changes directly from Kate. > > midicomp some.mid | somefilter arg1 arg2 | midicomp -c some2.mid > > http://midicomp.opensrc.org/ > > --markc Hi Mark, Thanks for that. I have used midicomp plus awk/python to do some of these things, (and midicsv which does a very similar job to midicomp) but there are some limitations to do with midi itself that makes some of the transformations I'd like to do very difficult. For example, midi has no idea about bars/beats, but with the time signature info in type 1 midi files you can map ticks to bars/beats/ticks and so on, but it's not trivial. The main problem is that midi files are streams of event data, not musical information, and extracting the musical information sensibly is tricky. For example, in a midi drum track, there might be a pan controller before every note_on event to set the pan individually for each drum. So if you are going to move the note_on event backwards or forwards in time, you need to make sure that the pan event moves with it. You also need to make sure that you don't get overlaps between notes and mess up the note_on/note_off order. It looks like a scripting based solution is my best bet, with some sort of awk-like language for specifying transformations. I think I'll have to get stuck into my python code and see what happens. Cheers, Stuart