3. JavaScript command reference: Difference between revisions

From MXWendler Wiki
Jump to navigation Jump to search
Line 1: Line 1:
Here are listed all the commands that MXW recognizes.
=== Legend ===
<div>
The standard used to represent the available values for each command is:
''FLOATS'' are represented with one decimal:
<code>0.0 .. 1.0</code> &rarr; all float values between 0 and 1 included
''INTEGERS'' are represented with numbers or descriptions:
<code>1 .. 5</code> &rarr; all integers between 1 and 5 included ( 1 , 2 , 3 , 4 , 5 ) <br>
<code>1 .. (MAX n layers)</code> &rarr; all the integers between 1 and the maximum index of layers in MXW (e.g. if 6 layers are being used the values are integers between 1 and 6 included)
When only one number is indicated it means that only one option is given. This is found in addresses of buttons, checkboxes and in the options where "0" or "1" are the only significant values
''STRINGS'' are represented between double quotation marks:
<code>/mxw/set info </code>
When <code>“name”</code> is contained in the available string variable, then the content is to be substituted with the actual name.
E.G. :  to select and play a patch called “patch_one” from its name, the address <code>/mxw/set</code> with tokens <code>"play" "name_of_patch"</code> has to be used, resulting in this OSC command:
<code>/mxw/set play patch_one</code>
When <u>OR</u> is found it means that two options can deliver a similar result. One of the two formats has to be used at one time.
Here are listed all the commands that MXW recognizes.
Here are listed all the commands that MXW recognizes.


Line 38: Line 72:
|-
|-
! JS COMMAND !! DESCRIPTION !! EXAMPLE
! JS COMMAND !! DESCRIPTION !! EXAMPLE
|-|-
|-
! SOFTWARE INFORMATION
!colspan="3" |Software Info
|-
|-
|<code>mxw.millis</code>||returns the amount of milliseconds passed since opening the software|| <code>print_console("current passed time is" + mxw.millis );</code>  
|<code>mxw.millis</code>||returns the amount of milliseconds passed since opening the software|| <code>print_console("current passed time is" + mxw.millis );</code>  
Line 52: Line 86:
|-
|-
| <code>mxw.framecounter</code>||returns the amount of frames rendered since opening the software|| <code>print_console("total number of frames rendered is" + mxw.framecounter);</code>  
| <code>mxw.framecounter</code>||returns the amount of frames rendered since opening the software|| <code>print_console("total number of frames rendered is" + mxw.framecounter);</code>  
|-
!colspan="3" | I/O
|-
|-
| <code>mxw.dmx()</code> ||returns the DMX value received from the specified universe and channel|| <code>print_console("DMX value in u. 1, ch. 4 is" + mxw.dmx(1,4));</code>
| <code>mxw.dmx()</code> ||returns the DMX value received from the specified universe and channel|| <code>print_console("DMX value in u. 1, ch. 4 is" + mxw.dmx(1,4));</code>
Line 57: Line 93:
| <code>mxw.midi()</code>||returns the MIDI value received from the specified device and channel|| <code>print_console("MIDI value in dev. 1, ch. 6 is" + mxw.midi(1,6));</code>  
| <code>mxw.midi()</code>||returns the MIDI value received from the specified device and channel|| <code>print_console("MIDI value in dev. 1, ch. 6 is" + mxw.midi(1,6));</code>  
|-
|-
| <code>mxw.keyboard(1,32)</code> || Send pulse to beat-button (BPM)|| <code>1</code>
| <code>mxw.keyboard()</code> || || <code></code>
|-
| <code>mxw.media().ptz()</code> || || <code>mxw.media("USB Cam").ptz("ptz_is_supported")</code>
|-
|  || || <code>"ptz_zoom()"</code>
|-
|  || || <code>"ptz_pan_tilt()"</code>
|-
|  || || <code>"ptz_zoom_speed()"</code>
|-
| <code></code> || || <code>"ptz_pan_tilt_speed()"</code>
|-
| <code></code> || || <code>ptz_store_preset()</code>
|-
| <code></code> || || <code>ptz_recall_preset()</code>
|-
| <code></code> || || <code>ptz_auto_focus()</code>
|-
| <code></code> || || <code>ptz_focus()</code>
|-
| <code></code> || || <code>ptz_auto_focus()</code>
|-
| <code></code> || || <code>ptz_auto_focus()</code>
|-
|-
| <code>/mxw/playlist info</code> || return information on the state of the playback of playlist|| <code>"info"</code>
| <code>mxw.makescreenshot</code> || || <code>ptz_focus</code>
|-
|-
|}
|}

Revision as of 16:32, 26 October 2022

Here are listed all the commands that MXW recognizes.

Legend

The standard used to represent the available values for each command is:


FLOATS are represented with one decimal:

0.0 .. 1.0 → all float values between 0 and 1 included


INTEGERS are represented with numbers or descriptions:

1 .. 5 → all integers between 1 and 5 included ( 1 , 2 , 3 , 4 , 5 )
1 .. (MAX n layers) → all the integers between 1 and the maximum index of layers in MXW (e.g. if 6 layers are being used the values are integers between 1 and 6 included)

When only one number is indicated it means that only one option is given. This is found in addresses of buttons, checkboxes and in the options where "0" or "1" are the only significant values


STRINGS are represented between double quotation marks:

/mxw/set info

When “name” is contained in the available string variable, then the content is to be substituted with the actual name.

E.G. : to select and play a patch called “patch_one” from its name, the address /mxw/set with tokens "play" "name_of_patch" has to be used, resulting in this OSC command:

/mxw/set play patch_one


When OR is found it means that two options can deliver a similar result. One of the two formats has to be used at one time.

Here are listed all the commands that MXW recognizes.

Legend

The standard used to represent the available values for each command is:


FLOATS are represented with one decimal:

0.0 .. 1.0 → all float values between 0 and 1 included


INTEGERS are represented with numbers or descriptions:

1 .. 5 → all integers between 1 and 5 included ( 1 , 2 , 3 , 4 , 5 )
1 .. (MAX n layers) → all the integers between 1 and the maximum index of layers in MXW (e.g. if 6 layers are being used the values are integers between 1 and 6 included)

When only one number is indicated it means that only one option is given. This is found in addresses of buttons, checkboxes and in the options where "0" or "1" are the only significant values


STRINGS are represented between double quotation marks:

/mxw/set info

When “name” is contained in the available string variable, then the content is to be substituted with the actual name.

E.G. : to select and play a patch called “patch_one” from its name, the address /mxw/set with tokens "play" "name_of_patch" has to be used, resulting in this OSC command:

/mxw/set play patch_one


When OR is found it means that two options can deliver a similar result. One of the two formats has to be used at one time.

Set Reference

JS COMMAND DESCRIPTION EXAMPLE
Software Info
mxw.millis returns the amount of milliseconds passed since opening the software print_console("current passed time is" + mxw.millis );
mxw.width returns the current frame width in px print_console("frame width is" + mxw.width );
mxw.height returns the current frame height in px print_console("frame height is" + mxw.height);
mxw.outwidth returns current output width print_console("frame height is" + mxw.height)
mxw.outheight returns the current output height print_console("frame height is" + mxw.height);
mxw.framecounter returns the amount of frames rendered since opening the software print_console("total number of frames rendered is" + mxw.framecounter);
I/O
mxw.dmx() returns the DMX value received from the specified universe and channel print_console("DMX value in u. 1, ch. 4 is" + mxw.dmx(1,4));
mxw.midi() returns the MIDI value received from the specified device and channel print_console("MIDI value in dev. 1, ch. 6 is" + mxw.midi(1,6));
mxw.keyboard()
mxw.media().ptz() mxw.media("USB Cam").ptz("ptz_is_supported")
"ptz_zoom()"
"ptz_pan_tilt()"
"ptz_zoom_speed()"
"ptz_pan_tilt_speed()"
ptz_store_preset()
ptz_recall_preset()
ptz_auto_focus()
ptz_focus()
ptz_auto_focus()
ptz_auto_focus()
mxw.makescreenshot ptz_focus