guides:osc
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| guides:osc [2026/10/23 02:09] – created 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: |
| </ | </ | ||
| This script currently only //sends// values to a single OSC receiver. Features like multiple targets and OSC Bundles are still TODO. | This script currently only //sends// values to a single OSC receiver. Features like multiple targets and OSC Bundles are still TODO. | ||
| + | |||
| + | ===== Send OSC Packets ===== | ||
| + | |||
| + | When the OSC Script and NetAddr claims are being run, we can now easily send messages using Folk via the syntax: | ||
| + | |||
| + | < | ||
| + | Notify: OSC at /tone with args 440 | ||
| + | </ | ||
| + | |||
| + | This sends an OSC message to NetAddr with path ''/ | ||
| + | |||
| + | For any questions please tag Paul on the discord! | ||
guides/osc.1792721391.txt.gz · Last modified: by paul
