# MIDI controllers

Source: https://docs.lightair.app/desktop/control-and-automate/midi

> Map a MIDI controller's faders, knobs, buttons and pads to track volume, mutes, scenes, soundboard pads and shortcut actions, with lights following back.

In short:
- Open **Settings › MIDI**, click **Learn a control**, then move a fader or press a button on your controller.
- Choose what the control does: a track's volume or mute, a scene, a soundboard pad, or any shortcut action.
- Motor faders move and buttons light up with Lightair: a fader follows its track, a mute button lights while muted, a scene button while on air.
- Mappings belong to this computer, not to the workspace.

In the app: Settings › MIDI

Any MIDI controller your computer sees can drive Lightair: a fader box, a pad controller or a
keyboard. Plug it in before you start; Lightair looks for MIDI devices every couple of seconds
while it has mappings or is learning one.

## Map a control

1. Open **Settings** (`⌘,` or `Ctrl+,` on Windows) and choose **MIDI**.
2. Click **Learn a control**. The button says **Move a control on your device…**.
3. Move a fader or knob, or press a button or pad, on your controller.
4. The control appears in the **Controls** list, named by its device, its kind and number and its
   channel, for example **nanoKONTROL2 · CC 0 (channel 1)**.
5. Click **Choose what it does…** on its row and pick an action.

Learning stops after the first control it hears. Click **Learn a control** again for the next one.
A control that's already in the list isn't added twice.

To remove a mapping, click its trash button.

## What a control can do

The menu lists everything in the open workspace:

| Choice | What the control does |
|---|---|
| **Volume ·** a track | Sets the track's fader. The control's whole travel covers the fader's range. Best on a fader or a knob. |
| **Mute ·** a track | Mutes or unmutes the track, each time you press it. |
| **Scene ·** a scene | Puts the scene on air when you press it. |
| **Pad ·** a soundboard pad | Plays the pad ([Soundboard](/desktop/audio/soundboard)). Only shown when the soundboard has pads. |
| A shortcut action | Any action from [Global shortcuts](/desktop/control-and-automate/shortcuts): **Start or stop recording**, **Go live or end**, **Save clip**, **Add marker**, **Mute or unmute microphones** and the rest. Acts on a press. |

Buttons and pads act when pressed, not when let go. A fader move counts as one change for undo,
however long you move it.

If you delete a track, scene or pad a control was mapped to, the control shows **(gone)**: choose
something else for it.

## Lights and motor faders

Lightair sends the state back to the controller, to the output port with the same name as the
input:

- A control mapped to **Volume** gets the fader's place, so motor faders move when you change the
  fader in Lightair.
- A **Mute** control lights while the track is muted.
- A **Scene** control lights while its scene is on air.

Controllers without lights or motors ignore this.

## Mappings are per computer

Mappings are kept in this computer's preferences, with its devices, not in the workspace. Opening
another workspace keeps them, but a control mapped to a track, scene or pad from the other
workspace shows **(gone)** until you choose again.

## MIDI in automations

To make a MIDI control do more than one thing, or something not in the list above, use an
automation with the trigger **A MIDI pad or key** or **A MIDI knob or fader**. See
[Automations](/desktop/control-and-automate/automations).

## Related

- [Global shortcuts](/desktop/control-and-automate/shortcuts)
- [Automations](/desktop/control-and-automate/automations)
- [Audio mixer](/desktop/audio/mixer)
