Custom_Gate: A hard midi startgate and retrigger blocker

This midi machine contains a harder midi noise gate and a retrigger-blocker.
Those 2 function can help greatly to create cleaner midi if you specifically need that.

-Startgate: Only notes with velocity higher than this will start.
-MinimalRetrigger_ms: the minimal number of milliseconds for a note to be able to retrigger.

Custom_Gate.lua (2.5 KB)


Here a short example with the CustomGate running in MIDI Bass.

Hi Paul,
sounds like I could use that, but how to install it? .lua file??


how to install a script is here:

I did this with success and would like to know if there are any more midifx that eliminate retriggers or random notes?

this script has basically all fixes possible at the script level (there are impossibles ones I’ve tried, believe me…)
With 1 exception: if you play piano like intstruments and suffer from the “when I release a fretted note with the fret finger first, a note half step down sounds” problem.
For that problem you can:
a) release the note closer to the fret, to make the release note the same as the fretted note.
b) train to mute the string with your opicking hand, before release.
c) tune your guitar 20-25 cents higher ( this will not be accurate for bends ofcourse )
d) maybe I (or someone else) come(s) up with a script for that someday, it should theoretically be possible.

1 Like

I just found the Custom Gate. Awesome.

Can you modify it to add a control that retriggers say very 1/16 note, 1/8 note … up to 1/1 (whole note), instead of the time based re-trigger?

The MIDI clock is 24 ppq so the counting should not be too CPU heavy.



Can you make it so that the startgate be seperate from the retrigger blocker? :stuck_out_tongue:

1 Like

MG is not aware of host tempo, so there can be also no script on relative note lengths.

I dont know what you mean exactly… the startgate is allready independent from the retrigger blocker. Once a note is started, the retrigger blocker is on its guard.

Yes, but what I mean is that you can’t lower the value of the retrigger blocker to 0ms or just disable it and only use the startgate

no way MG retriggers a note within 1 ms and this ms is rounding anyway to frame durations, so the 1 is basically 0

Something has to be going on though, here’s some screenshots I made of the midi I recorded playing steady notes with and without the custom gate.

Without: Screenshot by Lightshot
With: Screenshot by Lightshot

Settings used on the custom gate:
Retrigger: 1ms
Startgate: 20

All the note velocities were well above 20
In the second screenshot you can see that there’s a lot of missing notes compared to the first one

Paul thanks for this. I’m wondering if midi scripts like this are active when MG2 is being used as a plug in within a DAW? I understand from a reply below it needs to be installed in the standalone version but does it persist after that when used as a plug in?

Hi David!
Yes, the lua scrips functions you add to the MIDI Guitar software in standalone mode will appear also in plugin mode (in the MIDI Machines/MIDI Fx slot). But you can add it to the plugin version as well if I am not completely mistaken. Here is how I do it:

Great, thanks, I will give it a go.

1 Like