Procedure Loop Counter

Returns the current loop index, total iteration count, and a start trigger for the enclosing procedure. Place this module inside a procedure's patch to know which iteration is currently being processed.

This module also works when placed inside a sub-patch nested within a procedure — it walks up the patch hierarchy to find the parent procedure's loop state.

Settings

out

Current loop index (integer), starting at 0. On the first iteration, out = 0; on the second, out = 1; and so on up to total - 1.

total

Total number of iterations as set by the procedure-call loop count parameter.

start

Sends a trigger (1) on the first iteration only (when out = 0), then 0 on all subsequent iterations. Useful for one-time initializations at the start of a procedure execution — for example, clearing an array before filling it in a loop.

Common errors

Out returns 0 outside a procedure If this module is placed in a regular patch (not inside a procedure), all outputs stay at 0. The module does not produce an error, but the values are meaningless. Always place it inside a procedure patch or a sub-patch nested within one.

Out is zero-based The loop index starts at 0, not 1. For a loop count of 10, out goes from 0 to 9. If you use out as an array index this is usually what you want, but if you display it to the user or use it as a 1-based counter, add 1.

Common Settings

info

show manual

Opens the web browser to display information or help about the selected object, if it exists.

For more details about information/help creation, see create-help-file.

description

Description of the module for internal help purposes only. The description is not displayed in the interface.

ID's

visible only in god mode, see setup-panel-tab-expert.

unique ID

Current private ID for this control used to identify the object.

preset ID

Current private preset ID for this control used for presets.

recreate ID

If you experience difficulties in Polyphonic mode, try to recreate new id(s) with this button.

repair ID s

Each Patch shared on the local network uses its own ID (identification number). If you experience issues of Patches that don't send information to the good target, this button will rebuild all these id's.

Object Remote Address

absolute

Absolute remote address. see objects-address.

local

Local to the current patch remote address. see objects-address.

user addr

User defined remote address. see objects-address.

See also

version 7.0.250121

Edit All Pages