DCode

Covers Engine 2.0.0

loop

Define a lightweight repeated automation loop in DCode.

Syntax

loop <name> <frequency_hz>:

Available in

  • File scope

Native C++

Compiled as a CAESAR-managed task callback. Native loops appear in task runtime metadata; the Lua backend uses the threaded-loop runtime.

Lifecycle

Activation starts a named repeated body at the requested frequency under a CAESAR loop controller.

Persistence

Values stored in state remain available between iterations while the loop is loaded.

Reload behavior

DARTWIC tracks changes to the block when loading the loop.

Runtime sections

  • loop body

Example

loop name 10:
    local current = |channel|