# Sample and hold

> Capture the input lanes whenever the trigger lane rises and hold them until the next trigger.

Source: https://docs.tune.toys/nodes/ctl.hold/

Sample and hold captures the input lanes whenever the trigger lane rises and holds them until the next trigger.

## What it does

Between triggers the output is frozen at the last captured value. Each rising edge on the trigger lane takes a fresh snapshot of every lane of the control input. The trigger is a single lane; a narrower control input is broadcast. The node has no parameters.

## When to use it

Use it to turn a continuous source into stepped values, for example a sweeping LFO sampled by a clock, or to freeze a sensor reading on an event. A trigger can come from [Compare](https://docs.tune.toys/nodes/std.compare/) or a square [Control LFO](https://docs.tune.toys/nodes/ctl.lfo/).

## Ports

<!-- ports:start -->

| Port      | Direction | Signal  | Lanes                   |
| --------- | --------- | ------- | ----------------------- |
| `control` | Input     | Control | Inferred from the cable |
| `trigger` | Input     | Control | 1                       |
| `control` | Output    | Control | Inferred from the cable |

<!-- ports:end -->

## Parameters

<!-- parameters:start -->

This node has no numeric parameters.

<!-- parameters:end -->

## Tips

- Sample a fast saw LFO with a slower clock for stepped, pseudo-random values.
- Hold keeps the value indefinitely; a missing trigger means the output never updates.

## See also

[Compare](https://docs.tune.toys/nodes/std.compare/), [Counter](https://docs.tune.toys/nodes/ctl.counter/), [Control LFO](https://docs.tune.toys/nodes/ctl.lfo/), [Cables](https://docs.tune.toys/concepts/cables/).
