# Gestures

> Recognise seven hand gestures into one gate lane each, with confidence and presence.

Source: https://docs.tune.toys/nodes/sense.gesture/

Gestures recognises seven hand gestures and gives each one a gate lane.

## What it does

Connect a video source to `video`. The `control` output has 9 lanes from 0 to 1, in order: closed_fist, open_palm, pointing_up, thumb_down, thumb_up, victory, love, confidence, present. Each gesture lane is a gate. It runs a MediaPipe model in the browser. The model downloads after the person consents, with its size shown first, and is cached afterwards. Nothing is uploaded. When tracking is lost the lanes hold their last values and `present` falls to 0 after 220 ms.

## When to use it

Use it for switches and triggers made with a hand sign. See [Sensing](https://docs.tune.toys/concepts/sensing/).

## Ports

<!-- ports:start -->

| Port      | Direction | Signal  | Lanes |
| --------- | --------- | ------- | ----- |
| `video`   | Input     | Video   | 1     |
| `control` | Output    | Control | 9     |

<!-- ports:end -->

## Parameters

<!-- parameters:start -->

| Parameter | Label      | Range     | Default | Unit | Scale  | Notes                                                |
| --------- | ---------- | --------- | ------- | ---- | ------ | ---------------------------------------------------- |
| `sure`    | Confidence | 0.3 to 1  | 0.75    |      | linear | Minimum confidence before a gesture lane goes high.  |
| `hold_ms` | Hold       | 0 to 2000 | 120     | ms   | linear | How long a gesture must persist before it registers. |
| `smooth`  | Smooth     | 0 to 1000 | 0       | ms   | linear | One-pole smoothing of the confidence lane.           |

<!-- parameters:end -->

### Confidence (`sure`)

Minimum confidence, from 0.3 to 1, before a gesture opens its gate.

### Hold (`hold_ms`)

Keeps a gate open this many milliseconds after the gesture ends.

### Smooth (`smooth`)

Smoothing time in milliseconds for the lanes.

## Tips

- Use [Select lanes](https://docs.tune.toys/nodes/ctl.select/) with `"audio": {"channels": 1, "firstChannel": N}` to pick one lane; lanes count from 1.
- A one-lane control cable can drive any parameter through its `{ "node": "x", "port": "@param" }` socket.

## See also

[Select lanes](https://docs.tune.toys/nodes/ctl.select/), [Scale](https://docs.tune.toys/nodes/ctl.scale/), [Smooth](https://docs.tune.toys/nodes/ctl.smooth/), [Sensing](https://docs.tune.toys/concepts/sensing/), [Control lanes](https://docs.tune.toys/concepts/control-lanes/).
