Contact Us

CATEGORIES

Whoops…Nothing found

Try other keywords in your search

OSC Module

 2 Minutes

 0 Likes

 308 Views

Description

 

This Module is used to send and receive OSC data out from and into PIXERA. 

 

 


 

Usage

 

The OSC Module aims to allow data to be transferred between PIXERA and other software, allowing a variety of workflows. These include:

  1. CMS control of PIXERA with incoming data
    2. Dynamic media changes based on incoming data
  2. PIXERA status information sent out for external use
  3. PIXERA CMS control of another software/hardware

 


 

Procedure

 

In the Properties of the Module:

  • Set the “IP”, “Port Send”, and “Port Receive” values for the software the OSC data should be sent to and where it should be received.
  • Init the Module and check if the “IsOpen” Action is set to true

From here, the Module's procedure changes depending on if you are sending data or receiving data.

 

Sending

 

For sending, you will need to run any of the Actions found inside the “Send” folder using a given path and value depending on the Action ran.

 

The first value, being the “path”, must be a string value that start with a forward slash followed by whatever name you want the path to be. Some examples would be “/position” or “/rotation”.

The second value depends on the Action used, with options to send an Integer, a Float, a String, or an Array of values.

To send values to these actions correctly, you will either have to call the action in LUA code or use “pixc.callRefs()” from a connected module to send the data you wish to use.

 

LUA Code inside “luaCodeSendFloat”:

Osc.Send.sendFloat("/xPosition", 1.0)

LUA Code inside "pixcCallRefsSendFloat":

pixc.callRefs("/xPosition", 1.0)

 

 

Receiving

 

For receiving, you need to create new actions in the module using the “Last Received Path” and the “creat action” button.

When values are received, the “oscReceive” action in the “Receive” folder will take in the path used as the first parameter while the second holds whatever data was sent over, whether it be an Integer, a Float, a String, or an Array.

The properties of the Module are then updated in real time to display this data in the “Last Received Path” property and the “Last Received Value” property, respectively.

Once a message has been received, you can use the “creat action” button to generate a new action in the “Receive” folder with the same name as the path name, minus the forward slash. The “…” as the parameter means the action will take as many of any kind of input to then use. You can make as many of these actions as you want, and creating one with the same name will just overwrite the old Action of the same name.

 

Inside the Module is the after mentioned “pixc.callRefs” which will allow all the received values to be sent out from the Action via a node connection.

Two more properties are available to change how the Action will initially be created.

If “Pack arguments in array” is turned on, then the values that are sent out will be in a table instead of seperate.

If “Add true to arguments” is on, then the "pixc.callRefs" call will include another parameter to send a “true” boolean value as well.

 


 

Data

 

Actions

Action

Info

Input

Output

ref   - -
init   - -
uninit   - -
IsOpen   isOpen (bool), doSet (bool) -
Send FOLDER FOLDER FOLDER
sendInt   path (string), value (int) -
sendFloat   path (string), value (double) -
sendString   path (string), Command (string) -
sendArray   path (string), ... () -
Receive FOLDER FOLDER FOLDER
oscReceive   addr (string), ... () -
build (hidden) - -

 


 

Parameters

Name

Content

Type Hint

Options Source

Options Action

Auto Init TRUE bool   []
IP 127.0.0.1 string   []
Port Send 9000 number   []
Adapter IP Any string Utils.Network.getLocalAdapterEntries []
Port Receive 8990 number   []
Last Received Path   string   []
Last Received Value   string   []
create creat action button   self.build
Pack arguments in array FALSE bool   []
Add true to arguments FALSE bool   []

 

Pixera 2.0.172 | 10 October 2024 | CL

Was this article helpful?