incdec Reference

Increment and decrement a value

incdec

Description

Increment or Decrement a value. When connected to a number box, Click the upper half of the object to increment, click the lower half to decrement.

Examples

incdec works well in combination with number box and slider

Arguments

None.

Attributes

bgcolor [4 floats]

Background Color

elementcolor [4 floats]7.0.0

Arrow Color

fgcolor [4 floats]

Highlighted Arrow

increment [float] (default: 1.)

Sets the step size for increment/decrement.

parameter_enable [int]

Enables use of this object with Max for Live Parameters and allows for setting initial parameter values in the Max environment.

parameter_mappable [int] (default: 1)

When parameter_mappable is enabled, the object will be available for mapping to keyboard or MIDI input using the Mappings feature.

style [symbol] (default: )7.0.0

Sets the style to be applied to the object. Styles can be set using the Format palette.

Common Box Attributes

Parameter Attributes

Messages

bang

bang message causes the incdec object to output the currently stored value.

int

Arguments

input [int]
A number sent to the incdec object's inlet sets the value that will be incremented or decremented by clicking on the top or bottom of half of the object. The number is not sent out the outlet. incdec is designed to be used with user interface objects such as the number box, dial, and the various sliders.

float

Arguments

input [float]
A floating-point number sent to the incdec object's inlet sets the value that will be incremented or decremented by clicking on the top or bottom of half of the object. The number is not sent out the outlet. incdec is designed to be used with user interface objects such as the number box, dial, and the various sliders.

dec

The dec message can be used to decrement and output the stored value.

inc

The inc message can be used to increment and output the stored value.

(mouse)

A mouse click increments or decrements the stored value (depending on which arrow is clicked) and sends it out the outlet.

set

Arguments

input [int]
The word set followed by an integer value functions identically to the int message, and is provided for convenience.

Output

int

When you click on the top half of an incdec object, it sends out a value that is one greater than the last value received at its inlet or sent out its outlet, whichever happened most recently. Holding the mouse button down continues to increment the output, gradually increasing in rate of output.

The same is true for the bottom half of the incdec object , except that the values are decremented.

See Also

Name Description
number
umenu
slider