Muting channels with Mainstage while preserving polyphony

A user on the keyboard corner posted a cool tip about the note modifier plugin. By making it map note events to off (i.e. nothing) you can mute a channel by stopping note events from getting there. This worked well until Mainstage 3.3 which was just released. I tried a number of work arounds but finally settled on the scripter plugin. All you need to do is add a scripter plugin, paste this code in, save and assign your scripter to this script. When the scripter is active, it will mute all note on events. When bypassed, everything is normal. It works very well. Here is the script:

// only get rid of note on events, send everything else.
if (event instanceof NoteOn)