I have normally managed chord recognition by keeping intervals rather than explicit notes. In GPScript you can write something like
major : integer array
minor : integer array
majorSeventh : integer array
major = [1, 5, 8]
minor = [1, 4, 8]
majorSeventh = [1,4,8,12]
You could then use a FOR loop and the SendLater function inside a NoteEvent callback to generate arpeggios.
However, it seems to me that the kind of thing you’re trying to do can better be done with MIDI plugins that can do arpeggios, something like Sugar Bytes Thesys or BlueARP (http://graywolf2004.net/wp/). I’m not saying that it couldn’t be done by writing scripts but writing scripts just seems like a very hard way to do something that might easily be accomplished with plugins.
So far, (and this could certainly change), I’ve been aiming to use GPScript to do things that are NOT really feasible with plugins, for example to control widgets which then control parameters. So for example, in a normal synth, you can generally only apply keyboard follow to the filter cutoff. But if you use a note value to control a widget position or a specific plugin parameter, then you could use keyboard follow to control anything.
Similarly, there is a notion of a function generator, which includes an ADSR function. So you can use that to apply ADSR to ANY parameter of a plugin, e.g.
Here’s a little movie I just put together to demonstrate this.
Note - this is an unlisted video, please do not share.
And here’s the script I used