Page 1 of 1

bipolar to unipolar CV transformation (using thor?)

Posted: 15 Sep 2016
by Auryn
Hey, I'm preparing some older polymodular combinator patches for distribution, but some of them use quadelectra's CV suite line processor to transform bipolar to unipolar signals. I got the line suite processor for free when it was first released, but I found out it's not free anymore, so (to keep the patches accessible to everyone) I want to replace that RE with some other configuration. Does anyone know how to do such a transformation in thor for example?

Re: bipolar to unipolar CV transformation (using thor?)

Posted: 15 Sep 2016
by ljekio
uni = bi/2+0.5 (64 from 0-127 scale)
bi = uni*2-1 (127)
2016-09-15_14-27-25.png
2016-09-15_14-27-25.png (196.79 KiB) Viewed 1124 times

Re: bipolar to unipolar CV transformation (using thor?)

Posted: 16 Sep 2016
by Auryn
thanks a lot, I'll try that!

Re: bipolar to unipolar CV transformation (using thor?)

Posted: 16 Sep 2016
by selig
ljekio wrote:uni = bi/2+0.5 (64 from 0-127 scale)
bi = uni*2-1 (127)
2016-09-15_14-27-25.png
Note - Rotary 1 needs to be set to 64 for the first conversion (Bi-2-Uni) but to 127 for the second (Uni-2-Bi).

FWIW, I like to use the right hand Mod Matrix slots for Uni-2-Bi since you need to send the same CV to two places (and this is easy on those slots), thus only taking two lines total instead of three.

BTW, @ljekio just want to say you have a GREAT way of doing the Bi-2-Uni using a Rotary at 64 - totally gets around the minor issue of being stuck between 79 and 80 on the Amount control for exactly "50%". I'll be using that one from now on, thank you very much! ;)

Re: bipolar to unipolar CV transformation (using thor?)

Posted: 17 Sep 2016
by jdub
selig wrote: BTW, @ljekio just want to say you have a GREAT way of doing the Bi-2-Uni using a Rotary at 64 - totally gets around the minor issue of being stuck between 79 and 80 on the Amount control for exactly "50%". I'll be using that one from now on, thank you very much! ;)
A minor gripe, but using a rotary at a setting of 64 to scale the constant will only get you slightly closer to a value of 0.5 then routing it directly with an amount of 79/80, as the true 0.5 will still lie somewhere between 63 & 64 (I think 63 is actually closer, IIRC and FWIW). For bipolar-to-unipolar conversion, I use a button as my bias source, programmed in the MBRS as follows:

[Src: CV In][Amt: 100][Dst: CV Out][Amt: -50][Scl: Button]
[Src: Button][Amt: 100][Dst: CV Out][Amt: -50][Scl: Button]

This method is neat because it uses the button both as the constant & the scale, gives you as perfect of a 0.5 as you're going to get with floating point math, and it lets the original signal pass through to the output unaffected when the button is inactive. I hope you find this useful.

Re: bipolar to unipolar CV transformation (using thor?)

Posted: 17 Sep 2016
by selig
jdub wrote:
selig wrote: BTW, @ljekio just want to say you have a GREAT way of doing the Bi-2-Uni using a Rotary at 64 - totally gets around the minor issue of being stuck between 79 and 80 on the Amount control for exactly "50%". I'll be using that one from now on, thank you very much! ;)
A minor gripe, but using a rotary at a setting of 64 to scale the constant will only get you slightly closer to a value of 0.5 then routing it directly with an amount of 79/80, as the true 0.5 will still lie somewhere between 63 & 64 (I think 63 is actually closer, IIRC and FWIW). For bipolar-to-unipolar conversion, I use a button as my bias source, programmed in the MBRS as follows:

[Src: CV In][Amt: 100][Dst: CV Out][Amt: -50][Scl: Button]
[Src: Button][Amt: 100][Dst: CV Out][Amt: -50][Scl: Button]

This method is neat because it uses the button both as the constant & the scale, gives you as perfect of a 0.5 as you're going to get with floating point math, and it lets the original signal pass through to the output unaffected when the button is inactive. I hope you find this useful.
Both methods produce the correct top/bottom values - it's the center value that differs.

I'm not sure which is better - your method works but centers the bi-polar value at 64, but ljekio's method also works and centers the value at 63.

For reference, the Combinator uses 64 as it's knob center value, so I'd probably go with ljekio's method if just for that fact.

Re: bipolar to unipolar CV transformation (using thor?)

Posted: 17 Sep 2016
by jdub
selig wrote: Both methods produce the correct top/bottom values - it's the center value that differs.

I'm not sure which is better - your method works but centers the bi-polar value at 64, but ljekio's method also works and centers the value at 63.

For reference, the Combinator uses 64 as it's knob center value, so I'd probably go with ljekio's method if just for that fact.
How are you measuring the output? I can't do any testing myself at the moment, but I'd be interested to see how the combinator rotaries map to, e.g., a parameter on a Rack Extension that doesn't use the old 0-127 system. My guess would be that the parameter in question couldn't be set to exactly 50% using the combinator, as it is designed to map 1:1 with the pre-RE-era devices. Even then, I'd bet that assigning a rotary to, say, RPG-8's pattern number would give values pretty far off of zero at rotary settings of both 63 & 64.

Anyway, that's all neither here nor there. Good enough is (usually) good enough.

Re: bipolar to unipolar CV transformation (using thor?)

Posted: 17 Sep 2016
by 8cros
jdub wrote:
selig wrote: Both methods produce the correct top/bottom values - it's the center value that differs.

I'm not sure which is better - your method works but centers the bi-polar value at 64, but ljekio's method also works and centers the value at 63.

For reference, the Combinator uses 64 as it's knob center value, so I'd probably go with ljekio's method if just for that fact.
How are you measuring the output? I can't do any testing myself at the moment, but I'd be interested to see how the combinator rotaries map to, e.g., a parameter on a Rack Extension that doesn't use the old 0-127 system. My guess would be that the parameter in question couldn't be set to exactly 50% using the combinator, as it is designed to map 1:1 with the pre-RE-era devices. Even then, I'd bet that assigning a rotary to, say, RPG-8's pattern number would give values pretty far off of zero at rotary settings of both 63 & 64.

Anyway, that's all neither here nor there. Good enough is (usually) good enough.
The button shows 0.5 (scale -50)
But knob 64 shows 0.503

It's very close.