Matrix switch control
bang | A matrixctrl to dump its current state in lists of three values for each cell pair, in the format horizontal-coordinate vertical-coordinate value |
causes |
list | cell-coordinates and values [list] |
A list of ints sets cells in the matrixctrl object using the format <horizontal-coordinate vertical-coordinate value>. Multiple triplets of values can be used to set more than one cell. Coordinates for the cells start at 0 in the upper-left hand corner and the values for each cell start at 0 and go up to the value range minus one, set by the object's inspector. Substituting the symbols and in place of the value will increment or decrement that cell coordinate by a value of one. Changing the cell state with a list causes the list to be output from matrixctrl. |
cellpicture | name-of-graphic-file [symbol] |
This is a legacy message - it has been superseded by the | attribute.
clear | The word | will set the value of all cells to 0.|
bkgndpicture | name-of-graphic-file [symbol] |
This is a legacy message - it has been superseded by the | attribute.
enablecell | cell-coordinates [list] |
The word | , followed by a list of number pairs which specify the horizontal and vertical coordinates of a cell or cells, will set any designated cell or cells which have been disabled using the message to respond to mouse clicks again. The message expects at least one pair of numbers, but more may be added to enable multiple cells (e.g., ).
disable | cell-coordinates [list] |
Performs the same as | .
disablecell | cell-coordinates [list] |
The word | , followed by a list of number pairs which specify the horizontal and vertical coordinates of a cell or cells, sets the designated cell or cells so that they do not respond to mouse clicks. The message expects at least one pair of numbers, but more may be added to disable multiple cells (e.g., ). Although disabled cells will ignore mouse clicks, their values can be set using messages.
getcolumn | column-number [int] |
The word | , followed by a number, sends the values of the cells in the column designated by the number out its right outlet.
getrow | row-number [int] |
The word | , followed by a number, sends the values of the cells in the row designated by the number out its right outlet.
(mouse) | A mouse click on a cell will increase its value by one. Values in matrixctrl will wrap back to 0 once they have reached their maximum possible state. Dragging across several cells will set their values to that of the first cell clicked. Dragging across cells while holding down the Shift key will allow you to drag in straight horizontal or vertical lines only. | |
set | cell-coordinates and values [list] |
The word matrixctrl without echoing the values to the output. | , followed by a list as described above, changes the state of
readanycell | filename [list] |
The word matrixctrl object and attempt to interpret it as a cell image. | followed by the name of a file will read any type of file into the
readanybkgnd | filename [list] |
The word matrixctrl object and attempt to interpret it as a background image. | followed by the name of a file will read any type of file into the
Name | Type | g/s | Description |
---|---|---|---|
active | int def.:1 |
Toggles matrixctrl to ignore or respond to mouse clicks, respectively. By default, matrixctrl responds to mouse clicks. | |
autosize | int def.:0 |
Toggles automatically resizing to rows and columns for the matrixctrl object's display area when a cell picture is added. | |
bkgndpict | symbol def.:<default> |
Designates the graphics file that the matrixctrl object will use for the matrix background image. By convention, the matrixctrl object uses images saved in Portable Network Graphics (.png) format. If you are using Max on Windows and want to to work with images other than PNG or PICT files, we recommend that you install QuickTime and choose a complete install of all optional components. The symbol used as a filename must either be the name of a file in Max's current search path, or an absolute pathname for the file (e.g. " "). The word by itself puts up a standard Open Document dialog box. | |
cellpict | symbol def.:<default> |
Designates the graphics file that the matrixctrl object will use for each cell. By convention, the matrixctrl object uses images saved in Portable Network Graphics (.png) format. If you are using Max on Windows and want to to work with images other than PNG or PICT files, we recommend that you install QuickTime and choose a complete install of all optional components. The symbol used as a filename must either be the name of a file in Max's current search path, or an absolute pathname for the file (e.g. " "). | |
clickedimage | int def.:1 |
Specifies that the graphics file used by the matrixctrl object contains an additional image to be displayed when a cell is clicked. | |
clickvalue | int def.:-1 |
Toggles the click value mode. If the matrixctrl object to create grid editors by creating graphics files which contain a sequence of images, each of which is assigned to a different value; as you click through the sequence of images, the cell image will change to reflect velocity, note, etc. | message is followed by a zero or a positive number, clicking on a cell sets its value to the given number. If is followed by a negative number, the matrixctrl object reverts to its default behavior in which clicking a cell increments its value. The message allows the use of the|
columns | int def.:8 |
Sets the number of columns in the matrixctrl object's display. | |
dialmode | int def.:0 |
Toggles causing the object to behave like a matrix of dials where a cell will need to be clicked and dragged on to change its value. | will allow cells within the matrix to react to a simple click.|
dialtracking | int def.:0 |
Sets whether or not the matrixctrl object will use vertical mouse tracking while it is in . | |
horizontalmargin | int def.:1 |
Sets a horizontal margin (in pixels) between the outermost cells and the edge of the matrixctrl object's bounding box. | |
horizontalspacing | int def.:0 |
Sets the horizontal distance (in pixels) between adjacent cells in the matrixctrl object. | |
imagemask | int def.:0 |
Specifies that the matrixctrl cell graphics file has additional rows of images for use as image masks. This attribute is present for legacy support - it has been superseded by the use of alpha channels in images. | |
inactiveimage | int def.:1 |
Specifies that the matrixctrl cell graphics file has additional rows of images for use in an inactive state (set with an message). | |
invisiblebkgnd | int def.:0 |
Specifies that the matrixctrl will be drawn without a background image, and its cells will be superimposed over any underlying Max objects. disables this feature. | |
one/column | int def.:0 |
Toggles only allowing one cell per column to have a non-zero state. Setting any cell in a column to a non-zero state causes any other non-zero cells to change to the zero state. | removes this constraint.|
one/matrix | int def.:0 |
Toggles only allowing one cell in the entire object to have a non-zero state. Setting any other cell in the matrix to a non-zero state causes any other non-zero cells to change to the zero state. | removes this constraint.|
one/row | int def.:0 |
Toggles only allowing one cell per row to have a non-zero state. Setting any cell in a row to a non-zero state causes any other non-zero cells to change to the zero state. | removes this constraint.|
range | int def.:2 |
Sets the number of possible states each cell can have. It must be set to a value of at least 2 (for states 0 and 1). | |
rows | int def.:4 |
Sets the number of rows in the matrixctrl object's display. | |
scale | int def.:1 |
Toggles scaling graphics when the matrixctrl object's display area is resized. | |
verticalmargin | int def.:1 |
Sets a vertical margin (in pixels) between the outermost cells and the edge of the matrixctrl object's bounding box. | |
verticalspacing | int def.:0 |
Sets the vertical distance (in pixels) between adjacent cells in the matrixctrl object. |
Name | Description |
---|---|
dial | Output numbers by moving a dial onscreen |
kslider | Output numbers from a keyboard onscreen |
pictctrl | Picture-based control |
pictslider | Picture-based slider control |
router | matrixctrl-compatible Max message router |
rslider | Display or change a range of numbers |
slider | Output numbers by moving a slider onscreen |
ubutton | Transparent button, sends a bang |
Max Basic Tutorial 21: Controlling Data Flow | Max Basic Tutorial 21: Controlling Data Flow |
Tutorial 26: MIDI Control of Video | Tutorial 26: MIDI Control of Video |