AutoSustainer and Chord Recognition with GP Script

So, at this point I need some help please.

I’ll preface by saying that I’m using an EWI 4000S as controller, The way note messages are sent is different from a keyboard controller. Playing C3 to D3, for example: a C3 “note on” at velocity >0 is sent, followed by a D3 “note on” at velocity >0, followed by a C3 “note off” (some would say “note on”) at velocity 0. I observe this in the Midi Monitor app on my Mac. I don’t know if this has any bearing on the way the AutoSustainer script is interpreting the midi stream, maybe someone can enlighten me.

Connecting the midi monitor in GP to the output of the AutoSustain script shows the following transformation of EWI input:
Playing legato, without a new breath attack, from C3 to D3 shows two “note on” events and no “note off” such that the event list for a trill, say slow 16ths for example, shows no "note offs until an attack is performed. I compared this to an event stream passing through the script from a keyboard and, as expected, a “note off” for the sustained note precedes each new “note on”. Please don’t be mislead by the reference to sixteenths, it is a simple example, I need sustained notes.

The result is always at least one hanging note which I am obliged to kill/restart with an attack.

My objective here is to have moving sustained notes on multiple channels creating pads under a lead line on a different channel, all controlled with a monophonic controller. I am having good success with multiple iterations of the MidiChords plugin in this regard, except for this bug.

All this to ask: could someone suggest simple mod to the AutoSustain script to fix this? This, for the moment, is beyond my understanding of the language.

Thanks

The Autosustain scriptlet sends NoteOff events of all “hanging” notes when a NoteOn event is received and no key is pressed at that time. (i.e. all NoteOffs of the “hanging” notes have been received.) Otherwise all NoteOffs are ignored.

@dhj I watched your video on your Chord Recognizer, but I did not see the GP script attachment. Did you or would you post it plz?

Does this help?