Dup Ver Goto 📝

Midi Force Channel JSFX

PT2/music/reaper-jsfx reaper jsfx midi does not exist
To
75 lines, 252 words, 1509 chars Page 'MidiForceChannel' does not exist.

These two scripts present a single slider to force the midi channel. The point here is that you can then put the slider as a knob on the track control panel to allow you to easily select which midi channel the track outputs to. Then you can send midi all->all and the receiving channel will get midi on that channel (useful for multi-timbral instruments like Ostirus, Kontakt, or Falcon). Or you can send n→m to pick out individual sends.

The second script simply limits the slider to values 1..4, to reduce the granularity of the knob.

rechannel_jda

desc: Midi Rechannel JDA
//tags: MIDI processing filter
//author: John Allsup

// will cause stuck notes if slider is moved while
// notes are playing

slider1:1<1,16,1>Target Channel (1..16)

in_pin:none
out_pin:none

@init

@block

while(
  input = midirecv(ts, m1, m2, m3) ?
  (
    s = m1 & 0xF0;
    c = m1 & 0x0F;
    ( s != 0xF0 ) ? (
      m1 = s | (slider1 - 1); 
      midisend(ts,m1,m2,m3);
    ) : (
      midisend(ts,m1,m2,m3);
    );
  );
);

rechannel4_jda

desc: Midi Rechannel JDA (4 chan)
//tags: MIDI processing filter
//author: John Allsup

// will cause stuck notes if slider is moved while
// notes are playing

slider1:1<1,4,1>Target Channel (1..4)

in_pin:none
out_pin:none

@init

@block

while(
  input = midirecv(ts, m1, m2, m3) ?
  (
    s = m1 & 0xF0;
    c = m1 & 0x0F;
    ( s != 0xF0 ) ? (
      m1 = s | (slider1 - 1); 
      midisend(ts,m1,m2,m3);
    ) : (
      midisend(ts,m1,m2,m3);
    );
  );
);