# MIDI to control

> Turn MIDI into six control lanes: pitch, gate, velocity, bend, pressure and one CC, with last-note priority.

Source: https://docs.tune.toys/nodes/midi.to-control/

MIDI to control turns MIDI into six control lanes: pitch, gate, velocity, bend, pressure and one controller, with last-note priority.

## What it does

The output has six labelled lanes: pitch, gate, velocity, bend, pressure and cc. Pitch maps Low note to 0 and High note to 1. Gate is 1 while a note is held. Velocity, bend, pressure and the lane for one controller number follow the incoming messages. The node is monophonic with last-note priority: the most recently pressed note that is still held wins. Channel selects which channel to listen to (0 means every channel) and Glide adds portamento to the pitch lane.

## When to use it

Use it to make a keyboard or controller drive control logic: scale the pitch lane into a filter cutoff range, use the gate with [Sample and hold](https://docs.tune.toys/nodes/ctl.hold/), or pull single lanes out with [Select lanes](https://docs.tune.toys/nodes/ctl.select/).

## Ports

<!-- ports:start -->

| Port      | Direction | Signal  | Lanes            |
| --------- | --------- | ------- | ---------------- |
| `midi`    | Input     | MIDI    | 16 MIDI channels |
| `control` | Output    | Control | 6                |

<!-- ports:end -->

## Parameters

<!-- parameters:start -->

| Parameter   | Label     | Range     | Default | Unit | Scale  | Notes                                            |
| ----------- | --------- | --------- | ------- | ---- | ------ | ------------------------------------------------ |
| `low_note`  | Low note  | 0 to 127  | 36      |      | linear | Note that maps to 0 on the pitch lane.           |
| `high_note` | High note | 0 to 127  | 96      |      | linear | Note that maps to 1 on the pitch lane.           |
| `cc`        | CC        | 0 to 127  | 1       |      | linear | Controller number followed by the cc lane.       |
| `channel`   | Channel   | 0 to 16   | 0       |      | linear | 0 listens to every channel; 1–16 listens to one. |
| `glide_ms`  | Glide     | 0 to 2000 | 0       | ms   | linear | Portamento on the pitch lane between notes.      |

<!-- parameters:end -->

### Low note (`low_note`) and High note (`high_note`)

The notes, 0 to 127, that map to 0 and 1 on the pitch lane. Notes outside the range go beyond 0 to 1.

### CC (`cc`)

The controller number, 0 to 127, followed by the cc lane. The default, 1, is the mod wheel.

### Channel (`channel`)

0 listens to every channel; 1 to 16 listens to one.

### Glide (`glide_ms`)

Portamento time on the pitch lane between notes, 0 to 2000 ms.

## Tips

- The lanes are labelled, so the editor can name them when you split the bundle.
- Because only one note is tracked, use [Polyphonic instrument](https://docs.tune.toys/nodes/std.poly/) for chords.

## See also

[Control to MIDI](https://docs.tune.toys/nodes/midi.from-control/), [Select lanes](https://docs.tune.toys/nodes/ctl.select/), [Scale](https://docs.tune.toys/nodes/ctl.scale/), [MIDI](https://docs.tune.toys/concepts/midi/).
