MIDI translation - perhaps like "Disklavier XP"?

Here’s a little reaJS script that should do the trick:

desc:MIDI AT to note
//tags: MIDI processing filter
//author: Torsten


@init

NOTE_OFF = 8;
NOTE_ON = 9;
AFTERTOUCH = 10;

@block

   while (midirecv(mpos,msg1,msg2,msg3)) (
      statusHi = (msg1/16)|0;
      statusLo = (msg1-(statusHi*16))|0;
     
      // now check for poly aftertouch = 0
      statusHi == AFTERTOUCH && msg3 == 0 ? (
         statusHi = NOTE_OFF; // convert to note off
      );

      // check poly aftertouch > 0
      statusHi == AFTERTOUCH ? (
         statusHi = NOTE_ON;
         msg3 = 1; // note on with minimal velocity
      );
      midisend(mpos,statusHi*16|statusLo,msg2,msg3); 
  ); // while loop

midi_AT_to_note.zip (490 Bytes)

Once you’ve installed reaJS (part of the free reaPlugs plugin suite), put the script file from the zip into the /midi script directory and load it inside reaJS (Here’s how to find the reaJS script directory).

Route the MIDI input from your piano to reaJS, then from reaJS MIDI output to your VSTi of choice. This should convert poly aftertouch to note-on and note-off commands and pass everything else through unchanged. You might want to review the reaJS output with the MIDI monitor.

Let me know if this works!

Cheers,

Torsten

1 Like