Thanks Frank, it turns out that my example is really exactly the same as the one in the knowledge base. And while the description there is correct, it is very dense (for example some of it is explaining intermediate results of the LOG instruction, which is not obvious at first). I'd better write down more details because it took me about 12 years to get it! Also I struggle with text only descriptions. Draw a few graphs and it clears right up. Well okay 4 days later it started to.
Here's a patch which uses it.
So-called
oil can delay where the LFO speed is supposed to sync with the delay time. My previous implementations of the inverse value to drive the LFO used the "SOF" function, which, while accurate at the endpoints, was not accurate anywhere else. Nobody ever called me out on it! But now I'm coming clean.
Here's the idea behind the "ratio" block. You choose a ratio, let's say 5 to 1.
There is a control input, nominally expected to go to a pot which ranges from 0 to 1. The first output goes from 1/ratio to 1.0. In this example, 1/5 = 0.2 to 1.0. So that is your ratio of 1 to 5. The second output is SUPPOSED to go from 1.0 to 1/ratio over the same output range. The curve it's supposedly implementing is y = 1/(ratio * x). You don't drive it from the pot. You drive it from the scaled linear output that doesn't go to zero.
Now just briefly, let's recall that, when followed by
EXP 1.0, 0, the "C" parameter in
LOG C,D performs "power" operations including square root and 1/x if C = -1.0. And "D" performs multiplication. And there is this magical "16" involved that you'd really better find a way to remember. So here, C = -1.0 and D = -1(log2(ratio)/16). Ratio going between, say, 2 and 100. The corresponding "Threshold" going between 0.5 and 0.01.
It embraces my credo of "possibly too much". For example if you crank the middle pot your sound will dissolve into distorted mush but you should be able to recover by backing off a bit. And the modulation width probably allows you to set more than you'd ever really want to use. Because I think people should get their money's worth, you know? Don't leave them hanging imagining how it would sound with TOO MUCH!
I'm going to do a bit more testing but it seems close.
DL
Code: Select all
; oil-can-with-2-LFOs-A.spcd - stereo output
; Patch saved from SpinCAD Designer version 1039
; Pot 0: Delay time 133ms - 500 msec. Turns the LFO speed down on two choruses attached to output taps which are a few msec apart.
; Pot 1: Feedback level. Turns down delay level when all the way down.
; Pot 2: Modulation width.
;
;
; ----------------------------
;------ Pot 0
;------ Smoother
RDAX POT0,1.0000000000
RDFX REG0,0.0001500000
WRAX REG0,0.0000000000
;------ Ratio
RDAX REG0,1.0000000000
SOF 0.6666666667,0.3333333333
WRAX REG1,1.0000000000
LOG -1.0,-0.09906015629507227
EXP 1.0,0.0
WRAX REG2,0.0000000000
;------ Input
;------ Feedback Output
;------ Pot 2
;------ Scale/Offset
RDAX POT2,1.0000000000
SOF 0.9000000000,0.1000000000
WRAX REG4,0.0000000000
;------ Multiply
RDAX REG1,1.0000000000
MULX REG4
WRAX REG5,0.0000000000
;------ Pot 1
;------ ThreeTap
RDAX REG3,0.8912509381
MULX POT1
RDAX ADCL,1.0000000000
WRA 0,0.0
CLR
OR $007FFF00
MULX REG1
SOF 0.4753189087,0.0250473022
WRAX ADDR_PTR,0.0000000000
RMPA 1.0
WRAX REG6,0.0000000000
CLR
OR $007FFF00
SOF 0.4662878494,0.0245719833
WRAX ADDR_PTR,0.0000000000
RMPA 1.0
WRAX REG7,0.0000000000
;------ Chorus
SKP RUN ,1
WLDS 0,50,64
RDAX REG5,0.0078311260
WRAX SIN0_RANGE,0.0000000000
RDAX REG2,0.1968884540
WRAX SIN0_RATE,0.0000000000
LDAX REG6
WRA 16396,0.0
CHO RDA,0,REG | COMPC,16793
CHO RDA,0,0,16794
WRAX REG8,0.0000000000
;------ Phase_Invert
RDAX REG8,-1.0000000000
WRAX REG9,0.0000000000
;------ Clip
RDAX POT1,1.0000000000
SOF -2.0000000000,0.0000000000
SOF -2.0000000000,0.0000000000
SOF -1.5775000000,0.0000000000
SOF -1.0000000000,0.0000000000
WRAX REG10,0.0000000000
;------ LPF 1P
RDAX REG8,1.0000000000
RDFX REG12,0.3426232845
WRAX REG12,0.0000000000
;------ Scale/Offset
RDAX POT2,1.0000000000
SOF 0.5700000000,0.4300000000
WRAX REG13,0.0000000000
;------ Chorus
SKP RUN ,1
WLDS 1,50,64
RDAX REG5,0.0138833125
WRAX SIN1_RANGE,0.0000000000
RDAX REG2,0.3937769080
WRAX SIN1_RATE,0.0000000000
LDAX REG7
WRA 17192,0.0
CHO RDA,1,REG | COMPC,17757
CHO RDA,1,0,17758
WRAX REG14,0.0000000000
;------ Cube gain
RDAX REG12,1.0000000000
WRAX REG15,-0.9333300000
MULX REG15
MULX REG15
RDAX REG15,1.0000000000
SOF 1.5000000000,0.0000000000
WRAX REG16,0.0000000000
;------ HPF 1P
RDAX REG16,1.0000000000
RDFX REG18,0.0150000000
WRAX REG18,-1.0000000000
RDAX REG16,1.0000000000
WRAX REG17,0.0000000000
;------ FB In 2
RDAX REG17,0.9400000000
WRAX REG3,0.0000000000
;------ Multiply
RDAX REG13,1.0000000000
MULX REG10
WRAX REG19,0.0000000000
;------ Scale/Offset
RDAX REG19,1.0000000000
SOF 0.9200000000,0.0800000000
WRAX REG20,0.0000000000
;------ Mixer 4:2
RDAX ADCL,1.0000000000
WRAX REG21,0.0000000000
RDAX REG8,0.4466835922
MULX REG20
RDAX REG21,1.0000000000
WRAX REG21,0.0000000000
RDAX ADCR,1.0000000000
WRAX REG22,0.0000000000
RDAX REG14,0.4466835922
MULX REG20
RDAX REG22,1.0000000000
WRAX REG22,0.0000000000
;------ Output
RDAX REG21,1.0000000000
WRAX DACL,0.0000000000
RDAX REG22,1.0000000000
WRAX DACR,0.0000000000