This script was triggered by a discussion in this GX-80 thread:
I now add it in the “Shared Files” category, to make it easier to find for anyone interested. I apologize to those who have already read about it in the original thread.
The zip files also contains a txt with a few info/instructions about installation and use.
The txt file contains the following text:
midipressuretopoly is a little script which converts “Channel Pressure” data (i.e. monophonic aftertouch, which applies to all notes played) to Polyphonic After Touch messages (which contain info about which note they must be applied to). The note to which aftertouch is applied is the last note played.
This idea of pseudo-poly-AT was implemented for the first time (AFAIK) in Cherry Audio’s GX-80 VST plugin. It’s the sort of Columbus’ egg one would have liked to think about first…but I am glad anyway that someone did think about it. My script is a sort of tribute to Cherry Audio ingenuity (though the script probably lacks all the nuances of their implementation).
The script must be loaded into ReaJS (which is part of the ReaPlugs free package: https://www.reaper.fm/reaplugs/) and the MIDI output from your controller has to pass through ReaJS before going to the VST plugin, which in turn should be able to use poly-AT.
To make ReaJS “see” the script, the file midipressuretopoly must be placed into the midi folder of ReaJS (for instance path_to_your_installed_vst_plugins\ReaPlugs\JS\Effects\midi). Then use the “load”
button in ReaJS to load the script with Load->midi->midipressuretopoly.
In short, that’s what the script does:
if a NOTE ON is received, the note is “latched”, a poly-AT=0 is sent for that note (as a reset), the NOTE ON message is forwarded to the midi output (i.e. to your instrument VST); before all that, however, if the “Reset Held Notes” option has been selected, the poly-AT is set to zero for the previously latched note which as a consequences looses the modulation;
if a NOTE OFF is received, a poly-AT=0 is sent for that note; moreover, if the released note is the one latched for poly-AT we reset the latched value (it is set to -1); the NOTE OFF is also forwarded to the midi output
if a CHANNEL PRESSURE message is received and the latched note is not =-1, a poly-AT message is sent for that note (with the value of the pressure taken from the received message) instead of the channel pressure message (which is not transmitted); this last point is of course, THE point of all of this.
I hope you will find this little script useful.
midipressuretopoly3.zip (2.2 KB)