docs: send() examples
This commit is contained in:
parent
2e944c6ea6
commit
d025582825
1 changed files with 10 additions and 1 deletions
|
|
@ -163,7 +163,7 @@ Sets the value of a widget's custom variable (see [advanced syntaxes](./advanced
|
|||
#### `send(target, address, ...args)`
|
||||
- `target` (optional): `"ip:port"` or `"midi:device_name"` string. If omitted, the widget's target will be used.
|
||||
- `address`: osc address, must start with a `/`
|
||||
- `args`: value or `{type: "OSC_TYPE_LETTER", value: VALUE}` `object`
|
||||
- `args`: values or `{type: "OSC_TYPE_LETTER", value: VALUE}` objects
|
||||
|
||||
Sends an osc message.
|
||||
|
||||
|
|
@ -171,6 +171,15 @@ If the event that triggered the script's execution was not initiated by a user i
|
|||
|
||||
This function ignores the widget's `bypass` property.
|
||||
|
||||
??? infos "Examples"
|
||||
```javascript
|
||||
send('127.0.0.1:4444', '/address', 1)
|
||||
send('127.0.0.1:4444', '/address', 1, 2)
|
||||
send('/address', 1) // uses the widget's target
|
||||
send('/address', {type: 'i', value: 1}) // sends 1 as an integer
|
||||
```
|
||||
|
||||
|
||||
----
|
||||
|
||||
#### `getProp(id, name)`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue