Forums > Gen

what does '?' Ternary operator

November 26, 2012 | 11:56 am

hi folks!

I don’t have gen but i try to convert a patch of Gen in Reaktor, but what does this ‘?’ object ? (used with history) can’t find help in max msp and google.

thank in advance !

November 26, 2012 | 12:34 pm

I mean in my patch, the [?] first inlet in connected by the impulse osc (in fact the famous delta < 0 of a phasor) the second inlet is connected by a variable signal and the third by a feedback history, that's a kind of Sample and Hold no ?

— Pasted Max Patch, click to expand. —
November 26, 2012 | 12:59 pm

It functions indeed as a sample and hold.

— Pasted Max Patch, click to expand. —
November 26, 2012 | 6:41 pm

The [?] operator is shorthand for [switch]. It’s the C ternary operator. It tests for a condition (the first inlet). If the condition is true, it passes the second inlet’s value. Otherwise, it passes the 3rd inlet’s value.

November 26, 2012 | 9:01 pm

And after a while I realized that my example was a little awkward. This gives a better idea:

— Pasted Max Patch, click to expand. —
Viewing 5 posts - 1 through 5 (of 5 total)

Forums > Gen