ReaScripts
ReaScripts copied to clipboard
RS5kM - Choke regression defect in 4.61?
Hi MPL,
I love the ongoing improvement to RS5km.
Maybe I am misunderstanding the intended operation but I feel that there is a regression defect in choking in version 4.61.
I modified the mpl_RS5K_manager_MIDIBUS_choke.jsfx as indicated below and it worked again for me.
desc:RS5K_manager_MIDIBUS_choke
noindex: true
options:gmem=RS5K_manager_choke
slider1:0<0,127,1>src
slider2:0<0,127,1>dest
@init
@block
src = slider1;
dest = slider2;
NOTE_ON = $x90;
NOTE_OFF = $x80;
offset = 0;
while (midirecv(offset,msg1,msg2,msg3)) (
msgchan = msg1 & $xF;
current_note = msg2;
note_status = msg1 & $xF0;
note_status == NOTE_ON && current_note == src ? (
// NOTE_ON on src means send NOTE_OFF to dest
midisend(offset, NOTE_OFF|msgchan, dest);
// Passthrough the original src message
midisend(offset, msg1, msg2, msg3);
) : (
// Passthrough every other message EXCEPT NOTE_OFF on dest
note_status == NOTE_OFF && current_note == dest ? no_op : midisend(offset,msg1,msg2,msg3);
)
);