A newer version of Max is available. Click here to access the latest version of this document.

dial

Output numbers by moving a dial onscreen

Description

dial works like a circular slider which outputs numbers according to its degree of rotation. dial can be set with a certain range, offset, multiplier, as well as numerous visual settings.

Arguments

None.

Messages

bang Sends out the number currently stored in dial.
int input [int]
The number received in the inlet is displayed graphically by dial, and is passed out its outlet. Optionally, dial can multiply the number by some amount and add an offset to it before sending it out the outlet.

The dial will also send out numbers in response to clicking or dragging on it directly with the mouse.
float input [float]
Converted to int.
(mouse) The dial object will send out numbers in response to clicking or dragging on it directly with the mouse.
set input [int]
The word set, followed by a number, changes the displayed value of the dial, without triggering output.
setminmax low-and-high-values [list]
The word setminmax, followed by two numbers, sets the low and high range values for the dial object. If the number list consists of floating point values, the floatoutput attribute will automatically be set.
resize input [int]
The word resize, followed by a number, changes the size of the dial dial object in pixels.

Attributes

Name Type g/s Description
bgcolor float Sets the background color of the dial in RGBA format.
clip int
def.:1
Causes the dial object's vertical mouse tracking to operate with or without clipping within the specified output range. Clipping is enabled with a non-zero (the default) or disabled with a zero.
degrees int
def.:270
Sets the limits of dial object's rotation.
fgcolor float Sets the foreground color of the dial in RGBA format.
floatoutput int
def.:0
Toggles floating-point output from the dial object. The default is 0 (off).
min float
def.:0.
Sets a value that will be added to the dial object's value before it is sent out the outlet. The default is 0.
mult float
def.:1.
Sets a multiplier value for the dial object. The object's value will be multiplied by this number before it is sent out the outlet. The multiplication happens before the addition of the Offset value.
needlecolor float Sets the needle color of the dial in RGBA format.
outlinecolor float Sets the outline color of the dial in RGBA format.
size float
def.:128.
Sets the range of the dial object. The default value is 128. Setting the size to 1 disables the dial visually (since it can only display one value). Any specified size less than 1 will be set to 2.
vtracking int
def.:1
Selects the mouse tracking mode.
0 circular: Causes the dial to use circular tracking. Moving the mouse clockwise in a circular arc relative to the control's center increases the control’s value, and moving it counterclockwise decreases its value.
1 vertical: (the default) Causes the dial to use vertical tracking. Moving the mouse up increases the object’s value, and moving it down decreases the value.

Information for box attributes common to all objects

Menu Items

Name Description
Color Choosing the Color... menu item from the Object menu when the object is selected opens a color picker, permitting adjustment to the appearance of the dial object.

Output

int: Numbers received in the inlet, or produced by clicking or dragging on dial with the mouse, are first multiplied by the multiplier, then have the offset added to them, then are sent out the outlet.

Examples

Produce output by dragging onscreen... or use to display numbers passing through

See Also

Name Description
pictctrl Picture-based control
pictslider Picture-based slider control
rslider Display or change a range of numbers
slider Output numbers by moving a slider onscreen
Max Basic Tutorial 7: Numerical User Interfaces Max Basic Tutorial 7: Numerical User Interfaces