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

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

NameTypeCardinality
timelineTexactly one

Parameters and defaults

NameTypeRequirementDefault or omission behavior
rangeTimeRangerequired

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:

  • T from the range selected from timeline by range

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 $timeline reference.
  • 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 replacement name 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> or during<Audio> when a mixed stack makes the generic type ambiguous.

Common diagnostics

These are the diagnostics most specific to this program.

See also