Transform Reference Guide
|User Guide | Transform Guide | OSW on the Web|
Compute the modulus of two values synchronously
The modulus operator computes the remainder of param1 divided by param2. The operator accepts inputs and initialization arguments of any numeric type (ints, floats, doubles) as well as audio samples and lists. Different types can be mixed and matched (note: the modulus operator does not currently work with complex numbers, but this will be fixed). For example, a float modulo an int (or an int modulo a float) yields a float result, while the modulus of audio samples by a float power yields audio samples where each output sample is the modulus of each input sample the float argument. The modulus of list inputs is computed element-wise, where each element in the list could be a different type.
This operator only outputs a result when new values have been received by both inlets. Thus, if a new value is received by param1, no result will be computed until a value is received by param2 as well. If this is not the behavior you want, try the % operator instead.