2. MXW OSC command structure

From MXWendler Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

View source for 2. MXW OSC command structure ← 2. MXW OSC command structure Jump to navigationJump to search You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: Users.

You can view and copy the source of this page.

Commands to the MXW OSC interface always follow the same syntax:

/mxw/<address of widget> [MSGID] <float|integer|string>

for example:

/mxw/track/1 0.5
/mxw/set play patch1
/mxw/playlist MSGID0001 info

Commands always begin with /mxw/ and it is followed by the address of the receiver and an argument that can be a numeric value, a string, or a combination of both. The only optional element is the “Message-ID”.

2.1 Sending OSC Values

The command receivers listen to a value that is either a float or an integer (if they are widgets), or to strings (e.g. to choose patches or clips).


Receivers in MXW connected to faders in the user interface are responding to Float values. Floats are always in the range of 0.0 to 1.0 and will be scaled to the actual range of the recalled widget.
For instance, the speed fader has a range in MXW that goes between -5 and 5 and its active range is dependent on the type of played media.
If a float value like 0.6 is sent to the OSC address of the clip speed, the fader moves to the value 1.0 (original speed of the clip).

Buttons and Checkboxes

Widgets in MXW that have an ON/OFF state accept integers as values. Buttons have the functions Press and Release assigned respectively to 1 and 0 and checkboxes have assigned ON and OFF respectively to 1 and 0.
This means that if one wants to send a button press, e.g. a "play" button press, a value "0" has to be sent (to send a command, like with a mouse-click, a button must be pressed and released after)

Drop-down Boxes and Combo Boxes

Drop-down lists and Combo Boxes are indexed with integers ranging between 1 and the maximum number of elements. For example to select the third element of a list the integer 3 will be sent to the address of the Combo Box.

String Tokens

Specific string tokens can also be sent to the command receivers and they can respectively activate specific functions paired with a numeric value or another string. The usable strings are playinfo select preview clear.


The string play can be sent together with another string containing the name of a saved patch in the address /mxw/set to start the playback of the recalled patch.

/mxw/set play patch1.


The string variable info can be sent to a specific address to acquire information about one field or clip through a reply sent by MXW. The reply bundle coming from MXW will also be sent through OSC and will have this format:

  • A reply header composed by:

1. Message mxw/reply
2. MSGID (if specified in the info request)
3. Address pattern of the request
4. Time as a long variable

  • The actual reply content following this table:
/mxw/playlist info 1. State of the playback (play, paused, stopped)
/mxw/playlist/container/active info 1. Active container index
2. Number of columns
3. Number of rows
mxw/playlist/container/active/column/1/row/1 info 1. Label of media in the container in column 1, row 1
/mxw/track/active/layer/active/clip info 1. Length of media
2. Width
3. Height
4. ms per frame
5. Completition of cache (cachecomplete/cachenotcomplete)
6. Path directory of the active clip
/mxw/preload/1 info 1. Length of media
2. Width
3. Height
4. ms per frame
5. Completition of cache (cachecomplete/cachenotcomplete)
6. Path directory of the media of the first preload
mxw/keystone info 1. Active keystone element index
2. Name of active keystone element
3. Amount of total keystone elements
4. Names of keystone elements separated by commas
5. Active softedge index
6. Name of active softedge
7. Amount of total softedges
8. Names of softedges separated by commas
9. Active grabber element index
10. Name of active grabber element
11. Amount of total grabber elements
12. Names of grabber elements separated by commas
13. Active blacklevel element index
14. Name of active blacklevel element
15. Amount of total blacklevel elements
16. Names of blacklevel elements separated by commas
mxw/keystone/element/1 info 1. Element name
2. Element type
3. Video track number
4. Video layer number
5. Precision
6. Number of pivots x
7. Number of pivots y
8. Scale
9. Opacity
10. Rotation of element number 1
/mxw/keystone/element/1/pivot/col/1/row/1 info 1. Pivot translation x
2. Translation y
3. Translation z
4. UV value x
5. UV values y
6. UV normalized x
7. UV normalized y
mxw/layermanager info 1. Active layer index
2. Name of active layer
3. Amount of total layers
4. Names of layers separated by commas
mxw/set info 1. Active patch index
2. Name of active patch
3. Amount of total patches
4. Names of patches separated by commas
mxw/trackmanager info 1. Active track index
2. Name of active track
3. Amount of total tracks
4. Names of tracks separated by commas
Addresses of Drop-down Boxes and Combo Boxes in MXW
(e.g. mxw/render/effect info)
1. Index and Name of currently selected item
2. Amount of total items
3. Names of items separated by commas
Addresses of Faders in MXW
(e.g. mxw/render/opacity info )
1. Value of position of fader (0 .. 1)
Addresses of Buttons/Checkboxes in MXW
(e.g. mxw/track/1/crossfade info)
1. State of the widget (0 = released/OFF , 1 = pressed/ON)
NOTE: The token active can be substituted with an integer corresponding to the index of the wished element

As an example, if we send:

/mxw/playlist/container/active info

MXWendler will reply:

mxw/reply /mxw/playlist/container/active       980451    0     3      20

Reply Message    Address of Request           Time    Index  Col.   Row


The token select can be added to different addresses to select the single elements on a list of many using a string. This command is can be used in combination with the token info as the names of the elements can be recalled with info first and then selected with the select token. The receivers that respond with the token select are:

  • trackmanager
  • layermanager
  • combo-boxes

/mxw/trackmanager select track2


The token active is used in the receiver address and can be used in multiple situations to act on the selected element of a list. For example the command:

/mxw/track/active/fader 0.5

will move the fader of the selected (active) track to his middle position, setting its opacity to 50%.


The string preview can be used to get in return an OSC blob, containing a 128x128px jpg file that is a preview of the currently played media or a thumbnail of the selected clip. Here are the available addresses for a preview:

Render /mxw/render preview
Track /mxw/track/active preview
Layer /mxw/track/active/layer/active preview
Clip /mxw/track/active/layer/active/clip preview
Preload /mxw/preload/"preload index" preview
/mxw/preload/7 preview
Patch/Set /mxw/patch/"patch index" preview
E.G./mxw/patch/3 preview
NOTE: The token active can be substituted with an integer corresponding to the index of the wished element


The function clear can be sent to the preloads to empty one of the preload spaces.

E.G. mxw/preload/1 clear will clear the first preload slot.


The “Message-ID” allows for clear communication and categorization of replies. When a command that generates a reply is sent, it is possible to prepend the command with a “Message-ID” which will be then in the reply as well. This message must have the format MSGIDXXXX and it must follow the OSC address like in the following example:

/mxw/preload/3 MSGID0123 info

will return a reply similar to:

/mxw/reply MSGID0123 /mxw/preload/3 112 320 240 40 cachecomplete c:\footage\clip.avi

2.2 Examples

To address the main fader and fade the opacity of the render from zero to full in ten steps, you would send a command sequence:
/mxw/render 0.0
/mxw/render 0.1
/mxw/render 0.2
/mxw/render 0.3
/mxw/render 0.4
/mxw/render 0.5
/mxw/render 0.6
/mxw/render 0.7
/mxw/render 0.8
/mxw/render 0.9
/mxw/render 1.0

Finer-grained values can be sent if needed. The commands will be evaluated as soon as they arrive in MXW and the last command before a new frame is drawn will set the widget's value.

/mxw/track/active 0.5
Sets the active track opacity to 0.5

/mxw/track/1 0.5
Sets track 1 opacity to 0.5

/mxw/preload/1/trigger 1.0
Adds a layer with the contents of preload slot 1

/mxw/track/1/layer/1/opacity 0.5
Sets the opacity of the first layer of the first track to 0.5 (if there is a layer playing content)

/mxw/set 5
The active track will load patch 5

/mxw/track/active/layer/active/clip/speed 0.6
Sets the speed of the clip of the active layer of the active track to 1.0 (0.6 translates to 1.0 in a -5 .. +5 range)

/mxw/track/active/layer/active/clip/speed 0.5
Sets the speed of the clip of the active layer of the active track to 0.5 (clip stops)

/mxw/trackmanager 1
Activate the first track

/mxw/trackmanager 3
Activate the third track

/mxw/trackmanager select track3
Activate the third track

/mxw/track/2/layer/1/clip/effect/2 select ag_AnimWarp
Instructs the clip of the first layer of the second track to load the effect with the name "ag_AnimWarp" in the effect slot number 2

/mxw/track/2/layer/1/clip/effect/1/param/1 0.8
Set to the value of 0.8, the parameter 1 of the first effect of the clip of the first layer of the second track

/mxw/preload/2 c:/footage/clip.avi
Preload slot 2 will load c:/footage/clip.avi (and answer with info). Note the direction of the slashes.

/mxw/preload/2 clear
Preload slot 2 will unload

/mxw/preload/2 info
Preload 2 will answer with clip info like
/mxw/reply /mxw/preload/3 112 320 240 40 cachecomplete c:\footage\clip.avi

/mxw/preload/2 MSGID0123 info
Preload 2 will answer with clip info like
/mxw/reply MSGID0123 /mxw/preload/3 112 320 240 40 cachecomplete c:\footage\clip.avi

/mxw/master/load_showfile c:/footage/showfile.mxw
Load the stated showfile

/mxw/master/load_keystonefile c:/footage/keystonefile.mxw_keystone2
Load the stated keystonefile