clipasm 0.5.0

A strict, typed language for compiling and rendering Video and Audio graphs
Documentation
<!-- Generated by clipasm-reference-docs. Do not edit directly. -->

# repeat

Repeat a Video or Audio timeline.

## Call shape

```text
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](../language/stack-binding.md) for ownership and visibility rules.

## Timeline and markers

`repeat(1)` keeps `value` unchanged. Larger counts repeat its media, but the individual repeated occurrences are not addressable by marker.

## Example

```clipasm
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`.

This exact example is parsed and compiled by the reference checks; compilation does not inspect the named media files.

## Behavior

- repeat(1) is a true identity and preserves nested timeline placements.
- Larger counts create a fresh repeated timeline; child placements are unavailable until occurrence indexing exists.

## 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`]https://nikitamgrimm.github.io/clipasm/diagnostics/#e_invalid_repeat_count — Invalid repeat count

## See also

- [`concat`]concat.md
- [Statements and calls]../language/statements-and-calls.md
- [Stack binding]../language/stack-binding.md