OSC input and output

Read with AI
All docs in one file (llms-full.txt)

OSC is the mechanism for driving SynapseRack from external software such as a controller app on your phone or TouchDesigner. It also lets SynapseRack send values out.

There are two ways to go about it.

WayWhen it suits
Assign directly to the UI on screenWhen you want to drive existing UI — a layer’s Opacity, the play button — from outside as it is
Place OSC nodesWhen you want to process the received value with nodes, or send values out of SynapseRack

First, enable it

Setting → GlobalSettings → OSC in the menu bar.

ItemContentDefault
OSC InputReceiving on/offOFF
Input PortThe receive port3170
OSC OutputSending on/offOFF
(an unlabeled dropdown)Switches between Localhost and CustomLocalhost
Output AddressThe destination address (only shown when set to Custom)127.0.0.1
Output PortThe send port3171

Both input and output are off in the initial state. When “I am sending but nothing happens”, first check whether OSC Input is on.

On the sending app, enter the IP address of the machine running SynapseRack and the value of Input Port.

Going back to Localhost does not clear the destination address you entered. All that is hidden is the input field. When you want to send back to the local machine, leave it on Custom and re-enter 127.0.0.1.

This setting is saved on the machine rather than in the project (the settings screen also says Saved on this machine, not in the project file at the bottom). Even when the network differs from venue to venue, carrying your .synapse around means the settings of that machine are the ones used.

Checking that it is arriving

The messages received are listed as they are in the OSC Monitor. The address and the type can both be checked here, so this is the first place to look when something does not work.

Assigning to the UI on screen

You assign inside the same assign mode as MIDI.

  1. Turn on OSC Input and actually send a signal from the sending side
  2. Enter assign mode with Setting → MidiMapping in the menu bar
  3. Click the UI you want to assign so that it turns red
  4. The addresses received are listed under OSC sources (click to assign): in the MIDI Inspector
  5. Click that line and it is assigned

The MIDI Inspector with its OSC sources area

The format of a line is address [argument index] (current value). When a single message contains several values, each value is listed as a separate line.

While nothing has been received yet, it shows Move an OSC control to detect its address.... The way to find one is to move a fader on the sending side so that its address appears.

OSC does not do “move it and it gets assigned automatically”. With MIDI, moving a knob binds it on the spot, but OSC can have large numbers of signals flowing constantly, so it uses a pick from the list approach.

The list resets every time you change the selection. Clicking a different UI element, or entering and leaving assign mode, empties it. If the address you want disappears, move the sending side again and it comes back.

Only arguments that can be read as numbers appear in the list. Floats, integers and booleans are picked up, but string and binary arguments do not become candidates. Up to 64 candidates accumulate.

To remove an assignment, use the × at the right end of a line under Mappings:. See MIDI mapping for details.

How values act

The value sent is passed to the UI as it is. Send 0 to 1 and a slider moves accordingly, and buttons and toggles fire once the moment the value crosses 0.5 from below to above.

Wiring things with the OSC nodes

The I/O category of the Node Editor has three kinds each for input and output.

NodeRole
OSCFloatInputOutputs the float it received
OSCIntInputOutputs the integer it received
OSCBoolInputOutputs the boolean it received
OSCFloatOutputSends a float
OSCIntOutputSends an integer
OSCBoolOutputSends a boolean

Every one of these nodes has a field for writing an address. The input side reads the first value of a message whose address matches exactly, and the output side sends when the input value changes (and when a Trigger arrives).

Messages whose type does not match are ignored, so when you think you are sending a float but an integer is arriving, check type: in the OSC Monitor.

See the node reference for the detailed specification of each node.

  • OSC Monitor — checking the messages received
  • MIDI mapping — the detailed explanation of assign mode
  • Widget Panel — assigning OSC to a control screen you laid out yourself

Pages linking here

Also referenced from