hi,
here is a button
here is a script
@jean-emmanuel, could you confirm send
doesn't not work into the onValue property because this is not an interaction with the OSC interface ?
When the key a
is pressed it works.
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
Sends an osc message.
If the event that triggered the script's execution was not initiated by a user interaction, this function will have no effect.
This function ignores the widget's bypass property.
Second little point : i don't understand the notation
args: value or {type: "OSC_TYPE_LETTER", value: VALUE} object
Thanks !
I confirm, that's the meaning of this sentence:
If the event that triggered the script's execution was not initiated by a user interaction, this function will have no effect.
args: value or {type: "OSC_TYPE_LETTER", value: VALUE} object
send('127.0.0.1:4444', '/address', {type: 'i', value: 1}) // sends 1 as an integer
send('127.0.0.1:4444', '/address', {type: 'f', value: 1}) // sends 1 as a float
hi @jean-emmanuel
Thank you.
So where this kind of syntax is documented ?
send('127.0.0.1:9000','/foo/crevette', 1, 127)
send(target, address, ...args)
What do the 3 points mean here ?
Is it a reference to the spread javascript syntax ? i don't think so.
Is it a reference to the spread javascript syntax ? i don't think so.
It is. It can be read as
send(target, address, arg1, arg2, arg3, etc)
ah bien
So there is a process internaly that take the parameters and put them all in an array ?
For the OSC user, i think it's not obvious to catch as the reader needs to be aware of this JS spread syntax.
I've added a few examples to make that clear.
nickel
target` (optional): `"ip:port"` or `"midi:device_name"` string. If omitted, the widget's target will be used.
maybe add
or the the default osc/midi targets defined into the server configuration
it's up to you