New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integer data type #17
Comments
I think I've found a partial answer to this, by sending a json payload to OSC in this format: Yay - this works!, but I have yet to figure out how to send multiple values without OSC thinking it's a return message from the device. e.g. these both fail: Any ideas?? |
I am sorry it has taken so many months to respond. I don't seem to have received an email when this issue was created. That Behringer X32 mixer looks like fun! Did you manage to get it to work? JavaScript / JSON does not make a distinction between Floats and Integers and it looks like the osc.js library defaults to using floats. Some client implementations (eg. liblo) will auto cast a float to an integer if it is expecting an integer. The syntax for sending both a string and an integer is: [
{
"type": "s",
"value": "scene"
},
{
"type": "i",
"value": 0
}
] This is documentation on this formatting in the osc.js README: I just did some tests using Node-RED and
|
Hello and thanks for the nice plugin. |
@terwarf : Thanks for the input! Can you share maybe the node-red flow? I would be highly interested to see how you've set it up. I am trying to setup the following OSC command:
But I was unable to do that using the following flow: [
{
"id": "da099c9102c4e8ab",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "08c102dd8ef2d7a8",
"type": "inject",
"z": "da099c9102c4e8ab",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 160,
"wires": [
[
"e86b9f9871d5e9f6"
]
]
},
{
"id": "220366b7f70d5845",
"type": "osc",
"z": "da099c9102c4e8ab",
"name": "",
"path": "",
"metadata": true,
"x": 490,
"y": 160,
"wires": [
[
"b33821c7c260cf81"
]
]
},
{
"id": "b33821c7c260cf81",
"type": "udp out",
"z": "da099c9102c4e8ab",
"name": "",
"addr": "192.168.1.10",
"iface": "",
"port": "10023",
"ipv": "udp4",
"outport": "",
"base64": false,
"multicast": "false",
"x": 730,
"y": 160,
"wires": []
},
{
"id": "e86b9f9871d5e9f6",
"type": "function",
"z": "da099c9102c4e8ab",
"name": "",
"func": "msg.payload = { \"packets\": [{ \"type\": \"s\", \"value\": \"scene\" }, { \"type\": \"i\", \"value\": 0 }] };\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 310,
"y": 160,
"wires": [
[
"220366b7f70d5845",
"49a46685da1b43cc"
]
]
},
{
"id": "51eb5aa2fd856f3e",
"type": "comment",
"z": "da099c9102c4e8ab",
"name": "Send a bundle over OSC",
"info": "",
"x": 170,
"y": 120,
"wires": []
},
{
"id": "49a46685da1b43cc",
"type": "debug",
"z": "da099c9102c4e8ab",
"name": "debug 4",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 440,
"y": 80,
"wires": []
}
] Any thoughts? |
@alexszilagyi I remember trying to switch scenes, but i couldn't get it to work. If I remember correctly, i just used an injection node for the test mentioned above. |
Like @nfavrod I am also trying to control a Behringer X32 with this node.
Some commands need the response defined as an integer - e.g.:
/ch/01/mix/on ,i 0
It seems to fail with the ,f number type. Is there any way to force the ,i prefix when outputting data from the OSC node?
The text was updated successfully, but these errors were encountered: