Execute Javascript instructions sequentially
Name | Type | Opt | Description |
---|---|---|---|
sequential-Javascript-instructions | numbers symbols or expressions | The arguments to the jstrigger object may be either constants or expressions. Constants are numbers or symbols. For each constant, an outlet will be created, and the constant value will be sent out the corresponding outlet when the object receives a message in its left inlet. For example, jstrigger with the arguments would send out the right outlet, followed by out the middle outlet, followed by out the left outlet. Expressions are Javascript expressions contained within parentheses. You can include more than one Javascript statement can be contained within the parentheses, but you must separate the statements by semicolons (;). A semicolon after the last statements is not required, and the word return is not required either. To return a list, you can either create an array object or place items in square brackets separated by commas. Javascript allows you to enter expressions between the commas. See the Examples section. For each expression, an outlet will be created, and the value of the expression will be sent out the corresponding outlet when the jstrigger object receives a message in its left inlet. Note that any use of semicolons or commas in an object box require a preceding backslash (\) character, otherwise you will see the following error message in the Max window and the object will not be created: * error: object box has comma or semicolon In addition, it is strongly recommended to use single quotes (') rather than double quotes to define string literals. The use of double quotes can produce unexpected results in jstrigger when the object is saved and recreated in a patcher. |
bang | The most recently stored values for each argument are assigned to the a array. Then the expressions in the object are evaluated, right to left, and the value of each expression or constant is sent out the outlet corresponding to each expression. | |
int | input [int] |
Contextual/User-specified according to Javascript arguments. |
float | input [float] |
Contextual/User-specified according to Javascript arguments. |
list | input [list] |
Contextual/User-specified according to Javascript arguments. |
anything | input [list] |
Contextual/User-specified according to Javascript arguments. |