OpenSoundControl

With OpenSoundControl (OSC) support, Max can be controlled by any OSC-compatible device or application, and can also send OSC messages to control other OSC-enabled systems.

OSC can be enabled in Max in two ways:

  1. Through the built-in UDP server, which you can activate for the whole application in Max's preferences, or for a specific patcher using the patcher inspector.
  2. By using the param.osc object.

Once enabled, parameters are automatically given OSC addresses, which have the following structure:

/<patcher name>/param/<parameter name>/<attribute name>

The different components that make up the address are configurable globally and locally in each patcher. Using these addresses, you can get and set the values of the following parameter attributes:

Parameter attributeOSC addressDescription
Long Name/longnameThe unique name of the parameter
Short Name/shortnameThe short name used for display
Scripting Name/scriptnameThe scripting name associated with the object that hosts the parameter
Parameter Type/typeThe type of the parameter, one of float, int, enum, blob, file
Visibility/visibilityThe parameter's visibility in the parameter system. Changing this value will not affect the visibility of this parameter to the OSC system. See the OSC Enable attribute.
Minimum/minThe parameter's minimum value, if it has one (i.e. if it's an int, float, or enum
Maximum/maxThe parameter's maximum value, if it has one (i.e. if it's an int, float, or enum
Exponent/exponentThe parameter's exponent, if it has one (i.e. if it's an int, float, or enum
Raw Value/rawThe raw (scaled) value of the parameter. This address container is optional if the raw value is the only value present in the OSC bundle. See the OSC Value Mode attribute.
Normalized Value/normalizedThe normalized ([0,1]) value of the parameter. This address container is optional if the raw value is the only value present in the OSC bundle. See the OSC Value Mode attribute.

osc.codebox

osc.codebox can be used to display the contents of an OSC packet using JSON syntax. It's worth mentioning that OSC is a binary format--it has no human-readable form. The use of JSON syntax to represent OSC should be considered an approximation of the underlying binary data.

OSCQuery

OSCQuery is a method of describing the capabilities of an OSC server. An http server can be configured to serve OSCQuery requests in Max by enabling OSCQuery in the general preferences.

Once enabled, an OSCQuery request can be generated with a URL like http://localhost:30339. All patchers with parameters exposed as OSC will be present in the OSCQuery response. Individual patchers can be excluded from the OSCQuery response using the option in the patcher inspector.

The FullPacket Message

Objects that accept and produce OSC do so using a message called FullPacket. This message is passed with two arguments, and should be considered opaque, i.e. these arguments are not to be manipulated as normal max values.

An important property of the FullPacket message is that it is transient and must not be stored in objects like the message box, zl.reg, etc.