This script prevents the same midi note from playing twice in a row. In the event that the same midi note is input twice in a row there are three actions that can take place, selected by the MODE knob: 1) Block, 2) Last Unique, and 3) Random. In Block Mode all repeated notes are blocked and only the first note will sound. In Last Unique Mode the most recent unique note before the repeated note will play. In Random Mode a random note in the scale and key selected by the SCALE and KEY knobs will play in place of the repeated note(s). Be aware that this script will not work with chords.