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
| Name | Type | Cardinality |
|---|---|---|
value | T | exactly one |
Parameters and defaults
| Name | Type | Requirement | Default or omission behavior |
|---|---|---|---|
count | Integer | required | — |
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.
E_INVALID_REPEAT_COUNT— Invalid repeat count