The problem is that we need to distinguish 127's that are genuine data from those that aren't, which means knowing what the previous values were. We can then check if a 127 is likely genuine (previous value large) or unlikely (previous value small), so we can reject a 127 after a 0 as 'impossible' operator input. In fact, rather than reject it, I retransmit it as a zero value (just to make sure!). The solution below uses a script in LUA to do that. The script is loaded into the VSTLua client (available here - ).
VSTLua is loaded into an instance of the Cantabile Lite VST host, and Pianoteq is loaded into the host's rack immediately following, so that Pianoteq gets the MIDI stream via VSTLua. VSTLua scripting can be done in any plain text editor, and loaded into the client as described in the link above.