Working with ChordRecognizer

Maybe this?

In the script functions, I believe the relevant ones are under NoteManagement:
https://gigperformer.com/docs/GPScript36/content/reference/list-of-functions.html#notemanagement

Depending on what you want to do, of course, but the free pizMidi chord analyser plugin is handy;

https://code.google.com/archive/p/pizmidi/downloads