I have a couple of other solutions to this issue, probably due to the electronics in the VMK188plus not de-bouncing the pedal properly. What happens is that when the pedal is lifted off and the MIDI data values approach the limit (0 or 127), inexplicably a rogue value of the other limit (127 or 0) is sent. So if the pedal is controlling a piano sustain, suddenly the sound goes to max sustain just when you lift your foot off.
The RPU-3 is a nice unit, capable of transmitting the full range [0,127] of values. Not only is it a great treat in Pianoteq (with sostenuto, Satie sounds wonderful), but it has potential as a versatile MIDI controller for other instruments (such as Sample Modeling's tasty Ms. Sax S).
One solution I devised uses virtual MIDI cables to route the MIDI data into the MIDIox utility (Windows). It's rather confusing, and I succeeded only in converting the MIDI channel number of the pedal controller data value of 127 to another MIDI channel. This is fine for Pianoteq, as you can have it listen on a different MIDI channel, so the 127's are ignored. Unfortunately it doesn't address the problem, is messy, and in different set-ups could be a hidden gotch-ya.
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 - http://www.hermannseib.com/VstLua/index.html). 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. Despite the version number, this script seems stable.
----------------------
--fix Roland RPU-3 pedals to suppress rogue output
-- specious 127 controller data values generated when pedal comes up to rest position
-- method: check data stream for the successive values of 0, 127 (ie 'impossible' operator input)
-- unfortunately 127 may be emitted when the previous value is > 0 and <= 15, at least for my pedals
vprint("\nDebounce Roland RPU-3 pedal unit \n")
vprint("\tkills rogue value of 127 emitted when pedal is lifted off\n")
pedals = {64, 66, 67, 69} -- MIDI codes for pedals - change to suit
lastdata = {0, 0, 0, 0} -- store the previous data value. The size of this list = size of pedals list
bounce = 15 -- if your pedals need less de-bouncing, reduce this
function midiEventCb(midiEvent) -- DO NOT CHANGE THIS FUNCTION'S NAME
if (midiEvent.type==midi.cc) then
local n = ispedal(midiEvent.byte2)
if (n>0) then -- it's one of our pedals
if (midiEvent.byte3==127) then -- and could be rogue
if (lastdata[n] > bounce) then -- but probably ok if outside bounce limit
lastdata[n] = midiEvent.byte3
sendMidi(midiEvent)
else -- in bounce range --> assume pedal is up
midiEvent.byte3 = 0
sendMidi(midiEvent)
lastdata[n] = 0
end
else
lastdata[n] = midiEvent.byte3
sendMidi(midiEvent)
end
else
sendMidi(midiEvent)
end
else
sendMidi(midiEvent)
end
end
function ispedal(x)
local ndx = 0
for k=1, table.getn(pedals) do
if (pedals[k] == x) then
ndx = k
break
end
end
return ndx
end
--------------------
The first thing to note is that it is worse than we thought (!). It turns out that rogue 127's can be preceded by numbers other than 0 - for my combination of keyboard/pedals that can be as high as 15. The identifier 'bounce' in the script sets this as an upper limit. You can change this to suit - operate the pedals and observe in Pianoteq's MIDI monitor window what values precede the rogue 127's.
Second, the script hard-codes the standard MIDI controller numbers for pedals. If you prefer to use different MIDI controller numbers, use can substitute them in the bracketed list. Also, if you have only 1, 2 or 3 pedals, you need only put 1, 2 or 3 numbers in that list - it will also make the script a little faster. (How much I don't know - I haven't benchmarked anything here).
If you decide to edit the pedal controller numbers list **you must edit the lastdata{} list also**. Both lists must have the same number of items in them.
Enjoy!