Managing two parameters w/one pot
Posted: Fri Mar 23, 2012 5:51 am
Hi!, in an algorithm that I'm developing I need to control tw parameters with one pot. The first parameter has to swing between 0.3 and 0.6. The second parameter must remain in a fixed value for the lower half of the pot (or 3/4) and has to go up on the upper half. Has to swing between 0.8 and 1.3.
So, what's the problem?. This is what I coded:
Then, when I have to control the second parameter, reg2 in this case (the first works perfectly):
Well, this doesn't works, the result is like the second register where only on the lower value. Can I multiply by reg2 on the rdax sentence?.
I can't scale on the rdax sentence by the register directly, no
So, what's the problem?. This is what I coded:
Code: Select all
rdax pot2, 1 ; Read POT2
sof 0.3, 0.3 ; Scale to 0.3, add 0.2
wrax reg1, 0 ; reg1: 0.3 to 0.6. Clear acc
rdax pot2, 1 ; Read POT2
sof -1, 0.999 ; Invert POT2 and add 0.999.
sof 1.99, 0 ; Scale to clip
sof -1, 0 ; Invert POT2
sof 0.38, 0.62 ; Scale 0.38, add 0.62
wrax reg2, 0 ; reg2: 0.38 to 1
Code: Select all
rdax input, 1.3 ; Read the input register and scale by 1.3
mulx reg2 ; Multiply the input by reg2 that varies between 0.62 and 1.
I can't scale on the rdax sentence by the register directly, no