I think the OrangeLine Fence does this, kinda sorta, but the UI confuses me.
But I’d like something like this, if anyone feels like implementing something. I am a programmer but I’ve not gotten involved in plugin development, because it’s the opposite of music making for me.
This function sets the upper and lower bounds, and when outside that range, it “reflects” the CV back into the range. The scale parameter lets you control what happens to out of bounds CV.
Scale of zero = no change
Scale of one = out of bounds CV clamped to upper or lower limit.
Scale > 1.0 = out of bounds CV transposes up or down.
You could make a Scale CV-controlled, for added variation.
This would require a quantizer on its CV output to constrain the output to a scale.
It is not an exact match, but the Venom Wave Mangler comes damn close to your specification, and it can give the same results, just with slightly different inputs.
The following will give your desired result:
Set the High Threshold to your upper bound
Set the Low Threshold to your lower bound
Set the Mid Amplifier to 1
Set the High and Low Amplifiers to 0
Set the High and Low Amplifier CV amounts to 100%
Patch a knob voltage source (Vult Knobs, Venom Knob 5, VCV 8Vert, or . . .) to both the High and Low Amplifier CV inputs. This CV functions as your scale, only not using your exact same formula
Adjust the CV value as you see fit
CV = 1 : No change
CV = 0 : Clip at upper and lower bound
CV < 0 : Reflect down or up at the specified scale
Other possible CV values:
CV between 0 and 1 : Reduces the signal above/below the boundaries
CV > 1 : Amplifies the signal above/below the boundaries
By default the output is hard clipped at +/- 5V
The small Out Clip button at the top changes the behavior. Other options are
Soft (tanh) clipping at +/- 5V
Soft (tanh) clipping at +/- 6V
Off (no clipping)
Another option is to program your formula into docB Formula One or Stochastic Telegraph BASICally. That should be very straight forward.
RSCL applies a gain to the entire signal, whereas chaircrusher is looking for the signal between the limits to be scaled as 1, and only the content above to be rescaled and or reflected
RSCL reflects indefinitely, whereas chaircrusher only reflects once for each limit
Dave I think Rescale does exactly what I’m expecting. I have no idea what “RSCL reflects indefinitely” means in this context. This image captures what I’m expecting.
What I REALLY don’t understand is what happens with Fence at the limit. It introduces a higher frequency modulation, and the documentation doesn’t explain why
Maybe it gives the results you are looking for (which is great!), but it does not match your formula.
Your formula preserves the original shape for all input voltage that already lies between the limits.
RSCL applies the gain to the input before checking the limits.
Also, your formula reflects at most once at the upper limit and once at the lower limit. So the final output need not lie between the limits.
RSCL will continually reflect until the result lies between the limits. It is basically a wave folder with an unlimited number of stages. This becomes a factor when the gain range is increased to say x10 or higher in the context menu.
I agree the Orange Line Fence behavior is a mystery! Looking at the code would probably solve the mystery.