Page 1 of 1

Question about approach when using expressions and globals

Posted: Sun Apr 04, 2021 3:35 am
by jhinden
Hi there,

My partner and I were interested in converting some logic from Reaktor to Magic for some special bipolar modulation for x translations. We got there eventually using global macros, but were wondering if this is the best approach or if this kind of modulation can be done at the module level using one (or several expressions).

The patch basically takes a unipolar source and converts it to bipolar so that as amplitude grows, the xy range gets wider and as amplitude lowers it gets narrower eventually returning to the middle.

Example of patch in Reaktor:
https://snipboard.io/Az98Bv.jpg

Example in Magic:
https://snipboard.io/yIMDUP.jpg

Example visual output in Reaktor:
https://hnet.com/video-to-gif/viewimage ... sgnVc-hnet

Re: Question about approach when using expressions and globa

Posted: Mon Apr 05, 2021 10:30 am
by Sadler
I don't know what your trying to achieve but you can compress all those globals into a single expression:

(abs(floor(x*8.5+0.5)%2-frac(x*8.5+0.5))-0.5)*x

Re: Question about approach when using expressions and globa

Posted: Mon Apr 05, 2021 3:02 pm
by Magic
Yup that's right, and remember that the Expression box can expand to show the full text.

Re: Question about approach when using expressions and globa

Posted: Tue Apr 06, 2021 1:22 am
by jhinden
Thanks Eric. I had a feeling that wasn't the best way about it. Will give that a shot and try it out. Thanks for the help and tip about expanding the box.