bipolar to unipolar CV transformation (using thor?)

This forum is for discussing Reason. Questions, answers, ideas, and opinions... all apply.
Post Reply
User avatar
Auryn
Posts: 842
Joined: 12 Aug 2015
Location: La Mancha

15 Sep 2016

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?
~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-
Quixotic Sound Design: http://www.quixoticsounddesign.com
Europandemonium Refill: https://gumroad.com/l/YxIGB

User avatar
ljekio
Posts: 963
Joined: 21 Jan 2015

15 Sep 2016

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 1099 times

User avatar
Auryn
Posts: 842
Joined: 12 Aug 2015
Location: La Mancha

16 Sep 2016

thanks a lot, I'll try that!
~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-
Quixotic Sound Design: http://www.quixoticsounddesign.com
Europandemonium Refill: https://gumroad.com/l/YxIGB

User avatar
selig
RE Developer
Posts: 11788
Joined: 15 Jan 2015
Location: The NorthWoods, CT, USA

16 Sep 2016

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! ;)
Selig Audio, LLC

User avatar
jdub
Posts: 15
Joined: 28 Apr 2015

17 Sep 2016

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.

User avatar
selig
RE Developer
Posts: 11788
Joined: 15 Jan 2015
Location: The NorthWoods, CT, USA

17 Sep 2016

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.
Selig Audio, LLC

User avatar
jdub
Posts: 15
Joined: 28 Apr 2015

17 Sep 2016

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.

User avatar
8cros
Posts: 707
Joined: 19 May 2015
Location: Moscow
Contact:

17 Sep 2016

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.
Attachments
Untitled-3.jpg
Untitled-3.jpg (202.25 KiB) Viewed 1042 times
Record For The Real Force
REASON RESONANCES

Post Reply
  • Information
  • Who is online

    Users browsing this forum: False Mirror, Google [Bot], Sogou [Spider] and 14 guests