User Tools

Site Tools


guides:osc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
guides:osc [2026/10/23 02:09] – created paulguides: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 ''Wish the NetAddr is /n/'' assertion to start running an OSC producer.
  
 <code> <code>
 +# 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 `Wish the NetAddr is /addr/`. NetAddr is a string with form <IP>:<PORT>+Place a program that asserts ''Claim the NetAddr is /addr/''. NetAddr is a string with form ''<IP>:<PORT>''
 For my current SuperCollider-based setup the assertion looks like this:  For my current SuperCollider-based setup the assertion looks like this: 
  
 <code> <code>
-Wish the NetAddr is 192.168.4.71:57120+Claim the NetAddr is 192.168.4.71:57120
 </code> </code>
  
  
 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:
 +
 +<code>
 +Notify: OSC at /tone with args 440
 +</code>
 +
 +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.
 +
 +For any questions please tag Paul on the discord!
  
  
guides/osc.1792721391.txt.gz · Last modified: by paul

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki