during
Replace a selected timeline range with the result of a body.
Call shape
during<T: Video | Audio>(timeline: T, range: TimeRange) { ... } -> T
This is call-shape notation for lookup, not ClipAsm declaration syntax.
Graph inputs
| Name | Type | Cardinality |
|---|---|---|
timeline | T | exactly one |
Parameters and defaults
| Name | Type | Requirement | Default or omission behavior |
|---|---|---|---|
range | TimeRange | 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 visible. See stack binding for ownership and visibility rules.
Body
The body begins with:
Tfrom the range selected fromtimelinebyrange
The body must leave exactly T.
Timeline and markers
The program replaces the selected range in timeline and shifts later markers. It names the inserted result replacement.
Example
clipasm 1
config {
video {
fps = 30
}
}
image("assets/card.png", 3s)
during(1s..2s) {
zoom_in(4%)
}
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
- The body starts with the selected range.
- The body exposes the complete bound input as the lexical
$timelinereference. - The body must return exactly one matching value. ClipAsm inserts that value into the original timeline.
- ClipAsm preserves or shifts placements before and after the range.
- ClipAsm omits intersecting or uncertain placements. The
replacementname identifies the inserted body. - A Video selection supplies its requested extent when the author omits the image call’s
duration.
Requirements
- The range must be native-grid aligned, within the bound timeline, and owned by that timeline.
- Use
during<Video>orduring<Audio>when a mixed stack makes the generic type ambiguous.
Common diagnostics
These are the diagnostics most specific to this program.
E_BODY_OUTPUT_COUNT— Wrong body output count