Dup Goto 📝

Midi Fixed Velocity

PT2/music/reaper-jsfx jsfx midi 11-05 20:38:59
To Pop
34 lines, 85 words, 600 chars Tuesday 2024-11-05 20:38:59

This allows all notes to have their velocity determined by an automation curve. This started life as the stock velocity control jsfx and then had its guts ripped out to make something as simple as possible.

desc:MIDI Fix Velocity JDA
//tags: MIDI processing

slider1:63<1,127,1>Velocity

in_pin:none
out_pin:none

@init

@slider

@block
while (
midirecv(ts,msg1,msg23) ? 
(
  m=msg1&240;
  vel=(msg23/256)|0;
  note=msg23&127;
  m == 9*16 && vel > 0 ? 
  (
    vel = slider1;
    midisend(ts,msg1,note+vel*256); // send note on 
  ) :
  (
    midisend(ts,msg1,msg23); // passthru
  );
);
);