beta
cables is under heavy development.
There might be one or another bug, please let us know about it!

ArrayMathExpressionTrigger Op

ArrayMathExpressionTrigger

Calculates a user defined mathematical expression


Use this op to write your own mathematical functions.

Inputs can be arrays and numbers. Arrays need to be the same length, else the resulting output is null.

Use the inputs' lower-case letters in your expression, i.e:

b*c+sin(a) - x

There are 2 more variables availible for your expression: i and len

i - the current index
len - the arrays' length

For a reference of mathematical functions availible, please refer to the Javascript Math object: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math


Edit Documentation

Full Name
  • Ops.Array.ArrayMathExpressionTrigger
Visibility
  • Core Op - Official cables op
Author


 

Example Patch ArrayMathExpression example

This is an example patch for the ArrayMathExpression op.

Open In Editor

INPUT PORTS


Update (Trigger)

Parameters

A (Array)

first input array - use a in your expression

B (Array)

second input array - use b in your expression

C (Array)

third input array - use c in your expression

X (Number)

first number input - use x in your expression

Y (Number)

second number input - use y in your expression

Z (Number)

third number input - use z in your expression

Expression

Expression (String)

the mathematical expression to be calculated

OUTPUT PORTS


Next (Trigger)
Result Array (Array)

the resulting array

Array Length (Number)

the resulting array's length

Expression Valid (boolean Number)

true if the expression is valid, false otherwise


Usages of ArrayMathExpressionTrigger

  • Examples
  • Public
  • My Patches
  • Ops

Changelog


created opuser avatarsimod - 2020-07-23
Ops.User.cables.ArrayMathExpression renamed to Ops.Array.ArrayMathExpressionuser avatarsimod - 2020-07-23
cloned op from Ops.Array.ArrayMathExpressionuser avatarpandur - 2022-09-27
Ops.User.pandur.ArrayMathExpressionTrigger renamed to Ops.Arrays.ArrayMathExpressionTriggeruser avatarpandur - 2022-09-27
Ops.Arrays.ArrayMathExpressionTrigger renamed to Ops.Array.ArrayMathExpressionTriggeruser avatarpandur - 2022-10-10