have been playing around with a script that sends an aftertouch message as soon as I play a note on - with the value of the velocity of the note.
Why would you want this?
Was wondering why I don’t get snappy attacks with Linnstrument when directly modulating the VCA of a modular synth plugin via aftertouch. After looking at the midi stream I have an indication now: Before the note on the Linnstrument sends an aftertouch 0. And then the first non-zero aftertouch message at least 10 ms after the note on. I guess the synth is smoothing out the aftertouch value, so I never get attacks below these 10 ms. The idea was now to synthetically add an aftertouch message with GigPerformer directly after the note on. As we are off the USB bus at this point this is possible within the same millisecond. This hopefully improves attacks for synths that do internal smoothing for midi aftertouch. Usually people use ADSRs, so it’s not an issue for them. Not what you want for 3d expression controllers though…).
P.S.: Unfortunately I cannot really test it with the synth I wanted to use (VCV) because the MPE module only understands poly aftertouch Would be nice if we could also send PolyTouch instead of Channel Aftertouch via GPScript (haven’t found such a generator function, event handlers also don’t exist for that).
MIDI messages without the script:
16:44:26.309 channel 16 channel-pressure 0
16:44:26.310 channel 16 note-on C2 68
16:44:26.320 channel 16 pitch-bend 8148
16:44:26.321 channel 16 control-change 74 64
16:44:26.322 channel 16 channel-pressure 19
So the first non zero channel pressure arrives 12 ms after the note on
MIDI messages when the script is active:
17:47:57.601 channel 16 note-on C2 18
17:47:57.602 channel 16 channel-pressure 18
now we get the channel pressure that corresponds the velocity 0-1 ms after the note on. That’s better
midiin2 : MidiInBlock
On NoteOnEvent(m : NoteMessage) from midiin2
velocity : Integer
channel : Integer
aftertouch : AfterTouchMessage
channel = GetChannel(m)
velocity = GetVelocity(m)
aftertouch = MakeAfterTouchMessageEx(velocity, channel)