Hi,
I have reason to think the “nosort” / “sort” option that gets mentioned on this forum might help me refine a script I’m working on. The workhorse commands in the script are Midi_GetNote and Midi_InsertCC. The idea of the script is to draw segmented wind-controller-like “breath” curves that are tightly coupled with non-overlapping note-on/off events. If I run it on a long (monophonic) midi line, it mostly gives me what I want, a 6-point breath curve, with some scripted variance in curve shape and tilt, around each note or group of (non-overlapping) slurred notes:
But other times it inserts a wild cc point between notes, and even more unexpectedly, it will sometimes insert a whole bunch of cc points around a single note,
For me it’s not a big deal to clean up these anomalies just by re-running the script with just the “weird” notes selected. But I wonder if the problem is caused by some kind of background sorting going on while the script is running, such that the cc I think I’m inserting in place X is actually getting shifted elsewhere down the line to place Y, and a bunch of them sometimes pile up around note Z. I’m setting just one cc shape (slow start/end) on all cc points so I don’t get any clues from that. Also, I don’t wind up with too few points on any notes. Which, come to think of it, may be a clue that there’s something wrong with my looping logic, such that I’m inadvertently generating extra ccs that are getting shifted down the line and piling up in unpredictable ways.
So I’d like to try the nosort/sort trick to see if that will help. The thing is, Midi_InsertCC doesn’t appear to be one of the commands that support the nosort option. What do y’all think? I don’t mind posting the code if anyone thinks that would help.
Greg