Hi
Aha -- the line,
case 5: inmidi_pitchbend(0, chan, byte1<<7 + byte2 - 8192); break;
should read:
case 5: inmidi_pitchbend(0, chan, (byte1<<7) + byte2 - 8192); break;
should write:
case 6: inmidi_pitchbend(0, chan, byte1 + (byte2<<7) - 8192); break;
Ah.... case 5 mean DxH ( channel pressure), isn't it?