Old 01-22-2016, 07:28 AM   #1
jimbobbley
Human being with feelings
 
Join Date: Nov 2011
Posts: 62
Default JS Midi Note Filter plugin - now it blocks CCs?

Hi all


I've noticed since upgrading from Reaper 4.7xx to 5.11 that the JS Midi Note Filter now seems to block all CC data as well as the notes you set in the interface.

Can anyone confirm this independently? I can't see why the behaviour would've changed, but it even stops a ReaControl MIDI instance before it in the chain when you've got track envelopes and automation and so forth.

It's a bit of a pain as I now have to re-order plugins in about 40 projects I use for live performance.. if anyone has a fix or a suggestion I'd be very grateful to hear it!

Best wishes

J.
jimbobbley is offline   Reply With Quote
Old 01-23-2016, 02:07 AM   #2
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: Holland
Posts: 2,773
Default

Confirmed! Really weird, because I had a quick look at the source code, but I don't see any obvious reasons for this to happen, which to me suggests that this issue is bigger than just JS: MIDI/midi_note_filter.

EDIT: I guess I should have looked better (and/or had coffee first). Found and fixed it (I think):

Code:
desc:MIDI Note Filter
//tags: MIDI processing filter
//author: Unknown

//slider1:0<-0,127,1{0: C-2,1: C#-2,2: D-2,3: D#-2,4: E-2,5: F-2,6: F#-2,7: G-2,8: G#-2,9: A-2,10: Bb-2,11: B-2,12: C-1,13: C#-1,14: D-1,15: D#-1,16: E-1,17: F-1,18: F#-1,19: G-1,20: G#-1,21: A-1,22: Bb-1,23: B-1,24: C0,25: C#0,26: D0,27: D#0,28: E0,29: F0,30: F#0,31: G0,32: G#0,33: A0,34: Bb0,35: B0,36: C1,37: C#1,38: D1,39: D#1,40: E1,41: F1,42: F#1,43: G1,44: G#1,45: A1,46: Bb1,47: B1,48: C2,49: C#2,50: D2,51: D#2,52: E2,53: F2,54: F#2,55: G2,56: G#2,57: A2,58: Bb2,59: B2,60: C3,61: C#3,62: D3,63: D#3,64: E3,65: F3,66: F#3,67: G3,68: G#3,69: A3,70: Bb3,71: B3,72: C4,73: C#4,74: D4,75: D#4,76: E4,77: F4,78: F#4,79: G4,80: G#4,81: A4,82: Bb4,83: B4,84: C5,85: C#5,86: D5,87: D#5,88: E5,89: F5,90: F#5,91: G5,92: G#5,93: A5,94: Bb5,95: B5,96: C6,97: C#6,98: D6,99: D#6,100: E6,101: F6,102: F#6,103: G6,104: G#6,105: A6,106: Bb6,107: B6,108: C7,109: C#7,110: D7,111: D#7,112: E7,113: F7,114: F#7,115: G7,116: G#7,117: A7,118: Bb7,119: B7,120: C8,121: C#8,122: D8,123: D#8,124: E8,125: F8,126: F#8,127: G8}>Lowest Key
//slider2:0<-0,127,1{0: C-2,1: C#-2,2: D-2,3: D#-2,4: E-2,5: F-2,6: F#-2,7: G-2,8: G#-2,9: A-2,10: Bb-2,11: B-2,12: C-1,13: C#-1,14: D-1,15: D#-1,16: E-1,17: F-1,18: F#-1,19: G-1,20: G#-1,21: A-1,22: Bb-1,23: B-1,24: C0,25: C#0,26: D0,27: D#0,28: E0,29: F0,30: F#0,31: G0,32: G#0,33: A0,34: Bb0,35: B0,36: C1,37: C#1,38: D1,39: D#1,40: E1,41: F1,42: F#1,43: G1,44: G#1,45: A1,46: Bb1,47: B1,48: C2,49: C#2,50: D2,51: D#2,52: E2,53: F2,54: F#2,55: G2,56: G#2,57: A2,58: Bb2,59: B2,60: C3,61: C#3,62: D3,63: D#3,64: E3,65: F3,66: F#3,67: G3,68: G#3,69: A3,70: Bb3,71: B3,72: C4,73: C#4,74: D4,75: D#4,76: E4,77: F4,78: F#4,79: G4,80: G#4,81: A4,82: Bb4,83: B4,84: C5,85: C#5,86: D5,87: D#5,88: E5,89: F5,90: F#5,91: G5,92: G#5,93: A5,94: Bb5,95: B5,96: C6,97: C#6,98: D6,99: D#6,100: E6,101: F6,102: F#6,103: G6,104: G#6,105: A6,106: Bb6,107: B6,108: C7,109: C#7,110: D7,111: D#7,112: E7,113: F7,114: F#7,115: G7,116: G#7,117: A7,118: Bb7,119: B7,120: C8,121: C#8,122: D8,123: D#8,124: E8,125: F8,126: F#8,127: G8}>Highest Key

slider1:21<0,127,1>Lowest Key (MIDI Note #)
slider2:108<0,127,1>Highest Key (MIDI Note #)

@init

NOTE_OFF = 8;
NOTE_ON = 9;

was_filtered = 1024;  // array for storing which notes are filtered

@block

  while (
    input = midirecv(mpos, msg1, msg23);
    input  ? (
      statusHi = (msg1/16)|0;
      statusLo = (msg1-(statusHi*16))|0;

      data2 = (msg23/256)|0;
      data1 = (msg23-(data2*256))|0;
     
// .... for Note Ons
      statusHi == NOTE_ON && data2 > 0 ? (
          filter = (data1 < slider1 || data1 > slider2); 
          (!filter) ? ( 
              midisend(mpos, msg1, msg23);
          ):(
              was_filtered[data1] = 1;
          );
      ) :

// .... for Note Offs
      statusHi == NOTE_OFF || (statusHi == NOTE_ON && data2 == 0 ) ? ( 
          was_filtered[data1] ? ( 
              was_filtered[data1] = 0;
          ):(
              midisend(mpos, msg1, msg23);
          );
      ) : (
        midisend(mpos, msg1, msg23);
      );
    );
    input;
  );
I don't think this was recently changed though, but I might br wrong (again)...

Last edited by Tale; 01-23-2016 at 02:13 AM.
Tale is offline   Reply With Quote
Old 01-29-2016, 08:46 AM   #3
jimbobbley
Human being with feelings
 
Join Date: Nov 2011
Posts: 62
Default

great - thanks!
jimbobbley is offline   Reply With Quote
Old 01-29-2016, 02:33 PM   #4
Arran
Human being with feelings
 
Join Date: Aug 2012
Location: Bolton, UK
Posts: 182
Default

Thanks, I'd just encountered this problem and I was convinced it was just me.
Arran is offline   Reply With Quote
Old 02-25-2016, 01:00 AM   #5
Cableaddict
Human being with feelings
 
Join Date: Apr 2008
Posts: 1,687
Default

Excellent, thanks!

- But what do we do with this? Copy it to a text file or something?




Also: Can we assume that this will be automatically fixed in future versions of Reaper?
Cableaddict is offline   Reply With Quote
Old 02-25-2016, 01:37 PM   #6
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 1,089
Default

@Cableaddict

1) Watch this video: http://forum.cockos.com/showthread.php?t=173368
2) It is already, in v5.15.
cfillion is online now   Reply With Quote
Old 02-25-2016, 04:29 PM   #7
Cableaddict
Human being with feelings
 
Join Date: Apr 2008
Posts: 1,687
Default

It is NOT fixed in v 5.15 !!!!!!!!!!!

(And yes, I manually dumped the old ones first, since they would not be automatically replaced with the new install.)
------------

Copying the above text doesn't work, either. - Perhaps @Tale made an error?
================================================== ===========


PLEASE - I need someone to do something about this, immediately.

I can't do live gigs without this plugin. Literally. I had one yesterday that was a disaster.

Last edited by Cableaddict; 02-25-2016 at 04:36 PM.
Cableaddict is offline   Reply With Quote
Old 02-25-2016, 04:36 PM   #8
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 1,089
Default

Do you see the new "Other event (CC, etc) pass through" option? You must set it to Yes to unblock the CC events.

I posted a screenshot of the updated FX in your thread: http://forum.cockos.com/showthread.p...96#post1643696
cfillion is online now   Reply With Quote
Old 02-26-2016, 06:08 AM   #9
Cableaddict
Human being with feelings
 
Join Date: Apr 2008
Posts: 1,687
Default

Quote:
Originally Posted by cfillion View Post
Do you see the new "Other event (CC, etc) pass through" option? You must set it to Yes to unblock the CC events.

I posted a screenshot of the updated FX in your thread: http://forum.cockos.com/showthread.p...96#post1643696


Thanks, that was it !


- Pretty silly for them to make "no" the default, though. Someone should change that, otherwise change the name of the plugin.

Also, very odd that the high range defaults to 108. It should be 127.

Last edited by Cableaddict; 02-26-2016 at 06:14 AM.
Cableaddict is offline   Reply With Quote
Old 02-26-2016, 06:29 AM   #10
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 18,398
Default

Quote:
Originally Posted by Cableaddict View Post
Also, very odd that the high range defaults to 108. It should be 127.
Not odd at all. It's the highest note on the piano (and 21 is the lowest).
EvilDragon is offline   Reply With Quote
Old 06-03-2016, 05:39 AM   #11
Timski
Human being with feelings
 
Join Date: Sep 2008
Posts: 19
Default Cable Addict

If you want to do Tale's fix you go to the plugin, press "edit" then delete all the text (which is the source code) and replace it with Tale's new text.
You then click Save to recompile the effect. I tried this and it worked great for all instances of the effect in my system (still on reaper 4.78 for gigs).

Technically this has been fixed by adding a new slider in this effect under reaper 5.201, but it defaults to blocking the CCs, pitch bend and modulation.
This means you have to change this slider in EVERY instance of the effect that you have used.
Much better to edit the source code and change it in all cases all at once.

Hope that helps

Timski
Timski is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:25 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.