OK, so you don't have a keyboard with Poly Aftertouch!

After playing around with various versions of PolyAT generators, I have discovered that Piano Paul’s Script works best for me … but as a scriptlet. Here it is as I translated the script into a scriptlet. In my scriptlet (Piano Paul’s code essentially), I added a 30 boost for more attenuation. You can change this value in the code or omit this portion of the code entirely. The only difference between the script and the scriptlet is that the scriptlet does not need to reference a MIDI block as it sits between a MIDI Block and a plugin or in my case a Hydrasynth Desktop. OK, here is the scriptlet code:

var nn  : Integer
var ptm : PolyTouchMessage
var aftertouchBoost : Integer := 30
var aftertouchValue : Integer


//Called when a NoteOn message is received at some MidiIn block
On NoteOnEvent(m : NoteMessage) 
 nn = GetNoteNumber(m)
 SendNow(m)
End

//Called when a NoteOff message is received at some MidiIn block
On NoteOffEvent(m : NoteMessage) 
 SendNow(m)
End

//Called when an aftertouch (channel pressure) message is received at some MidiIn block
On AfterTouchEvent(m : AfterTouchMessage) 
aftertouchValue := GetAfterTouchValue(m) + aftertouchBoost
ptm = MakePolyTouchMessage(nn, aftertouchValue)

 SendNow(ptm)
End

(edited by @schamass as mod: used the “code format” for better readability)

4 Likes