osc-support
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
osc-support [2021/11/12 15:45] – created shane | osc-support [2023/05/08 18:59] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== OSC Support in Unify ====== | ====== OSC Support in Unify ====== | ||
+ | [[wp> | ||
+ | |||
+ | Unify' | ||
+ | |||
+ | ===== Overview ===== | ||
+ | Unify v1.7 and later can be configured to listen for OSC connections on a specified UDP port; see " | ||
+ | |||
+ | **Only the Unify stand-alone Unify app can use OSC**; the plug-in versions cannot. | ||
+ | |||
+ | Unify uses only UDP for OSC connections; | ||
+ | |||
+ | |||
+ | ===== Enabling and Configuring OSC ===== | ||
+ | To set up OSC support in Unify v1.7 and later, go to the [[settings|Settings view]] and locate the OSC section: | ||
+ | |||
+ | {{:: | ||
+ | |||
+ | To enable Unify to listen for OSC commands, the least you need to do is to check the " | ||
+ | |||
+ | If you wish, you may also adjust the // | ||
+ | * The default // | ||
+ | * If you want it to listen only for //local// connections, | ||
+ | * If you want it to listen on a specific interface only, enter the IP address to use. | ||
+ | * On most computers, the default // | ||
+ | * If you need to change it, you'll need to determine a suitable port number, between 1024 and 65535. | ||
+ | * Changes you make will only take effect after you quit Unify, then re-start Unify. | ||
+ | |||
+ | **On Windows**, the first time you re-start the Unify stand-alone app after enabling OSC, a pop-up window will appear, asking you if it's OK to allow network access: | ||
+ | |||
+ | {{:: | ||
+ | |||
+ | The recommended setting (allow Unify to communicate on Private networks only) should already be selected. Click the **Allow access** button to confirm it. | ||
+ | |||
+ | ===== OSC message types ===== | ||
+ | OSC messages take the form of a " | ||
+ | - **Parameter-set messages** use a path exactly as used in Unify' | ||
+ | * The associated value (to which the parameter is set) //must// be a floating-point value (format-code " | ||
+ | - **Command messages** have the same structure as parameter-set messages, but instead of setting actual parameter values, these trigger //actions// based on the path. | ||
+ | * All command messages include a floating-point value, but the value itself is ignored for most commands. | ||
+ | - **MIDI-over-OSC** messages use the path ''/ | ||
+ | |||
+ | ==== Parameter-set messages ==== | ||
+ | All parameters which can be linked to Unify' | ||
+ | |||
+ | Note that **Unify' | ||
+ | |||
+ | ==== Command messages ==== | ||
+ | Unify also supports OSC " | ||
+ | |||
+ | Unify v1.7 supports the following " | ||
+ | * ''/ | ||
+ | * The associated floating-point value must be present, but is ignored. | ||
+ | * ''/ | ||
+ | * The associated floating-point value is cast to an integer, and should be equal to the value of the **id** field for the desired patch' | ||
+ | * If the value does not exactly match a valid patch ID, the command will be ignored. | ||
+ | * ''/ | ||
+ | |||
+ | ==== Bidirectional messaging for patch-loading commands ==== | ||
+ | As described above, the ''/ | ||
+ | |||
+ | A remote-control program can // | ||
+ | |||
+ | If Unify has received a valid ''/ | ||
+ | |||
+ | Before shutting down, a remote-control program which has previously sent a ''/ | ||
+ | |||
+ | ==== MIDI-over-OSC messages ==== | ||
+ | MIDI-over-OSC message formats are not standardized in OSC. The format Unify uses is based on that used by [[https:// | ||
+ | |||
+ | <code c++> | ||
+ | void OscSender:: | ||
+ | { | ||
+ | if (oscPort < 0) return; | ||
+ | |||
+ | uint8 data[4]; | ||
+ | data[0] = 0; | ||
+ | data[1] = byte3; | ||
+ | data[2] = byte2; | ||
+ | data[3] = byte1; | ||
+ | |||
+ | int len = tosc_writeMessage((char*)oscData, | ||
+ | while (!socket.waitUntilReady(false, | ||
+ | socket.write(oscAddr, | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Note the reversed byte-order, and how 3-byte MIDI messages are encoded as 4-byte integers. (2-byte MIDI messages are encoded the same way, but the '' | ||
+ | |||
+ | ==== OSC messages to embedded Unify instances ==== | ||
+ | **As of Unify v1.9**, it is possible to direct OSC commands to specific embedded Unify instances. The required path syntax is similar to that for sending parameter-update messages to plug-ins, but the word //unify// is used instead of //plugin//, and this is followed by the OSC command to be sent to the Unify instance. | ||
+ | |||
+ | For example, to send the command /// | ||
+ | |||
osc-support.1636731910.txt.gz · Last modified: 2023/05/08 18:59 (external edit)