OSSIA_Device:
Filter:
OSSIA/Classes (extension) | Ossia

OSSIA_Device
ExtensionExtension

the rootnode of ossia-based applications

Description

an OSSIA_Device is to be considered as the rootnode of all ossia-based applications. It may be exposed to the network using different protocols, such as OSC, OSCQuery, Minuit etc.

Class Methods

.newOSCQueryServer

shortcut class method to instantiate device and directly expose it to the network with the OSCQuery protocol.

Arguments:

name

a String or Symbol to identify the device on the network

osc_port

device will receive osc (udp, non-critical) messages on this port, defaults to 1234

ws_port

device will receive websocket (tcp, critical) messages on this port, defaults to 5678

callback

a Function to evaluate when device is instantiated and exposed on the network. Typically, this is used to build the different nodes and parameters composing the application node-tree.

Returns:

an OSSIA_Device

.new

instantiates a device without exposing it to the network, which can be later achieved by calling the .exposeProtocol methods, such as .exposeOSCQueryServer, .exposeMinuit, .exposeOSC, etc.

Arguments:

name

a String or Symbol to later identify the device on the network

Returns:

an OSSIA_Device

.newOSCQueryMirror

shortcut class method to instantiate a mirror image of a device already exposed on the network.

Arguments:

name

a String or Symbol indicating the device's identifier on the network

host_addr

a String or Symbol indicating the host address on the network, e.g. "ws://localhost:5678"

callback

a Function to evaluate when device is instantiated.

Returns:

an OSSIA_Device

.newMinuit

shortcut class method to instantiate device and directly expose it to the network with the Minuit protocol.

Arguments:

name

a String or Symbol to identify the device on the network

remote_ip

a String or Symbol indicating the receiver's ip address

remote_port

an Integer indicating the receiver's port

local_port

an Integer indicating the device's osc receive port

callback

a Function to evaluate when device is instantiated and exposed on the network. Typically, this is used to build the different nodes and parameters composing the application node-tree.

Returns:

an OSSIA_Device

.newOSC

shortcut class method to instantiate device and directly expose it to the network with the OSC protocol.

Arguments:

name

a String or Symbol indicating the device's identifier on the network

remote_ip

a String or Symbol indicating the receiver's ip address

remote_port

an Integer indicating the receiver's port

local_port

an Integer indicating the device's osc receive port

callback

a Function to evaluate when device is instantiated and exposed on the network. Typically, this is used to build the different nodes and parameters composing the application node-tree.

Returns:

an OSSIA_Device

Instance Methods

.exposeOSCQueryServer

exposes a device to the network with the OSCQuery protocol.

Arguments:

osc_port

device will receive osc (udp, non-critical) messages on this port, defaults to 1234

ws_port

device will receive websocket (tcp, critical) messages on this port, defaults to 5678

callback

a Function to evaluate when device is exposed on the network. Typically, this is used to build the different nodes and parameters composing the application node-tree.

Returns:

an OSSIA_Device

.exposeOSCQueryMirror

catches a network-exposed device, mirrors it in SuperCollider

Arguments:

host_addr

a String or Symbol indicating the host address on the network, e.g. "ws://localhost:5678"

callback

a Function to evaluate when device is instantiated

Returns:

an OSSIA_Device

.exposeMinuit

exposes a device to the network with the Minuit protocol.

Arguments:

remote_ip

a String or Symbol indicating the receiver's ip address

remote_port

an Integer indicating the receiver's port

local_port

an Integer indicating the device's osc receive port

callback

a Function to evaluate when device is exposed on the network.

Returns:

an OSSIA_Device

.exposeOSC

exposes a device to the network with the OSC protocol.

Arguments:

remote_ip

a String or Symbol indicating the receiver's ip address

remote_port

an Integer indicating the receiver's port

local_port

an Integer indicating the device's osc receive port

callback

a Function to evaluate when device is exposed on the network.

Returns:

an OSSIA_Device

.free

free a device and all of its contents (its node-tree)

Returns:

nil

Examples