PDA

View Full Version : JSFX for auto engaging fx


pipelineaudio
02-04-2018, 09:30 PM
I'd like to create something to automatically engage an effect when a pedal is moved a certain way. For instance, I would like moving a pedal past 10 to unbypass a wah. Once it is on, the same pedal should control the wah's position

Going under 11 would turn the wah back off (idealy there would be a bit more to it than this,but

Can anyone make something like this based on the psudocode below?


Sliders:
inCC // the cc# you want as a control
outCC // the cc# you want to send the output date to
threshold //checks the level of inCC. If inCC <=10 then outCC sends 0 to the cc# specified in outCC.
//IF inCC > 10 then outCC sends 127 to the cc# specified in outCC.

mschnell
02-04-2018, 10:56 PM
Easy to do such a switcher JSFX, if you do the pin routing correctly.

e.g. (for a stereo effect):
- set the track to four channels
- use any effect "above" your effect
- do the pin routing for same: output 1 to channel 1+3, output 2 to channel 2+4
- standard pin routing for your effect effect: channel 1+2 to input 1+2, output 1+2 to channel 1+2
- do the pin routing for the switcher JSFX: input 1,2,3,4 to channels 1,2,3,4, output 1+2 to channel 1+2

Now the switcher JSFX can simply switch (or pan if you like that better) between it's effect (channels 1+2) and clean (=sidechain = channels 3+4) inputs.

Is that what you have in mind ?

A "naive" switcher JSFX would be just some five lines of code. But hard switching might create a harsh noise when switching. Hence it might be appropriate do do a cross-fading.

My "Midi Volume control" (available in ReaPack, including Documentation) provides all the basics for this.


//IF inCC > 10 then outCC sends 127 to the cc# specified in outCC.
Or do you want just a midi filter and some other functionality is supposed to do the actual audio switching ?

I suppose there are JSFXes in Reaper's stock effects that can do such a CC function.

OTOH, if you want to use some VST (automation) parameter of some effect, Reaper provides imposing a function between the CC input and the parameter output that can be set to be very steep and hence do an on/off switching.

-Michael

pipelineaudio
02-04-2018, 11:26 PM
***edit***

Thinking about it more, it seems it would be most handy to just have this over MIDI, though I'd like to learn how to use it to switch pins.

It should send the new CC while passing the old CC through unmolested, and passing thru any other cc's on the new cc's number unmolested as well (or perhaps have an option to block any original data that came in over the new cc's number)

pipelineaudio
02-05-2018, 01:29 AM
I am able to get this working sort of by using parameter modulation, scale and offset, though it doesnt work so well for sliders

mschnell
02-05-2018, 08:34 AM
I am able to get this working sort of ...
What final goal do you have in mind ?

-MJichael

pipelineaudio
02-05-2018, 04:15 PM
I think it will be easier if every time I ask about things, you don't assume I mean something other than what I am saying. I may have reasons for wanting certain things to happen, that don't necessarily mean something other than what I mean.

I like that you are helping to find alternate suggestions because that is making things far easier than doing it exactly my way would have, but sometimes its as simple as it sounds.

1. take a value from a MIDI CC#x
2. if that value is say 10 or less, send value 0 to CC#y
3. if that value is say 11 or more, send value 128 to CC#y

there could be a lot of cool options to make this work better, but this is the basics.

I'm able to do this somewhat with parameter modulation/midi link, but its a bit sketchy

pipelineaudio
02-05-2018, 10:10 PM
The JS FX "MIDI CC Mapper" looks like itll do the cc# switch, but I cant figure out what else it does...I want to learn by first stripping out everything but the CC Mapping...I'm not sure what "mpos" means and its not in the JS reference


while (
midirecv(mpos, msg1, msg23) ? (
status = msg1;
statusHi = (msg1/16)|0;
statusLo = msg1-(statusHi*16);
msg3 = (msg23/256)|0;
msg2 = msg23-(msg3*256);
(statusHi == CC_MSG && msg2 == ccsrc) ? (
passthru ? midisend(mpos, msg1, msg23);
msg2 = cctgt;
msg3 = max(msg3, clamplo);
msg3 = min(msg3, clamphi);
msg23 = (msg3*256+msg2)|0;
);
midisend(mpos, msg1, msg23);
);
);

mschnell
02-05-2018, 10:34 PM
ying. I may have reasons for wanting certain things to happen, that don't necessarily mean something other than what I mean.
That is why I provided two different answers at the same time to the original question above, as to me it was not clear what exactly you were asking for: something that outputs Midi or something that processes audio, both of which would provide solutions for the task you described. (As well parameter modulation is a possible option.) It's nice to see how Reaper is versatile enough to provide tons of options.

I like ... find alternate suggestions ...
This might also just add to confusion :) . But of course trying out stuff is a good thing.

-Michael

mschnell
02-05-2018, 10:44 PM
I'm not sure what "mpos" means
AFAIU:
In Reaper, timing-wise, a Midi message is associated to the audio block of samples in which's timing range it happens to be generated. It never is associated to a single sample. That is why, in a JSFX, it does not make sense to do Midi work in an @sample rather than in an @block event.

Now the mpos variable in the Midi receive and send functions provides the sample-accurate positioning of the Midi message within that block of samples.

For stuff like patch changes you simply can pass it through between receiving ans sending.

(For better readability please post any code in a "[ code" ... "[ / code" block. )

-Michael

Time Waster
02-06-2018, 07:18 PM
Can anyone make something like this based on the psudocode below?


Sliders:
inCC // the cc# you want as a control
outCC // the cc# you want to send the output date to
threshold //checks the level of inCC. If inCC <=10 then outCC sends 0 to the cc# specified in outCC.
//IF inCC > 10 then outCC sends 127 to the cc# specified in outCC.

As it happens, I'm currently working on an FX which will be able to do this (as well as some other stuff). I should have something ready to post in a few days if you can wait.

pipelineaudio
02-07-2018, 02:03 AM
Awesome! I waited 46 years, what's another few days?

mschnell
02-07-2018, 12:00 PM
Awesome! I waited 46 years, what's another few days?
If I would have been able to understand what exactly you want I maybe would already have done this some days ago :)

-Michael

pipelineaudio
02-07-2018, 02:35 PM
I think the simplest form would be

Slider 1=MIDI CC#x for input

Slider 2=MIDI CC#y for output

Slider 3="Threshold" Takes the value from CC#x. values above this slider setting send value 127 of CC#y to output. Values below this slider send value 0 of CC#y to output.

cc#X should pass to the output unaffected

---------------------------------------------------------------------------------

More ideal version:

Same as above but, Slider 3="On Threshold" Takes the value from CC#x. values above this slider setting send value 127 of CC#y to output.

Slider 4="Off Threshold" Takes the value from CC#x. IF current state of cc#y is 127, then values below this slider setting send value 0 of CC#y to output.

This way can create an overlap or dead zone. So that it could require a lower value to turn the effect on than off, especially for a wah wah or divemomber, this would let you rock the pedal pretty hard without worrying about turning the effect off accidentally.

Slider 5="dwell time" this sets the minimum time in msec that CC#x has to be below the value set in slider 4 before a value of 0 is sent by CC#y to the output. This will further reduce the chances of accidentally turning the effect off

Slider 6=Inverts CC#y's output

mschnell
02-07-2018, 03:01 PM
I suppose a midi channel slider should be provided.

I'll take a look.

-Michael

pipelineaudio
02-07-2018, 03:39 PM
I suppose a midi channel slider should be provided.

I'll take a look.

-Michael

Oh yeah! Good thinking!!!

This is the kind of stuff I miss and then wonder why things don't work :)

Time Waster
02-07-2018, 06:38 PM
I've uploaded a beta version of the FX I mentioned to the stash: https://stash.reaper.fm/v/32891/TimeWaster_ReaRack2%20Nonlinearizer.jsfx

https://stash.reaper.fm/32892/NonLin2.PNG

This FX remaps MIDI data to either a bezier curve function or a step function. Either velocity, note value or CC value can be remapped. Remapped CCs can be sent to another CC number if desired. The GUI is interactive. Adjust values by moving the control points. Double clicking the green control point resets the curve. Pressing the 'a' key while dragging the green control point constrains the movement to orthogonal axes. Double clicking the the red end points toggles the end conditions from input = output to static output.

If set up as per the above screenshot, it should do what was requested by the OP.

This FX works with hi res MIDI, but will also work with a single CC number. An output value of 1 corresponds with an MSB CC value of 127.

Time Waster
02-07-2018, 07:00 PM
A bit OT for this thread perhaps: The screenshot below shows the FX set up with a bezier curve function. The end points have been moved. The lower end condition is a static output and upper end condition is input = output.

You can chain a series of these FX to produce a complex curve (e.g. an 'S' curve or a multi step output). Just match up the upper end pint of one FX with the lower value of the next and set the end conditions to input = output.

https://stash.reaper.fm/32893/NonLin2-2.PNG

pipelineaudio
02-07-2018, 07:52 PM
holy crap man! Gonna try it now!!!

pipelineaudio
02-07-2018, 08:01 PM
According to ReaControl MIDI log, this thing is working 100% perfectly

But I can't get it to control a parameter I want to mess with, I am betting this has to do with the different control paths in here...I will try and figure it out

pipelineaudio
02-07-2018, 08:12 PM
I have it set to Input 27
CC Output 28
MIDI Output Channel 1
Curve type Step
Class None
Class Group 1

immediately after it I have ReaControl MIDI set to log

if I move the pedal Log is showing cc27 with the correct values, CC28 with the new correctly modified values of only 0 and 128, and cc60 at 0

If I bypass ReaRack2, I get only CC27 at the correct values

pipelineaudio
02-07-2018, 08:16 PM
Sticking MIDI to ReaControl path right after it isnt working either, this is nutty

pipelineaudio
02-07-2018, 08:17 PM
Pretty sure your plugin is doing exactly what its supposed to be doing, especially according to midi logger, aside from that CC60 thing. I think we need mschnell to tell us why its not controlling paramater modulation

Time Waster
02-07-2018, 09:15 PM
The CC60 thing is the least significant byte for the high resolution, which should be ignored by your setup (CC60 is paired with CC28).

pipelineaudio
02-07-2018, 09:28 PM
Ok, if I stick MIDI to reacontrol path, I think I got this working. Is there any way for it to only send to the new CC# IF it has changed states? Like no output from the new CC# unless it goes over the threshold or back under if it was already over?


This is exciting stuff! I got sidetracked a second ago, taking apart a Korg NanoKontrol to look at its suitability as a USB MIDI controller

https://www.instagram.com/p/Be7BPfWhlkM/?taken-by=pipelineaudio

Time Waster
02-07-2018, 09:30 PM
Yes there is. I will add that.

pipelineaudio
02-07-2018, 10:35 PM
Hmm, so far so good! Awesome work man!!!!

pipelineaudio
02-07-2018, 10:46 PM
Woohoo! I can use it to more smoothly, surely and quickly change keys on my harmonizer!

mschnell
02-07-2018, 10:52 PM
I am betting this has to do with the different control paths in here...I will try and figure it out. ... I stick MIDI to reacontrol path
As this is a JSFX, it works in the Midi bus (chain) dedicated to the track it is loaded in.

(In Reaper, there is just a single "Control Path" but multiple Midi Buses; the "control path" is just one of them.)

Hence to influence a VST, you can
- assign the midi message (CC # and Chanel) in the VST itself (if it allows for this and is located in the same track below this JSFX)
- route the output of this track accordingly and assign the midi message (CC # and Chanel) in the VST itself (if it allows for this and is located in another track
- if the VST does not allow for assigning its functionality to a CC, use "param" -> "FX Parameter list" -> "Parameter Modulation / Midi link" -> (target parameter) -> activate "Linkk from Midi" -> click "none" -> "Midi" -> "CC" -> (CC #) instead (same Midi Routing options as above).
- you also can use MidiToReaControlPath to route the message to the control Path and use "learn", but when the target is a VST (or AUX, or DX, or JSFX), this is not necessary.

(I am just writing a chapter on the Reaper Midi buses for the LiveConfigs User Guide.)

-Michael

mschnell
02-07-2018, 10:59 PM
Woohoo! I can use it to more smoothly, surely and quickly change keys on my harmonizer!
Reaper out of the box provides a similar functionality - but just with a simple linear curve instead of step/Bezir - in the "Parameter Modulation" functionality described above.

(BTW, for "smooth" actions, TimeWaster's plugin should (and supposedly will) support high resolution CC .)

-Michael

pipelineaudio
02-07-2018, 11:32 PM
I am having instances where this plug is on the same track as a vst inserted after it, with reacontrol midi logger after that. Logger shows the new CC's but the second vst does not respond to them...trying to figure this one out now, I may send an rpp

mschnell
02-07-2018, 11:38 PM
Logger shows the new CC's but the second vst does not respond to them.
Midi Channel ?
-Michael

pipelineaudio
02-08-2018, 01:27 AM
Same channel. Seems really buggy, not this new JS plug but MIDI in general. I was able to create a second instance of a vst, set it the exact same way midi wise as the first one, and it worked while the first one didnt

Parameter modulation seems very buggy. Sometimes it works, sometimes it doesnt, even though logger sees it in the right place in either case

pipelineaudio
02-08-2018, 01:33 AM
Putting ReaRack on the same track before the vst in question definitely doesnt work

pipelineaudio
02-08-2018, 01:43 AM
The MIDI path to Learn and parameter/Midi link is definitely NOT the MIDI coming in or being modified by that track. Just check logger saying its at cc28 while learn is seeing 27 And I have it set to block 27

pipelineaudio
02-08-2018, 02:24 AM
OK, I'm trying to make a chart showing exactly what things are affected by what. I am not understanding the difference under the "Param" button between "MIDI Link" and "Paramater Modulation/MIDI link"

pipelineaudio
02-08-2018, 02:52 AM
Working on this chart, but I'm getting intermittent results. Sometimes having two instances of the exact same plugin with the exact same settings are behaving differently when one is bypassed vs the other.

Sometimes MIDI link works, sometimes MIDI link breaks the plug somehow unless you delete the plug again. (Not talking about ReaRack here, just plugs in general)

I can't be sure of this chart's accuracy so far as behaviour is intermittent

https://i.imgur.com/ALF4XY5.png

pipelineaudio
02-08-2018, 03:01 AM
Could one of you post an RPP where the position of the JS wah is controlled by one CC and then the wet dry control is controlled by the CC modified by ReaRack? The wet dry should only be able to have two positions, 0 and 127

Then could you try and do one with a VST wah?

This seems like an OK free one.

http://www.vst4free.com/free_vst.php?plugin=Wahman&id=2580

I am crazy frustrated, sometimes it works, then when I reload the project, its not working anymore.

pipelineaudio
02-08-2018, 03:06 AM
Reaper out of the box provides a similar functionality - but just with a simple linear curve instead of step/Bezir - in the "Parameter Modulation" functionality described above.

-Michael

I dont think this will do it for a MIDI control. It doesnt give you the same controls as an audio one does

Time Waster
02-08-2018, 05:27 AM
I've uploaded a new version of the FX. Added (but not tested) the code to prevent multiple sends of the same CC value. Also fixed a bug preventing messages being passed through when they were supposed to be.

Time Waster
02-08-2018, 05:58 AM
I downloaded the Wah effect and tested it. I found that the max CC output value is 128. It should be 127. If you set the top end point to 0.99 instead of 1, it works OK. I need to look into that.

Time Waster
02-08-2018, 06:32 AM
Another version uploaded (0.3.0). Hopefully it should all work OK now.

mschnell
02-08-2018, 08:29 AM
The MIDI path to Learn and parameter/Midi link is definitely NOT the MIDI coming in or being modified by that track.

AFAIK:
- Midi Leran is from Reaper Control Path (inviable for a midi logger)
- Parameter modulation by Midi is (by default) from the FX chain at the position the plugin is located (e.g form the ReaControlMidi positioned direly above).

(As said: if the Control Path is activated in the midi device some major confusion can arise.)

-Michael

mschnell
02-08-2018, 09:36 AM
More ideal version...
Here you are... Please test.
-Michael


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
P?ipe






// 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,12 6,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,12 6,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;
)

@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, msg1, 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);

pipelineaudio
02-08-2018, 01:25 PM
Oh man, can’t wait to get to work and try this stuff!

I finally got a full pedal setup and was playing with it last night and was super happy with most everything. Even all the tracks didn’t take up more than 4% cpu. Making it so it didn’t mute unselected tracks only added like 0.5%

My big problem now is just the dropout time from switching and the often harsh bang or pop that can result from switching, which is honestly a common issue with guitar stuff. I’m going to try to figure out some crossfading tricks....too bad there’s no action for “fade in sends”

mschnell
02-08-2018, 01:33 PM
If nothing else helps, it's easy to do a JSFX that cross-fades two inputs.

Let me know what exactly you need, if you want it.

-Michael

pipelineaudio
02-08-2018, 03:37 PM
If nothing else helps, it's easy to do a JSFX that cross-fades two inputs.

Let me know what exactly you need, if you want it.

-Michael

Then it would likely control a mixer plugin? Trying to work out how to do this exactly. Let me look at if receives are available in the API. I remember when xenakious was still involved there were some command parameters which included some fade times assignable to things

pipelineaudio
02-08-2018, 06:02 PM
Here you are... Please test.
-Michael


desc:Pipe Midi Filter
author: Michael Schnell (mschnell@bschnell.de)



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

Time Waster
02-08-2018, 06:55 PM
I've uploaded yet another update to the ReaRack Nonlinearizer FX. It now outputs correctly for both low and high res CCs

pipelineaudio
02-08-2018, 08:31 PM
Grabbing it now! This is so awesome to see development in real time

mschnell
02-08-2018, 10:41 PM
Then it would likely control a mixer plugi

Nope.
It would be a self contained thingy that gets a signal (Midi message or pushing a preset on it via LiveConfigs) and according to that selects one audio input (e.g. "pins" 1+2) or the other (e.g. pin 3+4) to be propagated to it's audio output output. When switching over, it would use a crossfade that takes a definable amount of time.

-Michael

mschnell
02-08-2018, 10:48 PM
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:

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,12 6,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,12 6,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:

<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/AAAAIAAAACAAAAAAAAA4AAAAQzpcVXNlcnNcbXNjaG5lbGxcQX BwRGF0YVxSb2FtaW5nXFJFQVBFUlxEYXRhXEdN
LnJlYWJhbmsAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYA AABNYWpvcgANAAAAMTAyMDM0MDUw
NjA3AAEAAAAAAAAAAAAAAAAKAAAADQAAAAEAAAAAAAAAAAAAAA AAAAA=
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/AAAAQAAAAAAAAAA4AAAAQzpcVXNlcnNcbXNjaG5lbGxcQXBwRG F0YVxSb2FtaW5nXFJFQVBFUlxEYXRhXEdN
LnJlYWJhbmsAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAABAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYA AABNYWpvcgANAAAAMTAyMDM0MDUw
NjA3AAEAAAAAAAAAAAEAAAAEAAAABQAAAAIAAAAAAAAAAAAAAA AAAAA=
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

pipelineaudio
02-09-2018, 12:41 AM
Cool!

pipelineaudio
02-09-2018, 01:39 AM
for StuffMIDIMessage(0, msg_type*16 + channel, 10, 0);

If I want to make it program change instead, lets say channel 3 pc1, what do I do for the final data point? PC's are only two bytes right?

pipelineaudio
02-09-2018, 05:34 AM
If nothing else helps, it's easy to do a JSFX that cross-fades two inputs.

Let me know what exactly you need, if you want it.

-Michael

So it looks like I have some plugs that make trouble unless I mute the unused tracks. Some clicks and pops happen if I have three of them open at the same time. I tried tricking it to load the same plug across a few track and doing a sort of loop switch, and switching presets on it, but that crashed reaper. I'm afraid I will have to mute unused tracks, so I'm not sure how this would affect a crossfade

But really, I would love a crossfade betweem patches, but since you never know which two patches its going to be between, I'm not sure how it would work.

Can you think of anything?

pipelineaudio
02-09-2018, 05:40 AM
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/


-Michael

This works PERFECT!

The dwell time gave me the full range of the wah back!

mschnell
02-09-2018, 06:45 AM
Can you think of anything?
As said, a Crossfade JSFX would help. But of course you need to do the appropriate routing and make sure that both inputs are fully alive and clean during the switching.

Supposedly you would need to use the crossfade plugin instead of track muting.

I suppose I can send you the code later this day.

-Michael

mschnell
02-09-2018, 06:50 AM
This works PERFECT!
A possible improvement came in my mind:
The "not engaged" range is subtracted from the full range sent to the plugin as modulation CC.

Would it be better to stretch the value range of the original CC # to use the full range of 0...127 when the input is between the lowest possible "negaged" value to 127 ?

-Michael

mschnell
02-09-2018, 11:56 AM
I’m going to try to figure out some crossfading tricks....too bad there’s no action for “fade in sends”
Did you try the "Tiny Fade on Config Switch" setting with LiveConfigs ?
Did you happen to find out what this exactly does ? (I seem to remember I always used the default setting.)

Anyway:
here is the "Midi Crossfade" JSFX.
It performs a crossfade between channels (1 and 2) vs (3 and 4) mixing down to (1 and 2). The balance is controlled by a CC. The fading speed is limited according to a slider setting. Hence it will smoothly crossfade when teh CC jumps between 0 and 127. You can watch the fading in the graphics (supposedly self-explaining)

-Michael


desc:Midi Crossfade
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 Input 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,12 6,127}>CC Input
slider3:-0.3<-1,-0.1,0.01>Attenuation per CC step
slider4:0.01<0.0005, 0.01, 0.0001>max step(dB)
//slider5:0<0,1,0.01>Factor a (Test)
//slider6:0<0,1,0.01>Factor b (Test)

@init
modval = 0;
// prelevel = 0;
maxCCvalue = 127;
r4 = log(10)/20;

function fca(x) (
x < limit ? (
x*r3;
) : (
exp((maxCCvalue-x) * r5);
);
);

function fcb(x) (
fca(maxCCvalue-x);
);


@slider
inChannel = slider1;
modcc = slider2;
dbperstep = slider3;
db20perstep = dbperstep/20;
p1 = 1 / log(10) / db20perstep;
p2 = 1 / maxCCvalue;
p3 = p1 + p2;
limit = (-p3+0.5) |0;
r1 = (maxCCvalue-limit) * dbperstep;
r2 = exp(log(10)*r1/20);
r3 = r2 / limit;
r5 = dbperstep*r4;
s1a = exp(log(10)*slider4/20);
s1b = exp(log(10)*slider4/20);
s2a = 1 / s1a;
s2b = 1 / s1b;
fa = fca(1);
fb = fcb(126);

@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 == modcc ? ( // Is it the right CC?
modval = msg3;
modval ? (
outlevela < fa ? outlevela = fa;
);
modval != 127 ? (
outlevelb < fb ? outlevelb = fb;
);
modlevela = fca(modval);
modlevelb = fcb(modval);
);
);
);
midisend(offset, msg1, msg2, msg3); // pass through
);

modval ? (
modstepa = exp( log(modlevela / outlevela) / samplesblock);
modstepa == 1 ? (
steppinga = 0;
) : (
modstepa > s1a ? (
modstepa = s1a;
) : modstepa < s2a ? (
modstepa = s2a;
);
steppinga = 1;
);
) : (
modstepa = s2a;
);

modval != 127 ? (
modstepb = exp( log(modlevelb / outlevelb) / samplesblock);
modstepb == 1 ? (
steppingb = 0;
) : (
modstepb > s1b ? (
modstepb = s1b;
) : modstepb < s2b ? (
modstepb = s2b;
);
steppingb = 1;
);
) : (
modstepb = s2b;
);

//slider5 = modlevela; // test
//slider5 = modlevelb; // test


@sample
outlevela *= modstepa;
outlevelb *= modstepb;
spl0 = spl0 * outlevela + spl2 * outlevelb;
spl1 = spl1 * outlevela + spl3 * outlevelb;


@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 / maxCCvalue;
q2 = gfx_h;


gfx_r= 1; gfx_g=0; gfx_b=0;
gfx_y = 0;
gfx_x = 0;
x = 0;
while (x<=maxCCvalue) (
a = x*q1;
b = gfx_h - fca(x)*q2;
gfx_lineto(a, b, 1);
x = x+1;
);

gfx_r= 0; gfx_g=1; gfx_b=0;
gfx_y = 0;
gfx_x = 0;
x = 0;
while (x<=maxCCvalue) (
a = x*q1;
b = gfx_h - fcb(x)*q2;
gfx_lineto(a, b, 1);
x = x+1;
);

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

gfx_r= 1; gfx_g=0; gfx_b=0;
gfx_x = 0;
gfx_y = gfx_h-outlevela*q2;
gfx_lineto(gfx_w, gfx_y);

gfx_r= 0; gfx_g=1; gfx_b=0;
gfx_x = 0;
gfx_y = gfx_h-outlevelb*q2;
gfx_lineto(gfx_w, gfx_y);

mschnell
02-09-2018, 11:57 AM
And here is a testing project for this:
- Michael


<REAPER_PROJECT 0.1 "5.70/x64" 1518201905
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 2.5
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 0.33613221313416 0 -1 -1 1
MASTER_FX 1
MASTER_SEL 1
<MASTERPLAYSPEEDENV
ACT 0 -1
VIS 0 1 1
LANEHEIGHT 0 0
ARM 0
DEFSHAPE 0 -1 -1
>
<TEMPOENVEX
ACT 0 -1
VIS 1 0 1
LANEHEIGHT 0 0
ARM 0
DEFSHAPE 1 -1 -1
>
<PROJBAY
>
<TRACK {DDA46169-045E-4377-82A9-931BAB2AB012}
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 0
REC 0 0 0 0 0 0 0
VU 2
TRACKHEIGHT 0 0
INQ 0 0 0 0.5 100 0 0 100
NCHAN 4
FX 1
TRACKID {DDA46169-045E-4377-82A9-931BAB2AB012}
PERF 0
MIDIOUT -1
MAINSEND 1 0
<FXCHAIN
WNDRECT 11 12 1909 628
SHOW 0
LASTSEL 6
DOCKED 0
BYPASS 0 0 0
<JS synthesis/tonegenerator ""
-12.000000 -6.000000 440.000000 0.000000 0.000000 0.000000 0.000000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
<JS_PINMAP
6AMAABwAAADoAwAABAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAHA AAAOgDAAAEAAAAAgAAAAEAAAAAAAAAAgAAAAAAAAA=
>
FLOATPOS 0 0 0 0
FXID {5A5C7239-F886-4B94-BA08-26ADC741F743}
WAK 0
BYPASS 0 0 0
<JS synthesis/tonegenerator ""
-12.000000 -6.000000 440.000000 3.000000 0.000000 0.000000 0.000000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
<JS_PINMAP
6AMAABwAAADoAwAABAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAHA AAAOgDAAAEAAAAAgAAAAQAAAAAAAAACAAAAAAAAAA=
>
FLOATPOS 0 0 0 0
FXID {2560B801-DA2F-4ACD-A810-26C2D1F8E9AC}
WAK 0
BYPASS 0 0 0
<JS ix/MIDI_CCRider ""
0.000000 1.000000 64.000000 64.000000 0.000000 0.000000 0.200000 0.000000 7.000000 1.000000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
FLOATPOS 56 84 505 317
FXID {F6BB17A2-D481-4B56-BEB2-09FDECDE35A3}
WAK 0
BYPASS 0 0 0
<VST "VST: ReaControlMIDI (Cockos)" reacontrolmidi.dll 0 "" 1919118692
ZG1jcu5e7f4AAAAABgAAAAEAAAAAAAAAAgAAAAAAAAAEAAAAAA AAAAgAAAAAAAAAEAAAAAAAAAAgAAAAAAAAAOkAAAABAAAAAAAQ AA==
/////wAAAAAAAAAAAAAAAAkAAAAMAAAAAQAAAP8/AAAAIAAAACAAAAAAAAA4AAAAQzpcVXNlcnNcbXNjaG5lbGxcQX BwRGF0YVxSb2FtaW5nXFJFQVBFUlxEYXRhXEdN
LnJlYWJhbmsAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYA AABNYWpvcgANAAAAMTAyMDM0MDUw
NjA3AAEAAAAAAAAAAAAAAAAKAAAADQAAAAEAAAAAAAAAAAAAAA AAAAA=
AAAQAAAA
>
FLOATPOS 1974 158 676 616
FXID {96A28D80-E2E1-408A-B67C-410963C32832}
WAK 0
BYPASS 0 0 0
<JS test/pipe ""
0.000000 1.000000 2.000000 77.000000 19.000000 0.000000 0.000000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
JS_DIMS 639 610
FLOAT 1214 37 655 649
FXID {56A8E54E-C65C-4A34-8C0B-B04F3058159A}
WAK 0
BYPASS 1 0 0
<VST "VST: ReaControlMIDI (Cockos)" reacontrolmidi.dll 0 "" 1919118692
ZG1jcu5e7f4AAAAABgAAAAEAAAAAAAAAAgAAAAAAAAAEAAAAAA AAAAgAAAAAAAAAEAAAAAAAAAAgAAAAAAAAAOkAAAABAAAAAAAQ AA==
/////wAAAAAAAAAAAAAAAAkAAAAMAAAAAQAAAP8/AAAAIAAAACAAAAAAAAA4AAAAQzpcVXNlcnNcbXNjaG5lbGxcQX BwRGF0YVxSb2FtaW5nXFJFQVBFUlxEYXRhXEdN
LnJlYWJhbmsAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYA AABNYWpvcgANAAAAMTAyMDM0MDUw
NjA3AAEAAAAAAAAAAAAAAAAKAAAADQAAAAEAAAAAAAAAAAAAAA AAAAA=
AAAQAAAA
>
FLOATPOS 2006 190 676 616
FXID {65B3D096-4029-4E6E-A692-534CA33C9B3F}
WAK 0
BYPASS 0 0 0
<JS test/crossfade ""
0.000000 2.000000 -0.100000 0.000500 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
JS_DIMS 1663 542
<JS_PINMAP
6AMAACwAAADoAwAABAAAAAQAAAABAAAAAAAAAAIAAAAAAAAABA AAAAAAAAAIAAAAAAAAACwAAADoAwAABAAAAAQAAAABAAAAAAAA AAIAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAA==
>
FLOATPOS 131 452 1679 581
FXID {BD3325F3-8A13-4777-8791-653269E6BB07}
WAK 0
BYPASS 0 0 0
<VST "VST: ReaEQ (Cockos)" reaeq.dll 0 "" 1919247729
cWVlcu5e7f4CAAAAAQAAAAAAAAACAAAAAAAAAAQAAAABAAAAAA AAAAIAAAAAAAAABAAAAAAAAAAIAAAAAAAAAKgAAAABAAAAAAAQ AA==
IQAAAAQAAAAAAAAAAAAAAAAAAAAAAFlAAAAAAAAA8D8AAAAAAA AAQAEIAAAAAAAAAAAAAAAAwHJAAAAAAAAA8D8AAAAAAAAAQAEI AAAAAAAAAAAAAAAAQI9AAAAAAAAA
8D8AAAAAAAAAQAEBAAAAAAAAAAAAAAAAiLNAAAAAAAAA8D8AAA AAAAAAQAEBAAAAAQAAAAAAAAAAAPA/AAAAAA8CAABhAQAA
AAAQAAAA
>
FLOATPOS 0 0 543 419
FXID {3DB4F0B3-91F3-45C2-A724-3F1BB249A320}
WAK 0
>
>
<EXTENSIONS
>
>

mschnell
02-09-2018, 12:13 PM
If you want to have the crossfade to be initiated by LiveConfigs, you can put this plugin above "Midi Crossfade". It will send out a CC #0 with a value defined in the preset that LiveConfig might push upon it.

-Michael


desc:Slider to Midi CC0
author: Michael Schnell (mschnell@bschnell.de)
version: 1.0
changelog: initial release
donation: United Nations Foundation http://www.unfoundation.org/
about:
## Description
Pipe

slider1:1<1,16,1>Midi Channel
slider2:1<1,128,1>Value

@init
cc = 0xB0-1;
mes2 = 0; // CC #
mes3 = 0;
mes3old = -1;

@slider
mes1 = cc + slider1|0;
mes3 = slider2|0;

@block
mes3 != mes3old ? (
midisend(0,mes1,mes2,mes3);
mes3old = mes3;
);

pipelineaudio
02-09-2018, 01:22 PM
A possible improvement came in my mind:
The "not engaged" range is subtracted from the full range sent to the plugin as modulation CC.

Would it be better to stretch the value range of the original CC # to use the full range of 0...127 when the input is between the lowest possible "negaged" value to 127 ?

-Michael

I think so, I think that’s the way axe does it, would be definitely worth a try, especially say for something like using it to control a whammy pedal dive bomber thing!

pipelineaudio
02-09-2018, 01:25 PM
Oh man, I can’t wait to get to work to try these out!!! Thank you!

Now I just gotta figure out an easier way of loop switching

pipelineaudio
02-09-2018, 02:37 PM
Ok, this seems to be doing what it should, but I'm not sure how exactly I would use this.

Lets say I had three patches to switch between, how exactly would I pick a track to play and a track to switch to and stuff?

mschnell
02-09-2018, 02:42 PM
I think so, I think that’s the way axe does it, would be definitely worth a try,
I'll do that tomorrow.
-Michael

mschnell
02-09-2018, 02:47 PM
Lets say I had three patches to switch between,...
You said you wanted to do a crossfade, not a net-fade :)

Of course a "1 from n" selector (instead just 1 from 2) could be done using the same toolbox.

For three, you could try two instances in a sequence. But please first try just two as a proof of concept.

how exactly would I pick a track to play and a track to switch to and stuff?

This primarily depends on a lot of details in your setup.
-Michael

pipelineaudio
02-09-2018, 03:26 PM
Ok, this definitely kills the glitches. And the dropout time, though maybe an assymetrical fade would be even better for this

If it could crossfade one set of inputs to 2 sets of outputs, you'd also have the ability to do spillover!

What I'm trying to do exactly is eliminate the lag time and the glitches when I switch between rows in SWS Live Configs.

If I assign tracks in Live Configs, then I get both a long dropout time and often glitches, unless I set that fade knob thing longer, which makes the dropouts even longer, and still can give glitches.

So I have say, 8 rows going. Ideally, some of the rows would be the same track with some loops switched in and out to deal with buggy plugins, but barring that I think it can still be done, just not sure if I could somehow run 8 of these and be able to handle all the switching logic

mschnell
02-09-2018, 11:46 PM
an assymetrical fade would be even better for this
I suppose you mean faster up than down, not different times for the red/green channels ?

you'd also have the ability to do spillover! I have no idea what this is supposed to mean.

...unless I set that fade knob thing longer, which makes the dropouts even longer...
Ahh ! So it's obvious what the fade knob does. One after the other:
- fade out
- mute track A
- unmute track B
- fade in

Obviously LiveConfigs never has two of the managed track unmuted at the same time. I suppose there are reasons for this.

So if you want to do a "Net Fade" between multiple active tracks, you need to deactivate LiveConfigs' track muting feature completely and (having the tracks unmuted all the time) use presets to be pushed to a plugin like "Midi Crossfade" by LiveConfigs or some actions based stuff for dynamically and mothly setting the routing.

-Michael

mschnell
02-10-2018, 12:03 AM
So I have say, 8 rows going.
If you don't need a crossfade, but a kind of dynamic smooth "demultiplexer", you might try to use my "Midi Volume" JSFX (on ReaPack) instead of the new "Midi Crossfade".

It does the same action but only for a single input channel.

If you use same at the end of each of your (8 ?) tracks and feed CCs with values 0 / 127 to it, it will fade the appropriate track in and out glitchlessly at any point in time you desire.

With that, the "Net Fade" is just a matter of preset pushing and/or Midi programming and routing.

This is likely less complex/confusing then trying to apply multiple crossfades, as it is very much like muting/unmuting tracks.

-Michael

pipelineaudio
02-10-2018, 02:41 AM
now that sounds promising! I will try it. Is there a way to disable the SWS Live Config's muting?

Spillover would be like, if you switched from a channel with a delay on it, the delay would still finish playing even as the new track comes up. I've got it working by running the delay in parallel now, things are looking really good, but I'll see about the JS you just mentioned

pipelineaudio
02-10-2018, 02:55 AM
how would I automate that send from 127 to 0 though?

mschnell
02-10-2018, 04:55 AM
s there a way to disable the SWS Live Config's muting?

LiveConfiogs Page bottom: "Options" -> uncheck "Mute all but active track" (can be set per page)

For "spillover" you obviously would need to mute the input to the plugin and leave the output connected. Of course this is doable by "midi Volume" as well.

-Michael

mschnell
02-10-2018, 05:09 AM
how would I automate that send from 127 to 0 though?

Save two presets for the "Slider To CC0" JSFX one with the "Value" slider set to 0 and one with the value slider set to 127.

Place a "Slider to CC0" instance above any "Midi Volume" JSFX and set the "Midi Volume" JSFX to adhere to CC # 0 .

Now you can have any LiveConfigs Line push either of the presets to any of the "Slider To CC0" instances. (Unfortunately LiveConfigs does not show the alias names, so you need to take care to select the correct instance.)

- Michael

pipelineaudio
02-10-2018, 11:50 AM
LiveConfiogs Page bottom: "Options" -> uncheck "Mute all but active track" (can be set per page)

For "spillover" you obviously would need to mute the input to the plugin and leave the output connected. Of course this is doable by "midi Volume" as well.

-Michael

That only disables the track muting, the send muting is still there

pipelineaudio
02-10-2018, 11:52 AM
Save two presets for the "Slider To CC0" JSFX one with the "Value" slider set to 0 and one with the value slider set to 127.

Place a "Slider to CC0" instance above any "Midi Volume" JSFX and set the "Midi Volume" JSFX to adhere to CC # 0 .

Now you can have any LiveConfigs Line push either of the presets to any of the "Slider To CC0" instances. (Unfortunately LiveConfigs does not show the alias names, so you need to take care to select the correct instance.)

- Michael

That is some genius stuff! Am I getting it right, slider to midi cc is trigger Able? Like you send it a message and it performs that action? I couldn’t quite figure out what it did

mschnell
02-10-2018, 12:31 PM
That only disables the track muting, the send muting is still there

I never came across "send muting". What exactly do you mean by this, and what does LiveConfigs do ?

-Michael

mschnell
02-10-2018, 12:41 PM
That is some genius stuff!
Not really :) . I did the "Slider To PS" JSFX a long time ago to make LiveConfigs send Midi Program change messages to Kontakt to have same latency-free switch pre-loaded Sample-libraries for a new sound/patch. (I think it's described in my LiveConfigs User Guide.

I just did a minimal edit to the source code to do the "Slider To CC0" JSFX.

Am I getting it right, slider to midi cc is trigger Able?
It's extremely simple: whenever the "value" slider is moved (manually or when pushing a preset to it) it sends out a Midi CC #0 message with channel and value according to the (new) slider setting.

-Michael

mschnell
02-10-2018, 12:48 PM
Do you see that the power of Reaper as a Live playing tool is freed by LiveConfigs plus a set of JSFXes for Midi preprocessing.

I hope that we some day will be able to create a Toolbox that makes setting up such stuff easy for non-programmers.

With that, Reaper users would not any longer be forced to take a learning curve with dedicated Live VST player software such Forte or Bidule.

-Michael

pipelineaudio
02-10-2018, 01:36 PM
It's extremely simple: whenever the "value" slider is moved (manually or when pushing a preset to it) it sends out a Midi CC #0 message with channel and value according to the (new) slider setting.

-Michael

But then where do the time components for the fade out or in happen? What I think I need is a way to select whatever slider and then tell it "when I send you this message, you will beging a 50msec fade" or something like that

pipelineaudio
02-10-2018, 01:37 PM
I never came across "send muting". What exactly do you mean by this, and what does LiveConfigs do ?

-Michael

If you chose an audio input track, it automatically builds sends to whatever tracks you specify in the rows of live configs, and then when you activate a row, it unmutes the send from the audio input track to the target track and mutes all the other sends...at least as far as I can tell. I think I could make a screen grab video, if I could figure how to make the i/o window stay open for it

mschnell
02-10-2018, 02:53 PM
"when I send you this message, you will beging a 50msec fade" or something like that
The fade time is defined in the Midi Volume JSFX.

It's not given in msec (as it is not just for fading (i.e. 0->127 or 127->0) but for smoothing a volume curve provided by the CC (avoiding zipper noise).

Instead, the max step size in dB is given. As with each sample a step is taken and the minimum Volume above 0 (-inf dB, at CC= 0) is at CC=1 with a given dB of attenuation (depending on the curve setting, I don't have the formula in mind) the count of steps until and hence the time till reaching 0dB is defined by this slider. I suggest to try this out.

If you need to dynamically change the fade rate, you might try to push a preset onto "Midi Volume".

-Michael

mschnell
02-10-2018, 03:02 PM
If you chose an audio input track, it automatically builds sends to whatever tracks you specify in the rows of live configs,

AHHH !!!!

I never understood the "input track" stuff in LiveConfigs. Hence I never used it (and failed to describe it in the User Guide).

Now finally I can update that part of the Guide. Thanks a lot !! (Even though to me, this "input track" feature seems like another shortcut that just adds confusion - similar to the "control channel" checkbox in the midi device setup (for complex projects) ) .

But as you see with my setup, "input track" is not necessary. :)

So - as far as I understand your desired "instrument" - just kill the "input track" (and the "mute/unmute track") options in LiveConfigs and do all the switching via the "Midi Volume" plus "Slider To CC0" JSFXes, doing the routing from your audio input track to your FX chain tracks statically be Reaper means.

-Michael

pipelineaudio
02-10-2018, 06:18 PM
oooh, I'm starting to get it now

I need to optimize to get rid of some crashes and glitches, so that I can use volume instead of muting...maybe I can figure a way to mute the track after the volume switch is done

mschnell
02-11-2018, 12:10 AM
.maybe I can figure a way to mute the track after the volume switch is done
That would save some CPU.
Supposedly it would need same "manual" work. E.g.
- create a JSFX that on a midi messages creates another Midi message after some delay
- route that message to the Reaper Control Path
- fetch that message (e.g.) by an action that does the muting.

I also could add a feature to "Midi Volume" to send a Midi message when the volume has gone to zero.

-Michael

pipelineaudio
02-11-2018, 01:56 AM
oh man that would be something. I guess I should draw out what would be ideal in my guess. Really struggling with what's possible, vs what is reliable to not have dropouts, but ideally, things would fade in pretty fast, but slow enough to ditch the glitch, but patches with tails would fade out for a few seconds, but with their inputs muted.....grrr...I need to think this thru

Or maybe its all on the inputs, which since i don't think we could directly control the send and receive fade, would mean one more set of routing tracks, one more set of glitches.....its all so confusing!

mschnell
02-11-2018, 02:32 AM
I think so, I think that’s the way axe does it, would be definitely worth a try, especially say for something like using it to control a whammy pedal dive bomber thing!

Here you are: "Pipe Filter" version 2 with optional stretch. (Maybe tomorrow I'll add a display for that feature in the graphic ...)

Please test !
-Michael

desc:Pipe Midi Filter
author: Michael Schnell (mschnell@bschnell.de)
version: 2.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,12 6,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,12 6,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
slider8:0<0,1,1{straight,stretch}>original CC

@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;
enhance = slider8;
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;
);
enhance ? (
msg3 -= thl;
msg3 /= 127-thl; // 0...1)
msg3 *= 127;
msg3 < 0 ? msg3 = 0;
);
);
);
);
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);

pipelineaudio
02-11-2018, 03:52 AM
I think, the end scheme of all of this, in order to prevent clicks and pops, allow spillover and still preserve CPU, would be something like this

https://i.imgur.com/ywkrGfj.png

mschnell
02-11-2018, 04:13 AM
and still preserve CPU, ...
AFAIU, only muting the track would allow for preserving CPU. Muting the "send" will not do anything on that behalf.

Do you want me to add the "send CC when output is muted" feature to MidiVolume ?

its all so confusing!
No it is not.

Now the structure you want is very clear.

- Use an "input" track (not in LiveConfigs ! This just is the name)
- route same to 8 "worker" tracks
- mix those down for your output

Each worker track
- starts with a "Slider To CC0" and then a "Midi Volume" plugin
- after this you place your effects.

LiveConfigs pushes appropriate presets onto the appropriate "Slider To CC0" instance when entering and leaving a row to trigger the smooth routing and "spillover".

Optionally (not when using spillover)
- Midi Volumes sends out a CC when the ouput is completely muted
- same is propagated to the control path by MidiToReaControlPath
- an Action learned to that CC mutes the tracks (saving CPU)
- to unmute such a track LiveConfigs needs to trigger an appropriate action when a row is entered
- beware that the CPU saving option stops the track in action. Hence any "spillover" will occur when it is ummuted a long time later ! So this might not be a great idea, at all.

-Michael

mschnell
02-11-2018, 06:50 AM
Maybe tomorrow I'll add a display for that feature in the graphic ...
Here you are: version 2.2
-Michael


desc:Pipe Midi Filter
author: Michael Schnell (mschnell@bschnell.de)
version: 2.2
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,12 6,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,12 6,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
slider8:0<0,1,1{straight,stretch}>original CC

@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;
enhance = slider8;
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;
);
enhance ? (
msg3 -= thl;
msg3 /= 127-thl; // 0...1)
msg3 *= 127;
msg3 < 0 ? msg3 = 0;
mm = msg3;
);
);
);
);
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 = 0; 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);

enhance ? (
gfx_r = 1; gfx_g = 1; gfx_b = 1;
gfx_y = gfx_h-1;
gfx_x = 0;
x = thl / 127 * gfx_w;
gfx_lineto(x, gfx_y);
gfx_lineto(gfx_w, 0);
gfx_r = 1; gfx_g = 1; gfx_b = 0;
gfx_y = gfx_h - 1 - (mm / 127 * gfx_h);
gfx_x = 0;
gfx_lineto(gfx_w, gfx_y);
)

pipelineaudio
02-11-2018, 07:38 PM
[QUOTE=mschnell;1952860
Optionally (not when using spillover)
- Midi Volumes sends out a CC when the ouput is completely muted
-Michael[/QUOTE]

How do I make MIDI Volumes send out that CC after its done turning down the volume?

mschnell
02-12-2018, 12:28 AM
How do I make MIDI Volumes send out that CC after its done turning down the volume?
I would need to add this option.
That would be rather easy to do, but (as said) I am not really convinced that the stuff I described above really would work decently.

If you you (after everything else works nicely) are convinced and want me to, I'll add that option. Please do check out how this would fit in your setup (i.e. unmute the track that had been muted by means of "Midi Volume" having turned it down) and whether or not this might lead to an acceptable outcome - regarding how your plugins react on freezing them by muting the track they reside in.

-Michael

pipelineaudio
02-12-2018, 03:10 AM
I was pretty sick today, but tried a few times to drive to work because I was so excited to try this. I finally gave up after the third try,b it I will hopefully get it started tomorrow. I was wondering if there were some way to flush the track buffers after a mute.

I did get to try it on a delay and I see what you mean, I would have thought that it would just reflect what would have happened after all that time when you unmetered, but like you said, could be ten minutes later, when you unmetered you get the delays and junk from ten minutes ago

The plugins that are giving me the most trouble if all left unamused wouldn’t be the ones on a spillover track, so it might be ok, but maybe there’s another trick

mschnell
02-12-2018, 03:26 AM
Hope you are well soon !!!

AFAIK, the VST spec provides an API to reset a plugin. AFAIK, this is used by Reaper in certain situations. But I don't know if there is a way to send this command to a dedicated VST from any kind of user provided code.

You would need to ask in the "developr's" forum if anybody has any knowledge about this.

-Michael

mschnell
02-12-2018, 06:53 AM
It seems we are close to be ready to provide a kind of toolbox for a Reaper based versatile and hopefully rather easy to use - Guitar Rick framework:

- some "channels" that can be equipped with arbitrary plugins. The plugins would be able to receive CC messages for realtime modulation of their behavior

- means to switch smoothly without dropouts between these channels

- a prototype implementation (providing some usable tools) for preprocessing of midi messages from external controllers to be used for channel switching and setting up messages to the plugins.

What do you think ?
-Michael

pipelineaudio
02-12-2018, 01:29 PM
When you are in the reascript editor window from the actions menu, I see a way to save, but is there a way to save as new?

pipelineaudio
02-12-2018, 01:47 PM
How do I change which CC# I want to use in Slider to MIDI CC?

mschnell
02-12-2018, 01:49 PM
How do I change which CC# I want to use in Slider to MIDI CC?

There is a lin:

mes2 = 0; // CC #

you just replace the zero by the CC # you want to send.

-Michael

pipelineaudio
02-12-2018, 02:19 PM
Awesome!

Ok, I was able to make it where activate action was to send a cc to turn on the channel and deactivate turned it off. No glitches! Kickass

I figured it would probably be better to combine it so that one actions sent one channel to 0 while it sent the other channel to 127, but it didnt seem to make the switch any better.

Either way, it seems like the ramp up doesnt start till the ramp up was almost all the way down.

It would be nice to switch faster, but this is usable as is. Setting it so that both sliders of MIDI Volume control were at max seemed best.

I figured also that this would work better at the end of the chain, owing to the nature of distorted guitar sounds, but it still seems better on input.

IF and kind of big if, but if the computer could handle all the channels being unmuted, this is the end of story (aside from possibly faster switching). It would be nice to have more action slots but macros certainly work, if not as conveniently

It seems to me like the two big killers here are unmuted tracks and routing.

The more layers in the routing chains (track 1 sends to track 2 sends to track 3) the higher "RT longest-block" grows, which seems to be the indicator of when problems are going to happen.

Also there are tracks with tails and tracks without, tracks without tails seem to be perfectly suited to muting after the volume goes out. Tracks with tails are the problem ones, so they could remain unmuted

pipelineaudio
02-12-2018, 03:50 PM
I got an 8 patch setup going now. Noticing the same volume boost during switching as with gig performer, thinking about sticking the volume after the channel on the distorted tracks, lets see

pipelineaudio
02-12-2018, 04:06 PM
Seems weird that putting the Midi Volume after shouldn't work the best, especially with distortion sounds. Its gotta be the timing of when the gain happens. I guess I need to experiment with more fade shapes, but I'm not sure what to modify

Doing manual fades after two distorted tracks works as I would expect it, so I'm not sure if its the shape or timing or what

pipelineaudio
02-12-2018, 04:13 PM
So it looks like I have plenty of plugins where the mute will be ok with, some seem to flush, some don't.

That would mean that one action would have to unmute then start fading in and the other direction would have to fade out then mute. I think

mschnell
02-12-2018, 04:20 PM
Either way, it seems like the ramp up doesnt start till the ramp up was almost all the way down. It would be nice to switch faster,

You supposedly need to move the "Attenuation per setp" slider more to the right. You even can type in -0.06 for an even more straight curve.

(Edit: The curve does not matter here, as the input is only either 0 or 127).

You also can type in a larger value for the "max step" value, until there might be a popping noise when switching.

-Michael

mschnell
02-12-2018, 04:25 PM
That would mean that one action would have to unmute then start fading in and the other direction would have to fade out then mute. I think
Muting time is easy: I can have Midi Volume send a CC when volume is completely down.

But how are you going to unmute the appropriate track ?

( I did ask in the developer's forum for a means to send a reset to a VST. )

-Michael

pipelineaudio
02-12-2018, 04:55 PM
I guess I could send an unmute command before the midi volume command

Select all tracks in track group
unmute tracks

I think

Let me see what happens with manual values in the volume control for the xfade.

pipelineaudio
02-12-2018, 05:13 PM
Still seems like the ramp up starts WAY after the ramp down, like when the ramp down is almost all the way out

pipelineaudio
02-12-2018, 09:17 PM
I tried a few things of just leaving a delay for the spillover, and doing PC changes on it. I think it works! Ready for the mutes!

mschnell
02-12-2018, 10:57 PM
Here you are: Midi Volume Control V 2.0
-Michael


// Author: Michael Schnell, based on a work of Time Waster (M. Smith)
// License: LGPL - http://www.gnu.org/licenses/lgpl.html
//
// The midi CC values 0 ... 127 are mapped to an "amplifier" curve that consists of a linear and an exponential part
// in a way, that with CC = 0 the amplification is 0 (-inf dB) and with CC = 127 the amplification is 1 (0db)
// A slider defines the amount (in dB), the amplification is reduced with each CC step.
// According to that, the breakpoint between the exponential and the linear part is set so that
// at this point the value and the slope of the curves match.
// Below the breakpoint, a linear curve is used so that with CC = 0 the amplification is Zero (-infinity dB).
// Another slider defines the maximum speed the amplification is modulated. This is set in dB per modulation step.
// (Moreover the maximum speed used is reaching a new defined level in as many steps a samples in a block)
// A graph shows as well the curve (Amplification vs CC steps), as the dynamic movement of the amplification level.



desc:Midi Volume Control
version: 2.0

slider1:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI Input 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,12 6,127}>CC Input
slider3:-0.3<-1,-0.1,0.01>Attenuation per CC step
slider4:0.003<0.0005, 0.01, 0.0001>max step(dB)
//slider5:0<0,1,0.01>Factor (Test)
slider6:0<0,127,1{None,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,12 6,127}>Muting Notofication CC

@init
modval = 0;
// prelevel = 0;
maxCCvalue = 127;
r4 = log(10)/20;
outval = 0;

function f (x) (
x < limit ? (
x*r3;
) : (
exp((maxCCvalue-x) * r5);
);
)

@slider
inChannel = slider1;
modcc = slider2;
dbperstep = slider3;
db20perstep = dbperstep/20;
p1 = 1 / log(10) / db20perstep;
p2 = 1 / maxCCvalue;
p3 = p1 + p2;
limit = (-p3+0.5) |0;
r1 = (maxCCvalue-limit) * dbperstep;
r2 = exp(log(10)*r1/20);
r3 = r2 / limit;
r5 = dbperstep*r4;
s1 = exp(log(10)*slider4/20);
s2 = 1 / s1;
f1 = f(1);
outcc = slider6-1;

@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 == modcc ? ( // Is it the right CC?
modval = msg3;
modval ? (
outlevel < f1 ? outlevel = f1;
);
modlevel = f(modval);
// slider5 = modlevel; // test
);
);
);
midisend(offset, msg1, msg2, msg3); // pass through
);

modval ? (
modstep = exp( log(modlevel / outlevel) / samplesblock);
modstep == 1 ? (
stepping = 0;
) : (
modstep > s1 ? (
modstep = s1;
) : modstep < s2 ? (
modstep = s2;
);
stepping = 1;
);
) : (
modstep = s2;
);

outcc >= 0 ? (
outlevel <= f1 ? (
outval ? (
outval = 0;
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
) : (
!outval ? (
outval = 127;
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
);
);

@sample
outlevel *= modstep;
spl0*=outlevel;
spl1*=outlevel;


@gfx 640 400

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

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

q1 = gfx_w / maxCCvalue;
q2 = gfx_h;


//gfx_line();
gfx_r=gfx_g=gfx_b=1;
gfx_y = 0;
gfx_x = 0;
x = 0;
while (x<=maxCCvalue) (
a = x*q1;
b = gfx_h - f(x)*q2;
gfx_lineto(a, b, 1);
x = x+1;
);
gfx_y = 0;
gfx_x = modval*q1;
gfx_lineto(gfx_x, gfx_h);
gfx_x = 0;
gfx_y = gfx_h-outlevel*q2;
gfx_lineto(gfx_w, gfx_y);

pipelineaudio
02-12-2018, 11:39 PM
AWESOME!!! Trying to figure out how to assign the mute CC out to a mute. We can;t directly assign a lot of things that can be learned

I'm still on the hunt for a virtual pedalboard so I can send midi messages to reaper's learn for functions that can't be directly assigned and have to be learned

pipelineaudio
02-12-2018, 11:48 PM
Crap, I see "set mute for track 0x" not sure if that will end up in a backwards toggle state

pipelineaudio
02-12-2018, 11:57 PM
Ok, I got it, but I think I need to send value of 127 instead of 0 in order to mute, I can't modify the learn (we really need a way to do more with the learnable midi stuff, bugging Justin now)

pipelineaudio
02-13-2018, 12:11 AM
Might have it anyway, but it seems like I have to put MIDI to ReaControl Path on each track that has MIDI Volum 2.0 on it, should that be right?

pipelineaudio
02-13-2018, 12:25 AM
Ok, here's how I'm trying it.

For track 1 the activate action is:

Group:select all tracks in group 01
Track: unmute tracks
Script:Send CHannel 2 cc1 value 127

The deactivate action is:

Script: Send Channel 2 CC1 Value 0

Midi volume control is set:

MIDI input Channel 2
CC Input 1

Muting Notofication: 11


MIDI channel 2 CC 11 is learned by macro:
Select all tracks in group 01
Mute tracks


What am I doing wrong?

pipelineaudio
02-13-2018, 12:45 AM
I wonder if it needs to send a different cc# for muted than unmuted...I wish we could set the values in this learn stuff

mschnell
02-13-2018, 12:46 AM
it seems like I have to put MIDI to ReaControl Path on each track that has MIDI Volum 2.0 on it, should that be right?
Obviously !
The CC is sent to the Midi Bus in the Track's FX chain.
The muting is done (supposedly via an action) in the "guts" of Reaper (i.e. the Reaper Control Path).

So MIDIToReaControlPath is necessary to do the routing.

Sorry, but my knowable about "Midi Learning", Action processing and ReaScripts is very limited :( . In fact I only know for rather sure that in Reaper, "Midi Learn" is a synonym for "Listen on the ReaControlPath".

I have no idea what happens to the CC value, when a CC # is "learned".

-Michael

pipelineaudio
02-13-2018, 01:20 AM
I'm not sure what to do here. The volume up action also seems to trigger the mute, maybe would it be possible to only send a 127 or only a 0, after the volume goes all the way down and to send nothing when it goes back up?

I'm not even sure if that needs to be a 127 or a 0, might need the option to do both, unless you can think of a different way to mute and unmute the track?

pipelineaudio
02-13-2018, 02:27 AM
watching what happens in reacontrol midi, it looks like it just needs to not send that 127 value when the volume control goes back up to the top

mschnell
02-13-2018, 07:32 AM
maybe would it be possible to only send a 127 or only a 0, after the volume goes all the way down and to send nothing when it goes back up?
Of course this would be possible, but a very illogical way of using a CC.

I'll implement that option tonight, anyway.

watching what happens in reacontrol midi, it looks like it just needs to not send that 127 value when the volume control goes back up to the top

That seems like a nice idea to optionally send 127 when volume goes up to full.

I'll implement that option tonight.

-Michael

pipelineaudio
02-13-2018, 01:04 PM
It seems like we need better ways of handling ccs in general in reaper. Really I would love to see whatever midi volume sends at the top unmetered, whatever it sends at the bottom mute, but that isn’t how the existing actions want to work. Maybe a script could be made to work alongside this

The only way I can figure on it working at the moment is to only have it send that mute cc when the vol7me goes down and to send noth8ng when it goes uo

pipelineaudio
02-13-2018, 01:07 PM
Also, I couldn’t tell for sure, but when the volume is going up, when does that plugin send the mute cc? After it’s up? Or before it starts turning up? Or does it send one before it starts and one after it finishes?

pipelineaudio
02-13-2018, 01:26 PM
What if these were two scripts instead of one jsfx

Activate action could be

Select tracks in group x
Unmute tracks
Turn up the volume

And deactivate action could be

Select tracks in group x
Turn down the volume
Mute tracks

mschnell
02-13-2018, 03:00 PM
What if these were two scripts instead of one jsfx

I have close to no knowledge about ReaScripts.
-Michael

pipelineaudio
02-13-2018, 03:18 PM
Well then, I think the ability to not send the mute CC when the volume turns up would probably work

mschnell
02-13-2018, 03:31 PM
Version 3.0
-Michael


// Author: Michael Schnell, based on a work of Time Waster (M. Smith)
// License: LGPL - http://www.gnu.org/licenses/lgpl.html
//
// The midi CC values 0 ... 127 are mapped to an "amplifier" curve that consists of a linear and an exponential part
// in a way, that with CC = 0 the amplification is 0 (-inf dB) and with CC = 127 the amplification is 1 (0db)
// A slider defines the amount (in dB), the amplification is reduced with each CC step.
// According to that, the breakpoint between the exponential and the linear part is set so that
// at this point the value and the slope of the curves match.
// Below the breakpoint, a linear curve is used so that with CC = 0 the amplification is Zero (-infinity dB).
// Another slider defines the maximum speed the amplification is modulated. This is set in dB per modulation step.
// (Moreover the maximum speed used is reaching a new defined level in as many steps a samples in a block)
// A graph shows as well the curve (Amplification vs CC steps), as the dynamic movement of the amplification level.



desc:Midi Volume Control
version:3.0

slider1:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI Input 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,12 6,127}>CC Input
slider3:-0.3<-0.6,-0.08,0.01>Attenuation per CC step
slider4:0.003<0.0005, 0.01, 0.0001>max step(dB)
//slider5:0<0,1,0.01>Factor (Test)
slider6:0<0,127,1{None,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,12 6,127}>Muting Notofication CC
slider7:0<0,2,1{Never,-inf db,0 dB}>send CC = 127

@init
modval = 0;
// prelevel = 0;
maxCCvalue = 127;
r4 = log(10)/20;
outval = 0;

function f (x) (
x < limit ? (
x*r3;
) : (
exp((maxCCvalue-x) * r5);
);
)

@slider
inChannel = slider1;
modcc = slider2;
dbperstep = slider3;
db20perstep = dbperstep/20;
p1 = 1 / log(10) / db20perstep;
p2 = 1 / maxCCvalue;
p3 = p1 + p2;
limit = (-p3+0.5) |0;
r1 = (maxCCvalue-limit) * dbperstep;
r2 = exp(log(10)*r1/20);
r3 = r2 / limit;
r5 = dbperstep*r4;
s1 = exp(log(10)*slider4/20);
s2 = 1 / s1;
f1 = f(1);
outcc = slider6-1;
sendcc = slider7;

@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 == modcc ? ( // Is it the right CC?
modval = msg3;
modval ? (
outlevel < f1 ? outlevel = f1;
);
modlevel = f(modval);
// slider5 = modlevel; // test
);
);
);
midisend(offset, msg1, msg2, msg3); // pass through
);

modval ? (
modstep = exp( log(modlevel / outlevel) / samplesblock);
modstep == 1 ? (
stepping = 0;
) : (
modstep > s1 ? (
modstep = s1;
) : modstep < s2 ? (
modstep = s2;
);
stepping = 1;
);
) : (
modstep = s2;
);

outcc >= 0 ? (
outlevel <= f1 ? (
outval ? (
outval = 0;
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
) : outlevel == 1 ? (
!outval ? (
sendcc == 2 ? (
outval = 127;
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
)
) : (
!outval ? (
sendcc == 1 ? (
outval = 127;
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
);
);
);

@sample
outlevel *= modstep;
spl0*=outlevel;
spl1*=outlevel;


@gfx 640 400

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

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

q1 = gfx_w / maxCCvalue;
q2 = gfx_h;


//gfx_line();
gfx_r=gfx_g=gfx_b=1;
gfx_y = 0;
gfx_x = 0;
x = 0;
while (x<=maxCCvalue) (
a = x*q1;
b = gfx_h - f(x)*q2;
gfx_lineto(a, b, 1);
x = x+1;
);
gfx_y = 0;
gfx_x = modval*q1;
gfx_lineto(gfx_x, gfx_h);
gfx_x = 0;
gfx_y = gfx_h-outlevel*q2;
gfx_lineto(gfx_w, gfx_y);

pipelineaudio
02-13-2018, 03:40 PM
Trying it now! Thank you!

pipelineaudio
02-13-2018, 03:53 PM
Ok, if I set it to never, then it never sends a value on that cc, whether 0 or 127

If I set it to send at -127, it works every other time, sort of. I think whats happening is upon channel activate, it sends the 127 muting the track again, let me try one more trick to see if I can get this working. Curses on these midi learn actions, if we had regular control over them, this would be duck soup

pipelineaudio
02-13-2018, 09:26 PM
Lets see if we can get a script for this, it might be the best move.

If you have any ideas how to make it work with the plugin I'm all ears, I think that if it sends ANYTHING on the mute CC when it is called upon to ramp up, the way reaper's midi works sends it a damn mute. I'll see if I can't find some sort of midi filter to check that for sure though

pipelineaudio
02-13-2018, 09:57 PM
If I use piz's midiConverter 3 plugin to block value 127, it seems to be working!

Is there a way to mod the JS to send value 127 never but send value 0 with the same choices send 127 has at the moment?

mschnell
02-13-2018, 11:00 PM
Ok, if I set it to never...,
Right you are. There was as bug.
Here's Version 3.1.
-Michael

// Author: Michael Schnell, based on a work of Time Waster (M. Smith)
// License: LGPL - http://www.gnu.org/licenses/lgpl.html
//
// The midi CC values 0 ... 127 are mapped to an "amplifier" curve that consists of a linear and an exponential part
// in a way, that with CC = 0 the amplification is 0 (-inf dB) and with CC = 127 the amplification is 1 (0db)
// A slider defines the amount (in dB), the amplification is reduced with each CC step.
// According to that, the breakpoint between the exponential and the linear part is set so that
// at this point the value and the slope of the curves match.
// Below the breakpoint, a linear curve is used so that with CC = 0 the amplification is Zero (-infinity dB).
// Another slider defines the maximum speed the amplification is modulated. This is set in dB per modulation step.
// (Moreover the maximum speed used is reaching a new defined level in as many steps a samples in a block)
// A graph shows as well the curve (Amplification vs CC steps), as the dynamic movement of the amplification level.



desc:Midi Volume Control
version:3.1

slider1:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI Input 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,12 6,127}>CC Input
slider3:-0.3<-0.6,-0.08,0.01>Attenuation per CC step
slider4:0.003<0.0005, 0.01, 0.0001>max step(dB)
//slider5:0<0,1,0.01>Factor (Test)
slider6:0<0,127,1{None,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,12 6,127}>Muting Notofication CC
slider7:0<0,2,1{Never,-inf db,0 dB}>send CC = 127

@init
modval = 0;
// prelevel = 0;
maxCCvalue = 127;
r4 = log(10)/20;
outval = 0;

function f (x) (
x < limit ? (
x*r3;
) : (
exp((maxCCvalue-x) * r5);
);
)

@slider
inChannel = slider1;
modcc = slider2;
dbperstep = slider3;
db20perstep = dbperstep/20;
p1 = 1 / log(10) / db20perstep;
p2 = 1 / maxCCvalue;
p3 = p1 + p2;
limit = (-p3+0.5) |0;
r1 = (maxCCvalue-limit) * dbperstep;
r2 = exp(log(10)*r1/20);
r3 = r2 / limit;
r5 = dbperstep*r4;
s1 = exp(log(10)*slider4/20);
s2 = 1 / s1;
f1 = f(1);
outcc = slider6-1;
sendcc = slider7;

@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 == modcc ? ( // Is it the right CC?
modval = msg3;
modval ? (
outlevel < f1 ? outlevel = f1;
);
modlevel = f(modval);
// slider5 = modlevel; // test
);
);
);
midisend(offset, msg1, msg2, msg3); // pass through
);

modval ? (
modstep = exp( log(modlevel / outlevel) / samplesblock);
modstep == 1 ? (
stepping = 0;
) : (
modstep > s1 ? (
modstep = s1;
) : modstep < s2 ? (
modstep = s2;
);
stepping = 1;
);
) : (
modstep = s2;
);

outcc >= 0 ? (
outlevel <= f1 ? (
outval ? (
outval = 0;
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
) : outlevel == 1 ? (
!outval ? (
sendcc == 2 ? (
outval = 127;
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
)
) : (
!outval ? (
sendcc != 2 ? (
outval = 127;
sendcc ? (
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
);
);
);
);

@sample
outlevel *= modstep;
spl0*=outlevel;
spl1*=outlevel;


@gfx 640 400

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

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

q1 = gfx_w / maxCCvalue;
q2 = gfx_h;


//gfx_line();
gfx_r=gfx_g=gfx_b=1;
gfx_y = 0;
gfx_x = 0;
x = 0;
while (x<=maxCCvalue) (
a = x*q1;
b = gfx_h - f(x)*q2;
gfx_lineto(a, b, 1);
x = x+1;
);
gfx_y = 0;
gfx_x = modval*q1;
gfx_lineto(gfx_x, gfx_h);
gfx_x = 0;
gfx_y = gfx_h-outlevel*q2;
gfx_lineto(gfx_w, gfx_y);

mschnell
02-13-2018, 11:08 PM
Lets see if we can get a script for this, it might be the best move.
I seriously doubt this, as it will make the information flow much more confusing. That is why I'm trying to do as little as possible in the realm of the "Control Path", leaving all native Reaper features available for use in the normal way for "naive" users to tweak their setup.

I'd like to provide a toolbox for non-programmers that is supposed to work as well for audio-input (Guitar) as for Midi-input (keyboard) players, using a wide range of patch selecting controllers.

This is supposed to be crafted in the least confusing way possible:
- the most obvious information flow possible
- predefined sufficiently versatile JSFXes to do the realtime work
- some ReaScripts (e.g. using track templates or whatever) to help with the setup.

It would be sad to loose you with this task, as I'll nebver be able to decently test a "Guitarist's" setup.
I hope you'll be patient with trying to create your setup in this way.

-Michael

mschnell
02-13-2018, 11:13 PM
If I use piz's midiConverter 3 plugin to block value 127, it seems to be working!
Of course it does.
Of course I do have (and use) JSFXes that do exactly this (blocking certain Midi messages.
But I'd like to do the JSFX in a way it is usable as much "out of the box" as possible for this task, so please test the new version.

Thanks,
-Michael

pipelineaudio
02-13-2018, 11:30 PM
AWESOME!!!! GOing to grab the new version now, but here is a test with the piz blocker....MIDI VOlume 3.0 with both faders set to the full right

Holy crap man!!!!!!!!!!!!!

Seriously!

https://www.instagram.com/p/BfKruzgh7ST/?taken-by=pipelineaudio

pipelineaudio
02-13-2018, 11:32 PM
I'm thinking with that script loader I mocked up, scripts would be even easier than JSFX's. Really, this functionality should be built into SWS Live Configs. Really the only thing I'm using live configs for at this point is a script loader. Everything else is handled by your plugs

pipelineaudio
02-13-2018, 11:51 PM
OK, MIDI VOlume Control 3.1 works perfect with no piz VST needed! Gonna make a few templates now, but I have some issues

Lots of custom commands involved, not sure how to just send those.

Mapping the CC to fire the action is a MASSIVE MASSIVE pain, hopefully that will be exported with the keystrokes, but I'm not sure it will. SOmething seriously has to be done about REAPER's MIDI learn

Naming JSFX....I never know how to do this properly so the right name comes up, I dont want someone to grab the template and not be able to use it because the plugin was named wrong by me and all the settings are gone

pipelineaudio
02-14-2018, 12:06 AM
the visuals still make it look like it fades out long before the other way is finished fading in, is that right?

For some reason this has less dropout running before the guitar fx than after, and I swear it should be the other way

mschnell
02-14-2018, 07:39 AM
Mapping the CC to fire the action is a MASSIVE MASSIVE pain,
I perfectly understand this.

In fact I suppose LiveConfigs has been created just to avoid this.

We should develop some ideas how to make LiveConfigs drive the switches without needing additional actions.

If you have any idea, please let me know.

If not, please try to describe what exactly you are doing right now. Maybe some workalike implementations comes in my mind. As you know, I can easily do JSFXes that do close to everything (but make a cup of coffee for you).

Maybe we even could replace LiveConfigs by an appropriate "Master" JSFX (that send Midi messages to the audio threads that each feature a "Midi To Volume" instance to perform the patch switching.

Maybe a single simple ReaScript can be made, that mutes/unmutes tracks as commanded by the "Master" JSFX and/or "Midi To Volume".

(For this, I would need to know how to send parameters - such as Midi CC # and value - to a ReaScript. )

-Michael

mschnell
02-14-2018, 07:45 AM
Naming JSFX....
In the end we will push the JSFXes /(and scripts) to ReaPack. Then then naming is obvious, and installation is a glimpse.

-Michael

mschnell
02-14-2018, 07:46 AM
the visuals still make it look like it fades out long before the other way is finished fading in, is that right?

For some reason this has less dropout running before the guitar fx than after, and I swear it should be the other way

Do you think you need a delay before fading out ?

This of course is no problem at all.

-Michael

mschnell
02-14-2018, 10:43 AM
I just wrote a chapter on Midi Routing in Reaper to be included in the LiveConfigs User Guide. It's not ready to be included, yet, but maybe it helps developing some ideas.

-> http://www.bschnell.de/routing.pdf

-Michael

pipelineaudio
02-14-2018, 04:59 PM
I have tons of exciting news and I am super excited to go check out your PDF. But I have to make sure my Valentine's Day stuff is set right so the rest of my life is not in perilous doubt :)

But holy crap man this is all super awesome!

pipelineaudio
02-14-2018, 09:56 PM
scratch that, pilot error

I wonder if the dwell time should only apply to turning the effect on rather than turning it off

pipelineaudio
02-14-2018, 10:04 PM
REAPER Users Group FB Page member Daniel Perry made a script for adjusting the track fades and muting. It seems to be working super good for switching between distorted sounds, while the MIDI volume control seems to be working better for things that are sending to spillover tracks and clean sounds

https://www.instagram.com/p/BfLIck_B0c3/?taken-by=pipelineaudio

mschnell
02-14-2018, 10:27 PM
I wonder if the dwell time should only apply to turning the effect on rather than turning it off
That might be a good idea.

So if we finally do a decently dedicated JSFX (not just an enhanced "Volume" baby) we will implement asymmetric behavior regarding dwell time and gain slope.

(For obvious reasons I will not touch the track faders. For other obvious reasons I ignore FaceBook.)

-Michael

pipelineaudio
02-14-2018, 10:44 PM
Alright, here's a working template https://www.dropbox.com/s/urfm8l5ztv31v67/REAPER%20Live%20-%20Fadescript%20no%20spillover.zip?dl=0


I'll strip it further later for a real template, but this is working on both computers here

pipelineaudio
02-14-2018, 10:53 PM
(For obvious reasons I will not touch the track faders. For other obvious reasons I ignore FaceBook.)

-Michael

I'd love it if the fader script did the recieves as an option instead of the track faders, but seriously, the track fader thing really sounds good for some of the switching. I thought' I'd get more zipper noise, but nope. I'm wondering if the very original SWS Mute and Solo Groups thing would have worked better given a really long mute fade time in prefs...I thought I tried it, but I'm not sure

mschnell
02-14-2018, 11:46 PM
I'd get more zipper noise,
The final JSFX will feature different settings for the fade in and fade out slope. As the zipper noise needed to be tweaked against the switching delay, I suppose you will be able to set the optimal fade speed for the application.

-Michael

mschnell
02-15-2018, 09:37 AM
Here is the asymmetric version of "Midi Volume", now renamed to "Midi Fade X", as it is supposed to do fade-ins and fade-outs in a nice way.

Please test, as I would like to add "about" text and provide it via ReaPack.

Regarding the "Pipe Filter", same is asymmetric, anyway. The Threshold is defined as the point to switch "on". The Hysteresis and the dwell time just hold off the switching "off". The invert setting just toggles the 0 and 127 output values.

I understood that this is the behavior, you wanted to see. If you need a modification or enhancement, please let me know. (I could imagine by "invert" you meant input invert rather then output invert).

-Michael


// Author: Michael Schnell, based on "Midi Volume"
// License: LGPL - http://www.gnu.org/licenses/lgpl.html
//
// The midi CC values 0 ... 127 are mapped to an "amplifier" curve that consists of a linear and an exponential part
// in a way, that with CC = 0 the amplification is 0 (-inf dB) and with CC = 127 the amplification is 1 (0db)
// A slider defines the amount (in dB), the amplification is reduced with each CC step.
// According to that, the breakpoint between the exponential and the linear part is set so that
// at this point the value and the slope of the curves match.
// Below the breakpoint, a linear curve is used so that with CC = 0 the amplification is Zero (-infinity dB).
// Another slider defines the maximum speed the amplification is modulated. This is set in dB per modulation step.
// (Moreover the maximum speed used is reaching a new defined level in as many steps a samples in a block)
// A graph shows as well the curve (Amplification vs CC steps), as the dynamic movement of the amplification level.



desc:Midi Fade X
version:1.0

slider1:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI Input 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,12 6,127}>CC Input
slider3:-0.3<-0.6,-0.08,0.01>Attenuation per CC step
slider4:0.003<0.0005, 0.01, 0.0001>max step fade in(dB)
slider5:0.003<0.0005, 0.01, 0.0001>max step fade out(dB)
//slider6:0<0,1,0.01>Factor (Test)
slider7:0<0,127,1{None,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,12 6,127}>Muting Notofication CC
slider8:0<0,2,1{Never,-inf db,0 dB}>send CC = 127

@init
modval = 0;
// prelevel = 0;
maxCCvalue = 127;
r4 = log(10)/20;
outval = 0;

function f (x) (
x < limit ? (
x*r3;
) : (
exp((maxCCvalue-x) * r5);
);
)

@slider
inChannel = slider1;
modcc = slider2;
dbperstep = slider3;
db20perstep = dbperstep/20;
p1 = 1 / log(10) / db20perstep;
p2 = 1 / maxCCvalue;
p3 = p1 + p2;
limit = (-p3+0.5) |0;
r1 = (maxCCvalue-limit) * dbperstep;
r2 = exp(log(10)*r1/20);
r3 = r2 / limit;
r5 = dbperstep*r4;
s1 = exp(log(10)*slider4/20);
s2 = exp(log(10)*slider5/20);
s2 = 1 / s2;
f1 = f(1);
f01 = f(0.1);
outcc = slider7-1;
sendcc = slider8;

str = sprintf(#, " %.0f dB -> off", log(f01)/r4);;

@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 == modcc ? ( // Is it the right CC?
modval = msg3;
modval ? (
outlevel < f1 ? outlevel = f1;
);
modlevel = f(modval);
// slider5 = modlevel; // test
);
);
);
midisend(offset, msg1, msg2, msg3); // pass through
);

modval ? (
modstep = exp( log(modlevel / outlevel) / samplesblock);
modstep == 1 ? (
stepping = 0;
) : (
modstep > s1 ? (
modstep = s1;
) : modstep < s2 ? (
modstep = s2;
);
stepping = 1;
);
) : (
modstep = s2;
);

outcc >= 0 ? (
outlevel <= f01 ? (
outval ? (
outval = 0;
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
) : outlevel == 1 ? (
!outval ? (
sendcc == 2 ? (
outval = 127;
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
)
) : (
!outval ? (
sendcc != 2 ? (
outval = 127;
sendcc ? (
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
);
);
);
);

@sample
outlevel *= modstep;
spl0*=outlevel;
spl1*=outlevel;


@gfx 640 400

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

outcc >= 0 ? (
outval ? (
gfx_r = 0; gfx_g = 0.5; gfx_b = 0;
gfx_x = 0;
gfx_y = 0;
gfx_rectto(gfx_w, gfx_h/2);
);
);

q1 = (gfx_w-3) / maxCCvalue;
q2 = gfx_h-2;


//gfx_line();
gfx_r=gfx_g=gfx_b=1;
gfx_y = 0;
gfx_x = 0;
x = 0;
while (x<=maxCCvalue) (
a = x*q1;
b = gfx_h - f(x)*q2;
gfx_lineto(a, b, 1);
x = x+1;
);
gfx_y = 0;
gfx_x = modval*q1 + 1;
gfx_r=1; gfx_g=1; gfx_b=0;
gfx_rectto(gfx_x+3, gfx_h);
gfx_x = 0;
gfx_y = gfx_h-outlevel*q2-2;
gfx_r=1; gfx_g=1; gfx_b=0;
gfx_rectto(gfx_w, gfx_y+3);

outcc >= 0 ? (
gfx_x = 10;
gfx_y = gfx_h-20;
gfx_r=1; gfx_g=0; gfx_b=0;
gfx_drawstr(str);
);

pipelineaudio
02-15-2018, 03:36 PM
Awesome! I'll check those out now.
This is updated to put the wah on bypass on patch changes and now includes one project file with and one project file without some spillover fx

https://www.dropbox.com/s/u7cs0tdptwbjkuf/REAPER Live Fadescript.zip?dl=0

pipelineaudio
02-15-2018, 04:12 PM
Ok, I can get this to be more than acceptable, but I'm still having an issue that the fade in really seems to start so much later than the fade out. I'm watching them both on the screen

I guess my major goal now it to fade them so that there is both no dropout in between patches, but also no volume jump up when they switch. Its a tightrope! I'm so close....trying both before and after the audio plugins

Its probably just a matter of getting these settings right on my part, I'll keep experimenting. For some reason, the track volume fader is able to do this, while the fade in fade out plugs I'm having a harder time with

pipelineaudio
02-15-2018, 04:20 PM
For the cleans if I leave them long, its absolutely awesome. The distortion tracks are the tricky ones

pipelineaudio
02-15-2018, 05:03 PM
So now we're picking nits....I WISH I could figure out how to make the magical no dropout, perfect volume ride across the board fade in and fade out, but this is already so much closer to that goal than any rack system I've ever seen.

I still feel like the fade in starts much later than the fade out, but who knows...maybe its the mute/unmute fade time?

Still, this is more than UBER right now, here's a now setup with Midi Fader X and spillover

About to test it on the craptop

https://www.dropbox.com/s/koyqlzt8o6sqzbs/REAPER%20Live%20MFX%202-15-2018.zip?dl=0

pipelineaudio
02-15-2018, 05:46 PM
WOOHOOO!!!! Still not thrilled at the exact crossfade, but its certainly running on the craptop!

https://www.instagram.com/p/BfPOYFohwKg/?taken-by=pipelineaudio

mschnell
02-15-2018, 10:38 PM
I'm still having an issue that the fade in really seems to start so much later than the fade out. I'm watching them both on the screen
The audio attenuation is an exponential curve (linear db), while the graph is linear (to be able to show the (white) settable CC Value -> attenuation curve).

Obviously the fade in needs to start at a certain non-zero point (that with any step (sample) is multiplied by a factor). If this level is too high there will be unwanted side-effects. I suppose, it's too low for your application.

I'll take another look...

-Michael

pipelineaudio
02-15-2018, 11:05 PM
once it starts it happens fast enough, but its just that it waits a long time before it starts...I wonder if its not a different issue, just that SWS Live action doesnt call it till too late

Can you try running a sine wave and see if theres a way you can switch from one row to another really smoothly?

I'm going to see if theres a way to run the fades at the same time by putting the fade out of all tracks on the activate action

mschnell
02-15-2018, 11:34 PM
I'm sure we'll get this sorted out...
-Michael

pipelineaudio
02-15-2018, 11:36 PM
I wonder if it has to wait that 5msec for the mute before fading out, in order to get it straight...it doesnt seem like a 5ms drop though

pipelineaudio
02-16-2018, 12:03 AM
I tried with both of them in the same action call, seemed about the same

mschnell
02-16-2018, 05:40 AM
I wonder if it has to wait that 5msec for the mute before fading out, in order to get it straight...it doesnt seem like a 5ms drop though

??? 5 mSec between which and what ????

It only can react with any sample block, as any audio and midi data is transported in these chunks. So there is a limit.

-Michael

mschnell
02-16-2018, 01:57 PM
Now with shorter audible fade in delay, definable via a "start fade in" slider. (To be tweaked against noise when switching on.)

Also added a small "handbook" at the beginning of the code (in ReaPack format, sorry for bad English ;) ).

Please test !
-Michael


desc:Midi Fade X
author: Michael Schnell (mschnell@bschnell.de)
version: 1.1
changelog: initial release
donation: United Nations Foundation http://www.unfoundation.org/
about:
## Description

The midi CC values 0 ... 127 are mapped to an "amplifier" curve that consists of a linear and an exponential part
in a way, that with CC = 0 the amplification is 0 (-inf dB) and with CC = 127 the amplification is 1 (0db).

A slider defines the amount (in dB), the amplification is reduced with each CC step.

According to that, the breakpoint between the exponential and the linear part is set so that
at this point the value and the slope of the curves match.

Below the breakpoint, a linear curve is used so that with CC = 0 the amplification is Zero (-infinity dB).

Two sliders defines the maximum fade-in (up) and fade-out (down) speed the amplification is modulated. This is set in dB per modulation step. Moreover the maximum speed used is reaching a new defined level in as many steps a samples in a block.

The slider "start fade in" defines the starting point of the upwards move of the amplification. Same is given as the equivalent of an input CC value (1 ... 31)

The "Muting Notification" sets a CC # which is sent out with value 0, when the amplification drops below the mute level (equivalent to an input CC value of one tenth of that defined for "start fade in").

The "send CC = 127" setting defines whether this CC is sent with value 127, when the amplification rises above the mute level or when it reaches 0 dB.

A graph shows as well the curve (linear, Amplification vs. CC steps), as the dynamic movement of the input CC and the amplification level.

Moreover, the fade in start and - if appropriate - the mute level is shown.

If the "Muting Notification CC" is set, the mute state is visualized by a green rectangle.

## Limitations

As due the the description above, the modulation speed is limited to reaching the target level in a timespan at least
as the duration of a sample block, the current version of this plugin is not suitable for synth-like application that
intend to implement a VCA.

// 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 Input 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,12 6,127}>CC Input
slider3:-0.3<-0.6,-0.08,0.01>Attenuation per CC step
slider4:0.003<0.0005, 0.01, 0.0001>max step fade in(dB)
slider5:0.003<0.0005, 0.01, 0.0001>max step fade out(dB)
slider6:1<1,31,1>start fade-in (CC Value)
//slider7:0<0,1,0.01>Factor (Test)
slider8:0<0,127,1{None,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,12 6,127}>Muting Notification CC
slider9:0<0,2,1{Never,-inf db,0 dB}>send CC = 127

@init
modval = 0;
// prelevel = 0;
maxCCvalue = 127;
r4 = log(10)/20;
outval = 0;

function f (x) (
x < limit ? (
x*r3;
) : (
exp((maxCCvalue-x) * r5);
);
)

@slider
inChannel = slider1;
modcc = slider2;
dbperstep = slider3;
db20perstep = dbperstep/20;
p1 = 1 / log(10) / db20perstep;
p2 = 1 / maxCCvalue;
p3 = p1 + p2;
limit = (-p3+0.5) |0;
r1 = (maxCCvalue-limit) * dbperstep;
r2 = exp(log(10)*r1/20);
r3 = r2 / limit;
r5 = dbperstep*r4;
s1 = exp(log(10)*slider4/20);
s2 = exp(log(10)*slider5/20);
s2 = 1 / s2;
finstart = slider6;
f1 = f(finstart);
f01 = f(finstart/10);
outcc = slider8-1;
sendcc = slider9;

str1 = sprintf(#, "fade in start -> %.0f dB", log(f1)/r4);;
str01 = sprintf(#, "mute level -> %.0f dB", log(f01)/r4);;

@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 == modcc ? ( // Is it the right CC?
modval = msg3;
modval ? (
low ? (
outlevel < f1 ? outlevel = f1;
);
) : (
low = 1;
);
modval >= finstart ? (
low = 0;;
);
modlevel = f(modval);
// slider7 = modlevel; // test
);
);
);
midisend(offset, msg1, msg2, msg3); // pass through
);

modval ? (
low ? (
modstep = 1;
) : (
modstep = exp( log(modlevel / outlevel) / samplesblock);
);
modstep == 1 ? (
stepping = 0;
) : (
modstep > s1 ? (
modstep = s1;
) : modstep < s2 ? (
modstep = s2;
);
stepping = 1;
);
) : (
modstep = s2;
);

outcc >= 0 ? (
outlevel <= f01 ? (
outval ? (
outval = 0;
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
) : outlevel == 1 ? (
!outval ? (
sendcc == 2 ? (
outval = 127;
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
)
) : (
!outval ? (
sendcc != 2 ? (
outval = 127;
sendcc ? (
midisend(offset, inChannel+$xB0, outcc, outval); // pass through
);
);
);
);
);

@sample
outlevel *= modstep;
spl0*=outlevel;
spl1*=outlevel;


@gfx 640 400

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

outcc >= 0 ? (
outval ? (
gfx_r = 0; gfx_g = 0.5; gfx_b = 0;
gfx_x = 0;
gfx_y = 0;
gfx_rectto(gfx_w, gfx_h/2);
);
);

q1 = (gfx_w-3) / maxCCvalue;
q2 = gfx_h-2;


//gfx_line();
gfx_r=gfx_g=gfx_b=1;
gfx_y = 0;
gfx_x = 0;
x = 0;
while (x<=maxCCvalue) (
a = x*q1;
b = gfx_h - f(x)*q2;
gfx_lineto(a, b, 1);
x = x+1;
);
gfx_x = 0;
gfx_y = gfx_h -f(finstart)*q2;
gfx_lineto(gfx_w, gfx_y);
findisplay = gfx_y;

gfx_y = 0;
gfx_x = modval*q1 + 1;
gfx_r=1; gfx_g=1; gfx_b=0;
gfx_rectto(gfx_x+3, gfx_h);
gfx_x = 0;
gfx_y = gfx_h-outlevel*q2-2;
gfx_r=1; gfx_g=1; gfx_b=0;
gfx_rectto(gfx_w, gfx_y+3);

gfx_x = 10;
gfx_r=1; gfx_g=0; gfx_b=0;
gfx_y = findisplay-20;
gfx_drawstr(str1);
outcc >= 0 ? (
gfx_x = 10;
gfx_y = gfx_h-12;
gfx_drawstr(str01);
);

pipelineaudio
02-16-2018, 02:14 PM
Awesome!!! GOnna try it now.

I dont know if my logic is broken, but I was thinking that the 5msec fade in time for the mute spelled out in preferences was throwing the whole game off, but who knows.

mschnell
02-16-2018, 03:34 PM
Sorry. No idea what you are talking about :(

-Michael

mschnell
02-16-2018, 03:50 PM
Regarding the "Pipe Filter" ... the dwell time just hold off the switching "off".
That was a lie. the dwell time works in both directions.

Is there anything you want to be modified ?

-Michael

pipelineaudio
02-16-2018, 04:04 PM
I got one that I was leaving till the end when it was nitpicking time: When you first load one of these projects, you need to step through all the pedals several times before things work correctly...I'm wondering if theres some sort of preloadable midi something or another to get it all set to work on the first pedal press

pipelineaudio
02-16-2018, 04:31 PM
hmmm, that start fade in thing seems to be making it really much much better....testing some more

Also found a way to toggle between rows on the same pedal, this is getting crazy good!

mschnell
02-17-2018, 12:20 AM
hmmm, that start fade in thing seems to be making it really much much better
Great ! This is what I was hoping for.

It's astonishing, how complex a simple fade-in / spill over algorithm is when looking at it in detail, isn't it ? :)

Let me know when you think it works satisfactory, so that I can push it on ReaPack.

-Michael

mschnell
02-17-2018, 01:59 AM
When you first load one of these projects, you need to step through all the pedals several times before things work correctly...
That of course is a bad thing.

You need to find out what parameters in any plugin are in an undesired state after startup.

In fact Reaper saves all parameters of all plugins with the project and pushes them onto same when loading the project. So what goes wrong here ?

In my setup I send all managed (realtime-tweakable by the controller board) CCs to the appropriate plugins with any patch change, but this is done because I save these parameters in realtime, while other patches are activated.

-Michael

mschnell
02-17-2018, 02:04 AM
Also found a way to toggle between rows on the same pedal, this is getting crazy good!
I hate toggle switches, as you never know in what state they are. But as all the plain old guitar stomp boxes work that way, I suppose you are trained. :)

I still m thinking about dumping LiveConfigs in a setup as yours and replace it by a dedicated JSFX, as LiveConfigs seems to add more confusion than functionality.

Are you inclined to do some tests on that, once you are happy with the currant project ?

-Michael

pipelineaudio
02-17-2018, 02:34 AM
I hate toggle switches, as you never know in what state they are.

Even better, I'm using a modded version of the wah reset script so that it is always on the first toggle state if I move away from it!

I still m thinking about dumping LiveConfigs in a setup as yours and replace it by a dedicated JSFX, as LiveConfigs seems to add more confusion than functionality.

Are you inclined to do some tests on that, once you are happy with the currant project ?

-Michael

Hell yeah...Remember that I'm still using live configs as an action loader on activate and deactivate though. Thats why I was hoping someone would make that spreadsheet script

mschnell
02-17-2018, 03:07 AM
I'm still using live configs as an action loader on activate and deactivate though.
Of course I do know this.

The "low confusion" concept I have in mind is:
- do a JSFX that controls the "Midi Fade X" instances in multiple tracks as a replacement for the LiveConfig "input track" and track mute/unmute features.
- same also will send Midi messages to the plugins to manage their state
- if something is necessarily be done in the Reaper Control Path (such as firing an action) the plugin will send Midi messages there via MidiToReaControlPath
- of course the muting of tracks (to save CPU) initiated by Midi Fade X also is done via MidiToReaControlPath and firing an action (I understand that you do exactly this right now)

My intention is to avoid sending information via the "ControlPath" barrier multiple times. Everything is done in the user track area and only necessary commands are sent "down".

By this I hope to be able to do the central "LiveConfigJS" JSFX in a way configurable for a wide range of usage case (including an advanced toggle button feature, once I happen to understand how this is supposed to work.)

-Michael

pipelineaudio
02-17-2018, 04:14 AM
That sounds like an EXCELLENT idea

pipelineaudio
02-17-2018, 04:25 AM
I think a really telling thing today, after the newest midi fade x version is that I stopped dicking with the setup, and just worked on sounds and actually just playing the guitar...it took a while to dawn on me that I wasn't worried about the fading system anymore

Also Justin told me to turn on multicore support for live plugins and man on the desktop it was just enough to not have to mute anything! Laptop wasn;t so lucky, but the mute and stuff is working so well now, I'm not worried about it

mschnell
02-17-2018, 05:13 AM
That sounds amazing !

I think it's really time to start advertising Reaper as the a basis for Live playing applications. For me, this was the motivation to use Reaper from the beginning. I only later started to use Reaper as a system for multitrack recording and production/mixing.

I wrote to Cocos' Webadmin with a request for installing a dedicated "Reaper for Live usage" (including "embedding" Reaper with other applications) subforum, where threads such as this one can reside / be moved to. (see -> https://forum.cockos.com/showthread.php?t=203312#14 )

Maybe you can talk to Justin about this issue.

Thanks,
-Michael

pipelineaudio
02-17-2018, 06:50 PM
I'm bugging him about it

pipelineaudio
02-18-2018, 12:18 AM
Woohoo! https://www.instagram.com/p/BfVDcFWBsYq/?taken-by=pipelineaudio

Even the BiasFX wah is working with the auto engage now

mschnell
02-18-2018, 01:09 AM
I have no Idea what th "BiasFX wah" is and what is special about it regarding auto-enging, but I am decently happy that the JSFX works for you.

-Michael

pipelineaudio
02-18-2018, 06:26 PM
That of course is a bad thing.

You need to find out what parameters in any plugin are in an undesired state after startup.

In fact Reaper saves all parameters of all plugins with the project and pushes them onto same when loading the project. So what goes wrong here ?

In my setup I send all managed (realtime-tweakable by the controller board) CCs to the appropriate plugins with any patch change, but this is done because I save these parameters in realtime, while other patches are activated.

-Michael

I'm trying to check with midi monitor, it seems like the commands are getting there, but since the tracks are muted at first, maybe thats the issue?

mschnell
02-18-2018, 10:21 PM
I'm trying to check with midi monitor, it seems like the commands are getting there, but since the tracks are muted at first, maybe thats the issue?

Yep. If "saving CPU when muted" is activated, the plugins are in a deep sleep if the track is muted and will not react on any attempt to change any parameter.

I suppose with my setup sending all parameters to the plugins after unmuting the track (plus a short waiting time) this is avoided. But I fo this changes only by sending CC messages to the plugins.

OTOH, LiveConfigs pushes setups to the plugins when it unmutes a track. This seems to work out of the box.

-Michael

mschnell
02-18-2018, 10:36 PM
Also Justin told me to turn on multicore support for live plugins and man ...
Can you tell me more about this option (how to activate it, where is it documented ?) ?
Thanks,
-Michael

pipelineaudio
02-18-2018, 11:32 PM
options preferences/audio/buffering Allow live FX multiprocession on:

mschnell
02-19-2018, 08:23 AM
Thanks,
Do you know what exactly this does ?
-Michael

pipelineaudio
02-19-2018, 11:04 AM
I think it allows more than one core to be used for fx on armed tracks, which I guess it doesn’t do by default, but I’m not sure. All I know is that by turning it on, the rt longest block went from 8 ms to 3.5

Also, mikerophonics told me about an Sws command to load something on project load,so maybe I can figure a way to get rid of the initial weirdness I get when I launch a project

mschnell
02-19-2018, 11:52 AM
I think it allows more than one core to be used for fx on armed tracks, which I guess it doesn’t do by default, but I’m not sure. All I know is that by turning it on, the rt longest block went from 8 ms to 3.5

I understand that for each track a CPU thread (and hence a core, if available, is used. Maybe activating this option allows for multiple threads/Cores per thread.

Also, mikerophonics told me about an Sws command to load something on project load,so maybe I can figure a way to get rid of the initial weirdness I get when I launch a project

I seem to remember that such a command does exist. Let me know what you get.

-Michael

pipelineaudio
02-19-2018, 03:13 PM
Works! I set a startup action to cylce thru all the pedals and pop up the tuner on project load, hitting any pedal after that goes right where its supposed to!

mschnell
02-19-2018, 10:32 PM
GREAT !
-Michael

pipelineaudio
02-20-2018, 11:42 PM
in Pipe Midi Filter, does "stretch" turn the threshold value into value 0 for the original CC? I think that's what it needs to do, but I'm not sure if I have it right

pipelineaudio
02-20-2018, 11:46 PM
ahh, I see, it stretches from the hysteresis bottom. I wonder if it would be better to have a long, dead, "zero" zone between the threshold and the hysteresis and start 0 from the threshold

pipelineaudio
02-21-2018, 01:35 AM
ok, I got it on the right path now.

mschnell
02-21-2018, 08:19 AM
ahh, I see, it stretches from the hysteresis bottom. I wonder if it would be better to have a long, dead, "zero" zone between the threshold and the hysteresis and start 0 from the threshold

Supposedly you are right. The current version is closer to the non-stretched variant. I think I could implement a triple selection.

-Michael

pipelineaudio
02-21-2018, 02:36 PM
can we start cc value 0 from the threshold beginning? I think that's what would seem best

mschnell
02-21-2018, 02:56 PM
here you are.
But I am not sure as this works as desired in the "invert" position.

-Michael


desc:Pipe Midi Filter
author: Michael Schnell (mschnell@bschnell.de)
version: 2.2
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,12 6,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,12 6,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
slider8:0<0,1,1{straight,stretch to low limit,stretch to high limit}>original CC

in_pin: none
out_pin: none

@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;
enhance = slider8;
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;
);
enhance == 1 ? (
msg3 -= thl;
msg3 /= 127-thl; // 0...1)
msg3 *= 127;
msg3 < 0 ? msg3 = 0;
mm = msg3;
) : enhance == 2 ? (
msg3 -= thh;
msg3 /= 127-thh; // 0...1)
msg3 *= 127;
msg3 < 0 ? msg3 = 0;
mm = msg3;
);
);
);
);
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 = 0; 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);

enhance ? (
gfx_r = 1; gfx_g = 1; gfx_b = 1;
gfx_y = gfx_h-1;
gfx_x = 0;
enhance == 1 ? (
x = thl / 127 * gfx_w;
) : (
x = thh / 127 * gfx_w;
);
gfx_lineto(x, gfx_y);
gfx_lineto(gfx_w, 0);
gfx_r = 1; gfx_g = 1; gfx_b = 0;
gfx_y = gfx_h - 1 - (mm / 127 * gfx_h);
gfx_x = 0;
gfx_lineto(gfx_w, gfx_y);
)

pipelineaudio
02-21-2018, 08:16 PM
Works perfect!

mschnell
02-21-2018, 10:14 PM
Great !

OTOH, I imagine that the "output inverted" option you requested is to allow for disengaging the plugin when the pedal is in high position. This would mean that the stretching should be done for Zero to one of the limits, and not from one of the limits to 127, as is selectable now.

Do you think such option would be desirable ?

-Michael

pipelineaudio
02-22-2018, 12:17 AM
Ahh maybe, I might be weird in that I like it engaging from the bottom of the pedal, but maybe people like it the other direction

mschnell
02-22-2018, 06:48 AM
Ahh maybe, I might be weird in that I like it engaging from the bottom of the pedal, but maybe people like it the other direction

I don't have a "Wha" pedal, but to me it seems like it is supposed to pass through the signal when pushed up (where Midi pedals tend to send 127), while the filter is "engaged" when drawn backwards (to Zero).

-Michael

pipelineaudio
02-22-2018, 10:33 AM
That’s the traditional way, but after trying the Tonestack and axe fx way, and initially really skeptical about it, I was hooked

mschnell
02-22-2018, 03:56 PM
Rather final version supporting five stretching modes.

Have fun !
-Michael


desc:Pipe Midi Filter
author: Michael Schnell (mschnell@bschnell.de)
version: 3.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,12 6,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,12 6,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
slider8:0<0,4,1{straight,stretch low limit to 127,stretch high limit to 127,stretch 0 to low limit,stretch 0 to high limit}>original CC

in_pin: none
out_pin: none

@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;
enhance = slider8;
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;
);
enhance == 1 ? (
msg3 -= thl;
msg3 /= 127-thl; // 0...1)
msg3 *= 127;
msg3 < 0 ? msg3 = 0;
mm = msg3;
) : enhance == 2 ? (
msg3 -= thh;
msg3 /= 127-thh; // 0...1)
msg3 *= 127;
msg3 < 0 ? msg3 = 0;
mm = msg3;
) : enhance == 3 ? (
msg3 /= thl; // 0...1)
msg3 *= 127;
msg3 > 127 ? msg3 = 127;
mm = msg3;
) : enhance == 4 ? (
msg3 /= thh; // 0...1)
msg3 *= 127;
msg3 > 127 ? msg3 = 127;
mm = msg3;
);
);
);
);
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 = 0; 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);

enhance ? (
gfx_r = 1; gfx_g = 1; gfx_b = 1;
enhance == 1 ? (
gfx_y = gfx_h-1;
gfx_x = thl / 127 * gfx_w;
gfx_lineto(gfx_w, 0);
) : enhance == 2 ? (
gfx_y = gfx_h-1;
gfx_x = thh / 127 * gfx_w;
gfx_lineto(gfx_w, 0);
) : enhance == 3 ? (
gfx_y = 0;
gfx_x = thl / 127 * gfx_w;
gfx_lineto(0, gfx_h-1);
) : enhance == 4 ? (
gfx_y = 0;
gfx_x = thh / 127 * gfx_w;
gfx_lineto(0, gfx_h-1);
);
// gfx_lineto(x, gfx_y);
gfx_r = 1; gfx_g = 1; gfx_b = 0;
gfx_y = gfx_h - 1 - (mm / 127 * gfx_h);
gfx_x = 0;
gfx_lineto(gfx_w, gfx_y);
)

pipelineaudio
02-22-2018, 07:23 PM
Working AWESOME! The only thing I could possibly say at this point, is I'd like to have the dwell time only able to affect turning it off, but its no big deal

mschnell
02-22-2018, 11:38 PM
No problem. Please test

Do you think we are raedy to rename it and load both plugins up to ReaPack ?

-Michael


desc:Pipe Midi Filter
author: Michael Schnell (mschnell@bschnell.de)
version: 3.2
changelog: initial release
donation: United Nations Foundation http://www.unfoundation.org/
about:
## Description
Pipe


## Limitations
Pipe






// Author: Michael Schnell
// 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,12 6,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,12 6,127}>CC Output
slider4:10<0,127,1>Threshold
slider5:5<0,64,1>Hysteresis
slider6:0<0,500,10>on dwell time (msek)
slider7:0<0,500,10>off dwell time (msek)
slider8:0<0,1,1{straight,invert}>Output
slider9:0<0,4,1{straight,stretch low limit to 127,stretch high limit to 127,stretch 0 to low limit,stretch 0 to high limit}>original CC

in_pin: none
out_pin: none

@init
out = 0;
outo = 0;
in = 0;
delay = 0;


@slider
inChannel = slider1;
inCC = slider2;
outCC = slider3;
thh = slider4;
thl = thh - slider5;
dton = slider6;
dtoff = slider7;
invert = slider8;
enhance = slider9;
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
outo > 64 ? (
f = f * dton / 1000; // minimum calls
) : (
f = f * dtoff / 1000; // minimum calls
);
f = 0 | f;
delay = f+1;
);
enhance == 1 ? (
msg3 -= thl;
msg3 /= 127-thl; // 0...1)
msg3 *= 127;
msg3 < 0 ? msg3 = 0;
mm = msg3;
) : enhance == 2 ? (
msg3 -= thh;
msg3 /= 127-thh; // 0...1)
msg3 *= 127;
msg3 < 0 ? msg3 = 0;
mm = msg3;
) : enhance == 3 ? (
msg3 /= thl; // 0...1)
msg3 *= 127;
msg3 > 127 ? msg3 = 127;
mm = msg3;
) : enhance == 4 ? (
msg3 /= thh; // 0...1)
msg3 *= 127;
msg3 > 127 ? msg3 = 127;
mm = msg3;
);
);
);
);
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 = 0; 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);

enhance ? (
gfx_r = 1; gfx_g = 1; gfx_b = 1;
enhance == 1 ? (
gfx_y = gfx_h-1;
gfx_x = thl / 127 * gfx_w;
gfx_lineto(gfx_w, 0);
) : enhance == 2 ? (
gfx_y = gfx_h-1;
gfx_x = thh / 127 * gfx_w;
gfx_lineto(gfx_w, 0);
) : enhance == 3 ? (
gfx_y = 0;
gfx_x = thl / 127 * gfx_w;
gfx_lineto(0, gfx_h-1);
) : enhance == 4 ? (
gfx_y = 0;
gfx_x = thh / 127 * gfx_w;
gfx_lineto(0, gfx_h-1);
);
// gfx_lineto(x, gfx_y);
gfx_r = 1; gfx_g = 1; gfx_b = 0;
gfx_y = gfx_h - 1 - (mm / 127 * gfx_h);
gfx_x = 0;
gfx_lineto(gfx_w, gfx_y);
)

pipelineaudio
02-22-2018, 11:52 PM
That's perfect!

As far as I can tell these plugs are done

mschnell
02-23-2018, 12:41 AM
Great ! Thanks !

I'll upload them to ReaPack during the weekend.

-Michael

mschnell
02-23-2018, 01:51 PM
I uploaded them after adding a description to and improving the graphics of the "Midi Auto Engage" (renamed from "Pipe Filter").

Should appear there some day soon.

-Michael

pipelineaudio
02-25-2018, 08:18 PM
How crazy, last few days I've actually been playing my guitar and learning songs instead of worrying about programming pedalboards, its just been working fine, I think that's the biggest endorsement

mschnell
02-25-2018, 10:28 PM
Great ! Thanks for letting me know.
I of course daily use my Live playing setup for playing instead of for programming, since some years :)

Reaper is great tools and reliable basis for this stuff.

Recently, there were some ten new threads with comments or requests for help on this issue.

So let's spread the word ad continue to try to have a dedicated forum for "Reaper Live Usage".

-Michael

woodslanding
10-02-2018, 07:42 PM
Wow, this is a very exciting thread to find! I am also planning to use REAPER for live performance, using vsti's and audio effects.

I have a functioning setup right now, using Usine, but I'm working through what might be involved in porting it to REAPER. It is chock full of bugs, and the deal breaker is that changes I make are now often not saving correctly, so I've been losing a lot of work, and can't move the project forward. Also, I'm using an old version of the program, because new versions won't load my project. That said, it does do what I need, if I work around the bugs.

I have a walkthrough of the features here, if you are interested:
https://youtu.be/PCtKZgpXY00

These two plugins will definitely help. I downloaded the midi pipe one. But when I search repack for 'midi volume control' I get V1.0....

No biggie, I can copy from the forum, but I thought you might want to know.

EDIT: Saw where it was renamed MIDI FADE X. So all good!

cheers,
-eric

mschnell
10-02-2018, 11:54 PM
(Yep "extended fade function by Midi Control enabling cross-fading" :) )

Great !

While you use a touch screen for live performing. I decided to use a hardware controller and integrated a Behringer XTouch Compact in my setup and defined an appropriate functionality for all it's elements to do patch selection, parameter control, and transposing -> http://schnellphoto.de/keyboard.jpg. Works very well. (If you are interested: I have a (now slightly outdated) description of same -> http://schnellphoto.de/X%20Touch%20Patch.pdf).

I recommend firstly to consider both options and decide if you want to do your setup using either "LiveConfigs" or "Midi CC Table". There are pros and cons for both. This thread is mainly about Midi CC Table, but in my current setup I use Live Configs. Pipe did not like LiveConfigs as it does not allow for multiple tracks being active at the same time for allowing "spill over". OTOH, LiveConfiog is a powerful tool providing a lot necessary and useful functionality out of the box, which otherwise needs to be created from scratch. LiveConfigs feature a GUI for configuration which might be very desirable.See -> https://forum.cockos.com/showpost.php?p=2041455&postcount=6

Please come back with any questions about Reaper Live usage ! (We definitively need a dedicated sub-forum for "Reaper Live")

-Michael

woodslanding
10-04-2018, 11:06 PM
Well, I have up to 15 tracks active at a time, so I don't think live configs will be helpful...

I keep thinking about going to hardware for control. But the biggie for me is patch changes. I need to be able to find patches from big lists. I can't do that from hardware. I can't imagine remembering the numbers for patches. I'm assuming you do that with the mouse and screen? I guess one could use an encoder to scroll through a list, and press it to select a patch. But I like the immediacy of learning exactly where the button for a particular sound is, and just pressing it (even if there is inevitably some paging involved.)

Did this ever get off the ground? Or is this what you are using now?




I am nearly ready with a suite JSFXes (one Midi filter and several more just for configuring the actions) that allow live-players to control transposing and changing patches (aka programs, sounds) via Laptop keyboard shortcuts (and via Midi controllers).

It is supposed to work with VSIs, external Midi enabled devices, but at best with SWS "LiveConfigs".

Momentarily it's in Beta testing.

I'll post the code and a manual in some days.

This project also make use of a kind of JSFX instance tracking.

mschnell
10-05-2018, 04:23 AM
Well, I have up to 15 tracks active at a time, so I don't think live configs will be helpful...
The paradigm with LiveConfigs is:
When changing a config (line aka patch) all tracks that are mentioned on that page are muted, then the one you select is unmuted.
All other tracks are not affected.
You have eight such pages (aka "config #") that are handled independently on that behalf.
Each page is triggered by a CC #, the line to be selected is the CC value.

Hence you can have as many additional not LiveConfigs affected tracks as you want to.

I need to be able to find patches from big lists. I'm assuming you do that with the mouse and screen?
My setup manages up to 64 patches (by pushing buttons). This is by far enough for my purpose.
I use the screen and the mouse only for configuration. When playing on stage they are not even attached.
I am planning to add a small bright screen to be mounted at the XControl to show some states, but not to be necessary for using the setup. But of course this could be extended to allow for scrolling through a list by means of one of the rotary encoders.

-Michael