View Single Post
Old 02-08-2018, 10:48 PM   #51
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by pipelineaudio View Post
I seems to only be getting a note off message with this, though its coming on CC28, I'm not seeing any other cc values...I may have the wrong path going as well
The plugin is not supposed to bother about Note On messages at all.

- It propagates all midi input (not on the Control path !!!)
- it checks the input for CC messages that match the midi channel and CC # set in the "input sliders"
- if the CC value of such messages request a reaction (according to your specs and the setting of the other sliders) it outputs Midi CC messages (not to the Control path !!!) on the same Midi channel and the CC # set with the output" slider.
- It shows the input CC value together with the threshold and hysteresis settings, and the output state in a graphic.

I'll do a testing project for you ...

Later...
You are right. Not enough testing ! There was a bug.
here an update:
Code:
desc:Pipe Midi Filter
author: Michael Schnell (mschnell@bschnell.de)
version: 1.0
changelog: initial release
donation: United Nations Foundation http://www.unfoundation.org/
about:
  ## Description
   Pipe
  

  ## Limitations
   Pipe
  





// Author: Michael Schnell, based on a work of Time Waster (M. Smith)
// License: LGPL - http://www.gnu.org/licenses/lgpl.html
//



slider1:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI Channel
slider2:1<0,127,1{0 Bank Sel M,1 Mod Wheel M,2 Breath M,3,4 Foot P M,5 Porta M,6 Data Entry M,7 Vol M,8 Balance M,9,10 Pan M,11 Expression M,12 Ctrl 1 M,13 Ctrl 2 M,14,15,16 GP Slider 1,17 GP Slider 2,18 GP Slider 3,19 GP Slider 4,20,21,22,23,24,25,26,27,28,29,30,31,32 Bank Sel L,33 Mod Wheel L,34 Breath L,35,36 Foot P L,37 Porta L,38 Data Entry L,39 Vol L,40 Balance L,41,42 Pan L,43 Expression L,44 Ctrl 1 L,45 Ctrl 2 L,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64 Hold P sw,65 Porta sw,66 Sustenuto sw,67 Soft P sw,68 Legato P sw,69 Hold 2 P sw,70 S.Variation,71 S.Timbre,72 S.Release,73 S.Attack,74 S.Brightness,75 S.Ctrl 6,76 S.Ctrl 7,77 S.Ctrl 8,78 S.Ctrl 9,79 S.Ctrl 10,80 GP B.1 sw,81 GP B.2 sw,82 GP B.3 sw,83 GP B.4 sw,84,85,86,87,88,89,90,91 Effects Lv,92 Trem Lv,93 Chorus Lv,94 Celeste Lv,95 Phaser Lv,96 Data B. Inc,97 Data B. Dec,98 NRP L,99 NRP M,100 RP L,101 RP M,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127}>CC Input
slider3:2<1,127,1{0 Bank Sel M,1 Mod Wheel M,2 Breath M,3,4 Foot P M,5 Porta M,6 Data Entry M,7 Vol M,8 Balance M,9,10 Pan M,11 Expression M,12 Ctrl 1 M,13 Ctrl 2 M,14,15,16 GP Slider 1,17 GP Slider 2,18 GP Slider 3,19 GP Slider 4,20,21,22,23,24,25,26,27,28,29,30,31,32 Bank Sel L,33 Mod Wheel L,34 Breath L,35,36 Foot P L,37 Porta L,38 Data Entry L,39 Vol L,40 Balance L,41,42 Pan L,43 Expression L,44 Ctrl 1 L,45 Ctrl 2 L,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64 Hold P sw,65 Porta sw,66 Sustenuto sw,67 Soft P sw,68 Legato P sw,69 Hold 2 P sw,70 S.Variation,71 S.Timbre,72 S.Release,73 S.Attack,74 S.Brightness,75 S.Ctrl 6,76 S.Ctrl 7,77 S.Ctrl 8,78 S.Ctrl 9,79 S.Ctrl 10,80 GP B.1 sw,81 GP B.2 sw,82 GP B.3 sw,83 GP B.4 sw,84,85,86,87,88,89,90,91 Effects Lv,92 Trem Lv,93 Chorus Lv,94 Celeste Lv,95 Phaser Lv,96 Data B. Inc,97 Data B. Dec,98 NRP L,99 NRP M,100 RP L,101 RP M,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127}>CC Output
slider4:10<0,127,1>Threshold
slider5:5<0,64,1>Hysteresis
slider6:0<0,500,10>dwell time (msek)
slider7:0<0,1,1{straight,invert}>Output

@init
  out  = 0;
  outo = 0;
  in   = 0;
  delay = 0;
  
@slider
  inChannel   = slider1;
  inCC        = slider2; 
  outCC       = slider3;
  thh         = slider4;
  thl         = thh - slider5;
  dt          = slider6;         
  invert      = slider7;
  thl < 1 ? thl = 1;
  invert ? (
    outh      = 0;
    outl      = 127;
   ) : ( 
    outh      = 127;
    outl      = 0;
  );  
  msg1o       = $xB0 + inChannel;
  
@block
  while (midirecv(offset, msg1, msg2, msg3)) (
    status = msg1 & $xF0;      // Extract message type
    channel = msg1 & $x0F;
    channel == inChannel ? (   // Is it on our channel?
      status == $xB0 ? (       // Is it a controller event?
        msg2 == inCC ? (       // Is it the right CC?
          in = msg3;
          in > thh ? (
            out = outh;
           ) :  msg3 < thl ? (
            out = outl; 
          );  
          out != outo ? (
            outo = out;            
            f = srate / samplesblock;   // calls per second
            f = f * dt / 1000;          // minimum calls        
            f = 0 | f;
            delay = f+1;
          );
        );
      );
    );
    midisend(offset, msg1, msg2, msg3); // pass through
  );    
  delay ? (
    delay -= 1;
    !delay ? (
      outv !=  outo ? (
        outv = outo;
        midisend(offset, msg1o, outCC, outo); // pass through            
      );  
    );   
  );
  
  
@gfx 640 400

gfx_r=gfx_g=gfx_b=0; gfx_a=1;
gfx_x=gfx_y=0;
gfx_rectto(gfx_w,gfx_h);

q1 = gfx_w / 128;

outv>64 ? (
  gfx_r = 1; gfx_g = 1; gfx_b = 0;
  gfx_x = 0;
  gfx_y = 0;
  gfx_rectto(gfx_w, gfx_h/2);
);  

gfx_r=gfx_g=gfx_b=1;

gfx_r = 0; gfx_g = 0; gfx_b = 1;
gfx_x = thh*q1;
gfx_y = 0;
gfx_lineto(gfx_x, gfx_h);

gfx_x = thl*q1;
gfx_y = 0;
gfx_lineto(gfx_x, gfx_h);

gfx_r = 1; gfx_g = 0; gfx_b = 0;
gfx_y = 0;
gfx_x = 1+in*q1;
gfx_lineto(gfx_x, gfx_h);
And a test project:
Code:
<REAPER_PROJECT 0.1 "5.70/x64" 1518156521
  RIPPLE 0
  GROUPOVERRIDE 0 0 0
  AUTOXFADE 1
  ENVATTACH 1
  POOLEDENVATTACH 0
  MIXERUIFLAGS 11 48
  PEAKGAIN 1
  FEEDBACK 0
  PANLAW 1
  PROJOFFS 0 0
  MAXPROJLEN 0 600
  GRID 3199 8 1 8 1 0 0 0
  TIMEMODE 1 5 -1 30 0
  VIDEO_CONFIG 0 0 256
  PANMODE 3
  CURSOR 0
  ZOOM 100 0 0
  VZOOMEX 6
  USE_REC_CFG 0
  RECMODE 1
  SMPTESYNC 0 30 100 40 1000 300 0 0 1 0 0
  LOOP 0
  LOOPGRAN 0 4
  RECORD_PATH "" ""
  <RECORD_CFG
  >
  <APPLYFX_CFG
  >
  RENDER_FILE ""
  RENDER_PATTERN ""
  RENDER_FMT 0 2 0
  RENDER_1X 0
  RENDER_RANGE 1 0 0 18 1000
  RENDER_RESAMPLE 3 0 1
  RENDER_ADDTOPROJ 0
  RENDER_STEMS 0
  RENDER_DITHER 0
  TIMELOCKMODE 1
  TEMPOENVLOCKMODE 1
  ITEMMIX 0
  DEFPITCHMODE 589824
  TAKELANE 1
  SAMPLERATE 44100 0 0
  <RENDER_CFG
  >
  LOCK 1
  <METRONOME 6 2
    VOL 0.25 0.125
    FREQ 800 1600 1
    BEATLEN 4
    SAMPLES "" ""
    PATTERN 2863311530 2863311529
  >
  GLOBAL_AUTO -1
  TEMPO 120 4 4
  PLAYRATE 1 0 0.25 4
  SELECTION 0 0
  SELECTION2 0 0
  MASTERAUTOMODE 0
  MASTERTRACKHEIGHT 0
  MASTERPEAKCOL 16576
  MASTERMUTESOLO 0
  MASTERTRACKVIEW 0 0.6667 0.5 0.5 0 0 0
  MASTERHWOUT 0 0 1 0 0 0 0 -1
  MASTER_NCH 2 2
  MASTER_VOLUME 1 0 -1 -1 1
  MASTER_FX 1
  MASTER_SEL 0
  <MASTERPLAYSPEEDENV
    ACT 0 -1
    VIS 0 1 1
    LANEHEIGHT 0 0
    ARM 0
    DEFSHAPE 0 -1 -1
  >
  <TEMPOENVEX
    ACT 1 -1
    VIS 1 0 1
    LANEHEIGHT 0 0
    ARM 0
    DEFSHAPE 1 -1 -1
  >
  <PROJBAY
  >
  <TRACK {1E672BA9-AE0E-48B5-93F8-D12EC3F1C621}
    NAME ""
    PEAKCOL 16576
    BEAT -1
    AUTOMODE 0
    VOLPAN 1 0 -1 -1 1
    MUTESOLO 0 0 0
    IPHASE 0
    ISBUS 0 0
    BUSCOMP 0 0
    SHOWINMIX 1 0.6667 0.5 1 0.5 0 0 0
    FREEMODE 0
    SEL 1
    REC 0 0 0 0 0 0 0
    VU 2
    TRACKHEIGHT 0 0
    INQ 0 0 0 0.5 100 0 0 100
    NCHAN 2
    FX 1
    TRACKID {1E672BA9-AE0E-48B5-93F8-D12EC3F1C621}
    PERF 0
    MIDIOUT -1
    MAINSEND 1 0
    <FXCHAIN
      WNDRECT 24 52 906 663
      SHOW 4
      LASTSEL 3
      DOCKED 0
      BYPASS 0 0 0
      <JS ix/MIDI_CCRider ""
        0.000000 1.000000 64.000000 64.000000 0.000000 0.000000 0.050000 0.000000 6.000000 1.000000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
      >
      FLOATPOS 0 0 0 0
      FXID {AF94A8BA-F063-4404-B4D8-B33959A5ACB3}
      WAK 0
      BYPASS 0 0 0
      <VST "VST: ReaControlMIDI (Cockos)" reacontrolmidi.dll 0 "" 1919118692
        ZG1jcu5e7f4AAAAAAAAAAOkAAAABAAAAAAAQAA==
        /////wAAAAAAAAAAAAAAAAkAAAAMAAAAAQAAAP8/AAAAIAAAACAAAAAAAAA4AAAAQzpcVXNlcnNcbXNjaG5lbGxcQXBwRGF0YVxSb2FtaW5nXFJFQVBFUlxEYXRhXEdN
        LnJlYWJhbmsAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAABNYWpvcgANAAAAMTAyMDM0MDUw
        NjA3AAEAAAAAAAAAAAAAAAAKAAAADQAAAAEAAAAAAAAAAAAAAAAAAAA=
        AAAQAAAA
      >
      FLOATPOS 0 0 0 0
      FXID {6E414F4B-8730-45E4-8162-53A33A8D07C7}
      WAK 0
      BYPASS 0 0 0
      <JS test/pipe ""
        0.000000 1.000000 2.000000 10.000000 5.000000 0.000000 0.000000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
      >
      FLOAT 1066 116 656 649
      FXID {BCAFC157-67D1-4109-8982-89E583D7A3EA}
      WAK 0
      BYPASS 0 0 0
      <VST "VST: ReaControlMIDI (Cockos)" reacontrolmidi.dll 0 "" 1919118692
        ZG1jcu5e7f4AAAAAAAAAAOkAAAABAAAAAAAQAA==
        /////wAAAAAAAAAAAAAAAAMAAAAEAAAAAAAAACUAAAB/AAAAQAAAAAAAAAA4AAAAQzpcVXNlcnNcbXNjaG5lbGxcQXBwRGF0YVxSb2FtaW5nXFJFQVBFUlxEYXRhXEdN
        LnJlYWJhbmsAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAABNYWpvcgANAAAAMTAyMDM0MDUw
        NjA3AAEAAAAAAAAAAAEAAAAEAAAABQAAAAIAAAAAAAAAAAAAAAAAAAA=
        AAAQAAAA
      >
      FLOATPOS 0 0 0 0
      FXID {0720C246-7019-4077-A374-6977599F30E7}
      WAK 0
    >
  >
  <EXTENSIONS
  >
>
Watch the sliders in the bottom half of the second ReaControlMidi innstance to see the working of the "Pipe Filter".

-Michael

Last edited by mschnell; 02-08-2018 at 11:21 PM.
mschnell is offline   Reply With Quote