1.  Some preliminary considerations

OSC is designed to receive OSC messages that are sent over the network.

All that is received by OSCulator are network packets, even for supported devices like the Wiimote. In this case, OSCulator acts as a driver and converts the device data to OSC messages sent to himself.

1.1  Hosts and ports

OSC packets are sent to specific hosts on a specific port. Ports are like network listening inlets ; they are said to be "opened" when a OSC receiver is configured to listen on this port.

For example, the Lemur multitouch screen needs to know to which host and port it must send its OSC data. The host is usually written with an IP address like 192.168.0.1, or a name like "computer.local." for computers on a local network.

The computer which runs OSCulator has a special name localhost and a special IP address 127.0.0.1. You can use either of these if you want to reference the current computer.

To know the network name of you computer, open the System Preferences application and click on the Sharing Preferences Pane item. Your computer name is written under "Computers on the local network can access your computer at: [...]".

1.2  Control your software and devices

Software like Max/MSP or Reaktor can also receive OSC data. This data is sent over the network, even if it is sent to the same computer that generates the messages.

If you want to control your third-party software, or make some special routing, you can use the OSC Forward Event Type. With this very useful event type, you can route anything to another host or port, even if it is not on the local network1. You can also perform OSC message rewrite in order to change the OSC address during the forwarding.

Combined with the Meta Event Types Toggled Enable and Latched Enable, you can build a simple, yet powerful, OSC router.

2.  Basic steps

Perform these actions while in the main window:

  1. On the OSC message you wish to forward, select the OSC Forward Event Type
  2. In the Value menu, choose the host you want to send the messages to
    • This is list is populated with the running OSCulator documents that are automatically found on the local network, if you want to send the data to a specific port or host, you must configure it in the Parameters window2
    • The default OSC destination localhost:9000 is automatically added to any new document.

3.  The Parameters window

Although the OSC destinations are automatically discovered when two instances of OSCulator are running on the same network, you need to manually configure them if you want to perform more complex routing.

With this panel, you can configure the hosts, ports and rewrite address of each destinations.

On this picture, we show five destinations. Two of them will forward the OSC data to the host computer2 on port 9000 and two of them will forward on the same computer. The difference between the two destination is their rewrite address.

The fifth one has no rewrite address, the field has been left blank.

4.  Advanced topics

4.1  OSC message or argument forwarding?

OSC messages are composed of OSC arguments. You can choose to forward the whole message with all its arguments, or you can choose to forward only a part of it.

Forward an OSC message with all its arguments

This picture shows the configuration of a OSC message forwarding. Here, the message /foo/freq has two arguments.

The destination3 will receive the OSC message /foo/freq with the two arguments.

Forward an OSC argument only

Here, we chose to forward only a part of the OSC message, the first argument. In this case, the destination will receive a OSC message with only one argument at the address /foo/freq/0.

As you notice, the index of the argument is appended to the destination address. This is needed in order to preserve the coherence of the OSC namespace. If OSC Forward was assigned to two arguments with the same destination, the destination could not make the difference on their origin.

4.2  Address rewriting

When a rewrite address is provided for a destination, its name will appear with an arrow in the Values list:

This example shows that the message /methode.cc will be forward to host localhost on port 9000 and the address will be rewritten as /synth/cutoff.

If a message is forwarded with a rewrite address, it doesn't matter wether it is the whole OSC message or only an argument that is forwarded: it destination address will be the same, which is the one provided by the rewrite address.

4.3  Example: Create a (rather) complex OSC router

The goal here is to create a OSC router which receives OSC message on port 8000 and forwards the /foo/freq messages to port 9000 of the local host or port 9000 of the host computer2, based on the state of a trigger OSC message, /methode.cc.

  1. The /methode.cc message has been duplicated 3 times, in order to be able to trigger 4 actions when its value changes. This message is bound to the Toggled Enable Event Type which changes the "enable" state of an OSC message listed in the table.
  2. The argument 0 and 1 of the message /foo/freq have been duplicated one time, in order to assign the two different destinations. We also clicked on the Enable column of the two arguments, so that they will be enabled and disabled subsequently when /methode.cc is triggered.

5.  Miscellaneous notes

5.1  Forwarding to the same document

OSCulator automatically publishes and discover the OSC port on which it is running. This is why the Value menu, always show the OSC destination corresponding to your computer host name and port.

If you choose to forward messaged to this destination, an infinite loop will occur. This is not bad, but not good either, depending on your goal! The decision was made to not restrict this feature, which can be used to demultiplex OSC messages and re-route them to the same document.

5.2  Forwarding to another document

This is a special case of the forwarding to another host on the local network.

On the same scheme as the previous section, if you create a new document and work with two windows, you can forward messages from one window to another.

 

1 if you send OSC to a host that is on internet, you must make sure the destination port is properly routed and that there is no firewall blocking the packets

2 click the Parameters button in the toolbar, or choose Parameters in the View menu

3 in this example, the message will be sent on the same computer, but on port 9000

<< Play Notes with MIDI & Kyma | UsersManual | Keyboard >>