it only works properly when i'm playing single notes.
When i begin to play chords which could be from 2 - 10 notes at the same time it triggers the macro that amount of times, when i only want it to trigger Once.
So if i play a 3 note chord, the macro is triggered 3 times. not once.
The speed is important -- a Semaphore Lock doesn't stop a second (or third, or fourth...) instance of your macro from triggering, it just pauses its execution until the lock is released. By setting the shortest timeout possible the second instance will trigger, see the semaphore lock, pause, then time out and quit.