guides:osc
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| guides:osc [2026/10/23 02:15] – paul | guides:osc [2026/10/23 02:40] (current) – paul | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| ===== The OSC Script ===== | ===== The OSC Script ===== | ||
| - | This script adds two utility functions for turning Tcl values into serialized OSC values, and also starts watching for a `Wish the NetAddr is /n/` assertion to start running an OSC producer. | + | This script adds two utility functions for turning Tcl values into serialized OSC values, and also starts watching for a '' |
| < | < | ||
| + | # Null terminates a Tcl value and pads it's length to a multiple of four | ||
| + | # (needed for OSC spec) | ||
| + | # \x01 -> \x01\x00\x00\x00 | ||
| + | # \x01\x02\x03 -> \x01\x02\x03\x00 | ||
| + | # \x01\x02\x03\x04 -> \x01\x02\x03\x04\x00\x00\x00\x00 | ||
| fn oscPad {s} { | fn oscPad {s} { | ||
| set n [string bytelength $s] | set n [string bytelength $s] | ||
| Line 44: | Line 49: | ||
| ===== Start the Subscriber: ===== | ===== Start the Subscriber: ===== | ||
| - | Place a program that asserts | + | Place a program that asserts |
| For my current SuperCollider-based setup the assertion looks like this: | For my current SuperCollider-based setup the assertion looks like this: | ||
| < | < | ||
| - | Wish the NetAddr is 192.168.4.71: | + | Claim the NetAddr is 192.168.4.71: |
| </ | </ | ||
| Line 56: | Line 61: | ||
| ===== Send OSC Packets ===== | ===== Send OSC Packets ===== | ||
| - | When the OSC Script and NetAddr claims are being run, we can now easily send messages using Folk via the sytax: | + | When the OSC Script and NetAddr claims are being run, we can now easily send messages using Folk via the syntax: |
| < | < | ||
| Line 62: | Line 67: | ||
| </ | </ | ||
| - | This sends an OSC message to NetAddr with path `/tone` and value `220` the OSC helper utils will parse 220 into an int and send it as a proper OSC integer. | + | This sends an OSC message to NetAddr with path '' |
| For any questions please tag Paul on the discord! | For any questions please tag Paul on the discord! | ||
guides/osc.1792721757.txt.gz · Last modified: by paul
