clipasm 0.3.2

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

# join

Transform and concatenate two Video or Audio timelines in a body.

## Call shape

```text
join<T: Video | Audio>(before: T, after: T) { ... } -> T
```

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

## Graph inputs

| Name | Type | Cardinality |
| --- | --- | --- |
| `before` | `T` | exactly one |
| `after` | `T` | exactly one |

## Parameters and defaults

This program has no scalar parameters.

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

## Body

The body begins with:

- `T` from the complete `before` input
- `T` from the complete `after` input

The body must leave at least 1 homogeneous `T` value(s).

## Timeline and markers

Starts the body with `before` and `after` and joins the matching values left by the body.

## Example

```clipasm
clipasm 1

config {
    video {
        fps = 30
    }
}

image("assets/before.png", 1s)
image("assets/after.png", 1s)
join {
    zoom_in(4%)
}
```

Expected validation result: `Video` with exactly 60 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

- The body starts with before followed by after and exposes them as lexical $before and $after references.
- Every homogeneous value left by the body is concatenated in stack order into one output timeline.
- Named values created by the body remain addressable as placements in the result.

## Requirements

- The body must leave at least one value of the selected homogeneous Video or Audio type.

## Common diagnostics

These are the diagnostics most specific to this program.

- [`E_EMPTY_JOIN`]https://nikitamgrimm.github.io/clipasm/diagnostics/#e_empty_join — Empty join result

## See also

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