GenExpr Operator reference?

Mar 26, 2012 at 1:37am

GenExpr Operator reference?


Is there a code reference in the docs covering common and domain-specific gen operators? Something like:

* a = multiplier
* b = signal

So for example, controlling amplitude in traditional ‘object’ form, an audio signal goes into the first inlet, and a value (0-1) goes in the second inlet. Then the 0-1 values control the volume of inlet one. With codebox -> mul, it seems to be the reverse.. The control value is the first argument and the signal needs to be the second argument.

Mar 26, 2012 at 3:35am

Hi there,

Multiplication is commutative, that means a * b equals b * a. It’s as true to say that a is controlling the amplitude of b, as b is controlling the amplitude of a.

Also, it shouldn’t matter which way around the two inputs are for the result; if either input is a signal, the result will be a signal and the multiplication will happen at signal-rate (i.e. per sample).

Hope that helps. If you’re seeing something weird, please send a patcher and I’ll take a look!


PS. The operator reference can be found from the gen~, jit.gen etc. helpfiles, under the ‘?’ tab.

Mar 27, 2012 at 3:41pm

Hi Graham,

Yes.. Did some tests with mul and arg order doesn’t matter at all. Guess I’ll chalk that up to getting used to codebox. And thanks for pointing me to the ? tab..

I finally just got around to playing with gen, and in my haste I clearly missed that.



You must be logged in to reply to this topic.