Witti made a great set of jsfx plugin's one of which is called 'gate_midi' in effects/witti/dynamics
You can make a gate track with this it has attack and release parameters to avoid clicks and can be set up very easily and mapped to a midi note.
The 'range of the gate' described in the video can be defined by the note length and position on the grid.
Not that easy to find so here's the link.
https://stash.reaper.fm/v/25168/js_plugins.zip
'gate_midi' in effects/witti/dynamics