ICube Max Plugin-40 Commands

From I-CubeX Wiki
Revision as of 01:42, 21 January 2018 by Admin (talk | contribs)
Jump to: navigation, search

The iCube Max plugin responds to the following commands that can be sent to it using a Max message object. If a command has aliases they are displayed following the command, in brackets and separated by commas. Commands that in turn send commands as System Exclusive MIDI messages to the digitizer refer to the firmware command in capitals. More information about the command can be found in the applicable firmware section on this support wiki.


System-wide commands


version (0 version)

Prints the iCube version and, if available, digitizer version in the Max window.


reset (0 reset)

Initializes the iCube data structure as per the init command and sends a RESET command to the digitizer.


init (0 init)

Initializes the iCube data structure to the default settings as specified below.

System-wide:

  • interval: 10 for firmwares greater than 5.1 and smaller than 6.0, greater than 6.2 and smaller than 7.0, or greater than 7.1, and 100 for other firmwares
  • mute: 0, ie. off
  • id: 0
  • digid: 0

Input-specific:

  • connect: connect each outlet to the sensor input with the same number
  • stream: 0, ie. off
  • inmin: 0
  • inmax: 5
  • min: 0
  • max: 5
  • res: 1/1024 for all digitizers except the Digitizer, or 1/4096 for Digitizer
  • steps: 1024 for all digitizers except the Digitizer, or 4096 for Digitizer
  • noise: 1/(steps - 1) in host mode, or 0 in standalone mode
  • smooth: 0
  • unit: 5/(steps - 1)
  • offset: 0
  • preset: 1
  • address: 0
  • function: 0, ie. analog sensor
  • method: 0


sync (0 sync)

Retrieves all the configuration information from the digitizer and stores it in the iCube data structure.


digid <value> (setdigid <value>, 0 digid <value>)

Sends a SET ID command to the digitizer to set the digitizer's System Exclusive ID to <value>.


id <value> (0 id <value>)

Sets the iCube to respond to and send System Exclusive messages with the System Exclusive ID equal to <value>.


host (0 host, 0 hostmode)

Sends a SET MODE command to the digitizer to set it to host mode.


standalone (0 standalone, 0 standalonemode)

Sends a SET MODE command to the digitizer to set it to standalone mode.


mode <value> (0 mode <value>)

Sends a SET MODE command to the digitizer to set to its mode specified by <value>.


interval <value> (0 interval <value>)

Sends an INTERVAL command to the digitizer to set its sampling interval to <value> ms.


rate <value> (0 rate <value>)

Sends an INTERVAL command to the digitizer to set its sampling rate to <value> Hz.


mute <value> (0 mute <value>)

Sends an SET MUTE command to the digitizer to set its mute status to <value> (0 is off, 1 is on).


print (0 print)

Prints all the available data stored in the iCube data structure in the Max window.


verbose <value> (0 verbose)

Sets what kind of messages are printed in the Max window, according to <value>:

  • 0: no messages
  • 1: confirmation messages
  • 2: confirmation and error messages
  • 3: all messages


help (0 help)

Prints the URL of the main page about iCube on this support wiki in the Max window.


thru <value> (0 thru <value>)

Sends a THRU command to the digitizer, if it is a microDig, miniDig or Digitizer, to set the MIDI thru status to <value> (0 is off, 1 is on).


midiout <value> (0 midiout <value>)

Sends a MIDIOUT command to the digitizer, if it is a USB-microDig, Wi-microDig or Wi-miniDig, to set the MIDI out port (for use with the USB-microMIDICable) status to <value> (0 is off, 1 is on).


power (0 power)

Sends a POWER command to the digitizer, if it is a USB-microDig (with firmware v7.0), Wi-microDig or microDig to request the whether the voltage level of the power supply for the sensors is normal (0) or too low (1).


battery (0 battery)

Sends a BATTERY command to the digitizer, if it is a Wi-microDig to request the battery voltage level.


clearconfig (0 clearconfig)

Sends a CLEAR CONFIG command to the digitizer to set its standalone mode configuration to default values.


runningstatus <value> (0 runningstatus)

Sends a RUNNING STATUS or MIDI STATUS (depending on the digitizer's firmware) command to the digitizer to set its standalone mode MIDI running status to <value> (0 is on, 1 is off).


activesensing <value> (0 activesensing <value>)

Sends a RUNNING STATUS or MIDI STATUS (depending on the digitizer's firmware) command to the digitizer to set its standalone mode MIDI active sensing status to <value> (0 is off, 1 is on).


intervalmarking <value> (0 intervalmarking <value>)

Sends a RUNNING STATUS or MIDI STATUS (depending on the digitizer's firmware) command to the digitizer to set its interval marking status to <value> (0 is off, 1 is on).


Input-specific commands

Outlets and inputs are numbered starting with 1.


<outlet> connect <input> (<outlet> assign <input>)

Connects the iCube outlet <outlet> to digitizer sensor input <input>.


<outlet> stream <value>

Sends a STREAM command to the digitizer to set the sensor input connected to outlet <outlet> to <value> (0 is off, 1 is on).


<outlet> on

Sends a STREAM command to the digitizer to enable the sensor input connected to outlet <outlet>.


<outlet> off

Sends a STREAM command to the digitizer to disable the sensor input connected to outlet <outlet>.


<outlet> sample

Sends a SAMPLE command to the digitizer to request the latest value of the sensor connected to the sensor input which in turn is connected to outlet <outlet>.


<outlet> res <value>

Sends a RES command to the digitizer to set the resolution of the sensor input connected to outlet <outlet> to <value> (0 is low, 1 is high). This command is only applicable to analog sensors. The low resolution is 7-bit, the high resolution is 10-bit for all digitizers except the Digitizer which high resolution value is 12-bit.


<outlet> address <value>

Sends a FUNCTION command to the digitizer to set the I2C device id of the digital sensor connected to the sensor input which in turn is connected to outlet <outlet> to <value>.


<outlet> function <value> (<outlet> func <value>)

Sends a FUNCTION command to the digitizer to set the function number of the digital sensor connected to the sensor input which in turn is connected to outlet <outlet> to <value>.


<outlet> method <value>

Sends a FUNCTION command to the digitizer to set the method number of the digital sensor connected to the sensor input which in turn is connected to outlet <outlet> to <value>.


<outlet> analog, biobeat3d, hotspot2d, magnetic3d, moist3d, movealong, movearound, orient3d, orient4d, reachclosed, reachid, swipe3d <value>

Sends a FUNCTION command to the digitizer to set the I2C device id and function number according to the type (as specified by the name of the command) of the digital sensor connected to the sensor input which in turn is connected to outlet <outlet>, and its method to <value>.


<outlet> min <value>

Sets the iCube to scale sensor values received for the sensor input connected to outlet <outlet> to a range with minimum <value>.


<outlet> max <value>

Sets the iCube to scale sensor values received for the sensor input connected to outlet <outlet> to a range with maximum <value>.


<outlet> inmin <value>

Sets the iCube to discard sensor values received for the sensor input connected to outlet <outlet> when it is lower than <value>, and scale sensor values between the inmin and inmax values to the min and max values set by the inmax, min and max commands.


<outlet> inmax <value>

Sets the iCube to discard sensor values received for the sensor input connected to outlet <outlet> when it is higher than <value>, and scale sensor values between the inmin and inmax values to the min and max values set by the inmin, min and max commands.


<outlet> steps <value> (<outlet> step <value>)

Sets the iCube to divide the output range into the number of values as specified by <value>, which is at most the inverse of the resolution of the sensor value.


<outlet> unit <value>

Sets the iCube to multiply each sensor value by <value> so that the output value is in the specified unit of measurement. By default set to the voltage resolution of the digitizer, ie. 5 / 1023 = 0.004888 for a digitzer with 10-bit resolution such as the USB-/Wi-microDig. Note that the actual voltage range may be less than 5 volt.


<outlet> offset <value>

Sets the iCube to add <value> to the sensor value. This may be useful for offsetting a sensor value so that it matches the expected output value in physical units of measurement. By default set to 0.


<outlet> normal <value>

Sets the iCube to scale sensor values using the min and max settings to the range {0 .. <value} if <value> is greater than zero, or {-<value> .. <value} if <value> is smaller than zero.


<outlet> noise <value>

Sets the iCube to only output values if the output value is greater or equal to <value>.


<outlet> smooth <value>

Sets the iCube to apply an exponential moving average filter to the sensor value with the level of the filter specified by <value>. A higher <value> increases the smoothing.


<outlet> preset <value>

Sets the iCube to select a a preset according to <value>:

  • 0: output raw data, ie. output the sensor values as they were received from the digitizer input.
  • 1: output values scaled to the range {0..5}
  • 2: output values scaled to the range {-1..1}
  • 3: output values scaled to the range {0..1}
  • 4: output values scaled to the range {0..10}
  • 5: output values scaled to the range {0..100}
  • 6: output values scaled to the range {0..127}
  • 7: output values scaled to the range {0..1023}
  • 8: output values scaled to the range {0..4095}
  • 9: output values scaled to the range {0..16383}


<outlet> raw

Sets the iCube to output raw data, ie. output the sensor values as they were received from the digitizer input.