Skip to content

fx.MugicConnect

Download

fx.Mugic.Connect v2

Updated March 14, 2024

Requirements

Download the current version of the fx.MugicConnect object from the link above and extract the contents of the zip archive. The JavaScript files extracted from the download need to be in the Max search path. The simplest way to accomplish this is to keep these files in the same folder as the fx.MugicConnect patcher file.

Use the Max Package Manager to install the latest version of the o.dot package by CNMAT.

Using the Object

You need one fx.MugicConnect object for each Mugic sensor being tracked. An ID number parameter (required) specifies the UDP port and IP address of the Mugic device. Refer to the fx.MugicHowTo patcher in the download for more details and usage examples.

OSC message format

OSC messages to and from the fx.MugicConnect object start with a slash "/", followed by a unique ID number for the Mugic device, from 00 to 99, then another slash, then the rest of the message. The ID number in an OSC message to or from the fx.MugicConnect object is always two digits. In this dictionary {ID} means the ID number.

OSC Dictionary for fx.MugicConnect

Message arguments

  • {float}: Floating point value
  • {int}: Integer value
  • {string}: String value
  • {0|1|2}: Int, either 0 OR 1 OR 2
  • {this|that|whatever}: String, either "this" OR "that" OR "whatever"

Examples look like this


Receive messages from fx.MugicData

/{ID}/energy {float}

Energy level mapped from 0 to 1

/01/energy 0.5 means the energy level is in the middle of the mapping range


/{ID}/jolt {int}

Jolt event, 1 followed by 0

/01/jolt 1 means the start of a jolt event


/{ID}/pitch/angle {float}

Pitch angle in degrees

/01/pitch/angle 180


/{ID}/pitch/value {float}

Pitch value from 0 to 1

/01/pitch/value 0.5


/{ID}/pitch/direction {int}

Pitch direction, -1 or 0 or 1

/01/pitch/direction 1


/{ID}/pitch/stability {int}

Pitch stability, 0 if not stable, -1 if not enough data, otherwise the duration of stable pitch

/01/pitch/stability 0


/{ID}/roll/angle {float}

Roll angle in degrees

/01/roll/angle 180


/{ID}/roll/value {float}

Roll value from 0 to 1

/01/roll/value 0.5


/{ID}/roll/direction {int}

Roll direction, -1 or 0 or 1

/01/roll/direction 1


/{ID}/roll/stability {int}

Roll stability, 0 if not stable, -1 if not enough data, otherwise the duration of stable roll

/01/roll/stability 0


/{ID}/yaw/angle {float}

Yaw angle in degrees

/01/yaw/angle 180


/{ID}/yaw/value {float}

Yaw value from 0 to 1

/01/yaw/value 0.5


/{ID}/yaw/direction {int}

Yaw direction, -1 or 0 or 1

/01/yaw/direction 1


/{ID}/yaw/stability {int}

Yaw stability, 0 if not stable, -1 if not enough data, otherwise the duration of stable yaw

/01/yaw/stability 0


Send OSC Messages to fx.MugicControl

/{ID}/enable {0|1}

Enable or disable Mugic data processing

/01/enable 0 means "disable Mugic device 01."


/{ID}/reset

Reset Mugic data.

/01/reset means "reset Mugic device 01."


/{ID}/energy/low {int}

Low end of energy mapping range, mapped to 0.

/01/energy/low 0


/{ID}/energy/high {int}

High end of energy mapping range, mapped to 1.

/01/energy/high 1000


/{ID}/energy/exp {float}

Exponential curve for energy value mapping.

/01/energy/exp 0.5


/{ID}/energy/damping {float}

Damping (smooth filtering) factor for energy values.

/01/energy/damping 0


/{ID}/energy/mode {0|1|2}

Energy tracking mode:

  • 0: accelerometer only
  • 1: gyroscope only
  • 2: accelerometer and gyroscope combined

/01/energy/mode 0


/{ID}/jolt/sensitivity {float}

Sensitivity (smooth filtering) factor for jolt events.

/01/jolt/sensitivity 5.0


/{ID}/jolt/threshold {float}

Minimum energy level required to trigger a jolt event.

/01/jolt/threshold 200.0

Credits

fx.MugicConnect was developed by John Crawford, incorporating previous software and related work by Christopher Dobrian, Hervé Brönnimann, Teerath Majumder and Mari Kimura.