accum Reference

Additive accumulator

accum

Examples

Arguments

reset [number]

Optional

A non-zero number will trigger the output to reset to 0 on the next input value

Inlets

x [number]

Values sent through the left inlet will be accumulated as long as the calculation is not reset.

reset [number]

A non-zero number will trigger the output to reset to 0 on the next input value

Outlets

out1 [number]

The accumulated output

Fixed Attributes

These attributes must be set in the object box and determine the behavior of the object at runtime.

hot [bool] (default: false)

Trigger computation on all inlets.

max [number]

Specifies the maximum value for the accumulated output.

min [number] (default: 0)

Specifies the minimum value for the accumulated output.

resetmode [enum] (default: post)

Specifies whether the count is reset before (pre) or after (post) the accumulation. Possible values:

0 = 'pre'
1 = 'post'

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

reset [number]

A non-zero number will trigger the output to reset to 0 on the next input value

x [number]

Values sent through the left inlet will be accumulated as long as the calculation is not reset.

See Also

Name Description
accum Store, add to, and multiply a number
accum~ Additive accumulator
mulequals Multiplicative accumulator
counter keep count based on input events
intnum
f Store a number, bang it out