Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

repeat

Repeat a Video or Audio timeline.

Call shape

repeat<T: Video | Audio>(value: T, count: Integer) -> T

This is call-shape notation for lookup, not ClipAsm declaration syntax.

Graph inputs

NameTypeCardinality
valueTexactly one

Parameters and defaults

NameTypeRequirementDefault or omission behavior
countIntegerrequired

Result and stack behavior

Outputs: T.

All T inputs and outputs use one homogeneous type: Video or Audio. Use an explicit <Video> or <Audio> argument when the accessible stack makes inference ambiguous.

Default stack access is owned. See stack binding for ownership and visibility rules.

Timeline and markers

repeat(1) keeps value unchanged. Larger counts repeat its media. A marker cannot address an individual repeated occurrence.

Example

clipasm 1

config {
    video {
        fps = 30
    }
}

image("assets/card.png", 1s)
repeat(3)

Expected validation result: Video with exactly 90 project frames at the example’s explicit fps = 30.

The reference checks parse and compile this exact example. Compilation does not inspect the named media files.

Behavior

  • repeat(1) is a true identity and preserves nested timeline placements.
  • Larger counts create a new repeated timeline. Child placements are unavailable until ClipAsm supports occurrence indexing.

Requirements

  • count must be an Integer greater than or equal to one.

Common diagnostics

These are the diagnostics most specific to this program.

See also