This script works to squash midi loop ghosting. if your sound source is also your controller and you record it into a sequencer, likelyhood is while recording you will hear notes doubled up/double loud.
Outgoing notes are compared to Incoming and if they are the same the note is killed.
There are no settings, just route correctly.
Routing (using Koala as example);
Koala > GhostWatch > Sequencer > GhostKill > Koala