Previous topicNext topic

Question about approach when using expressions and globals

Questions, comments, feedback, etc.
Post Reply
jhinden
Posts: 48
Joined: Mon Nov 30, 2020 2:15 pm

Question about approach when using expressions and globals

Post 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
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Question about approach when using expressions and globa

Post 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
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Question about approach when using expressions and globa

Post by Magic »

Yup that's right, and remember that the Expression box can expand to show the full text.
jhinden
Posts: 48
Joined: Mon Nov 30, 2020 2:15 pm

Re: Question about approach when using expressions and globa

Post 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.
Post Reply