Help with code for Midi legato playing and pitchbend

PieterP:
What do you expect to happen then?
Please specify all possible cases.

If i use your code in an array will it allow for multiple notes to send PB?