@block
while (midirecv(offset,msg1,msg2,msg3)) (
   type = msg1&240;
   type == 144 || type == 128 ? midisend(offset,msg1,msg2,msg3);
);