# MIDI Device with Bitfocus Companion

![Connnecting one or multiple MIDI devices to Bitfocus Companion](/files/-MVvYtpnlbdanGXsPRDe)

## 1. Add Companion element to ShowCockpit <a href="#id-1-add-an-onyx-element" id="id-1-add-an-onyx-element"></a>

On the **Elements** section, click the **Add** button to add an Companion element to the project:

* **Other > Bitfocus > Companion**

![](/files/-MVgy77TljLddTNWUI2x)

### Review the element options <a href="#enable-the-element" id="enable-the-element"></a>

Check the Companion application for the IP address and the port.

![](/files/-MVgzAH0F4-Aftt1y7Ob)

They both should match on the element options, **even if both applications are running within the same computer**.

![](/files/-MVgygX5g6ceSzpipt3r)

### Enable the Element <a href="#enable-the-element" id="enable-the-element"></a>

Click the toggle button on the element to enable it.

![](/files/-MVgzKuOakVgUUn17gPd)

## 2. Add MIDI device element  <a href="#id-2-add-midi-device-element" id="id-2-add-midi-device-element"></a>

Use the **Add** button again to add your MIDI device element through **External Control > MIDI**. Currently, ShowCockpit has out-of-the-box support for multiple MIDI devices - [check out the complete compatibility list here](https://showcockpit.com/site/docs/).

If your device is not listed, you will need to use the **Generic MIDI** driver and map your device controls manually.

When using a specific MIDI device driver, you can skip to Step 4.

### Set Element Options <a href="#set-element-options" id="set-element-options"></a>

&#x20;After adding the element, make sure that the correct device is selected under both Input Device and Output Device options.

### Enable the Element <a href="#enable-the-element-1" id="enable-the-element-1"></a>

Finally, click the toggle button on the MIDI device element to enable it.

## 3. Learn MIDI Controls (Generic MIDI only) <a href="#id-3-learn-midi-controls-generic-midi-only" id="id-3-learn-midi-controls-generic-midi-only"></a>

In case you selected the **Generic MIDI** driver, now you need to "teach" this driver what controls (faders, buttons and encoders) your device has. For the officially supported MIDI devices, controls are automatically mapped, so you can skip to the next step.

Double-click the **Generic MIDI** element to open its window - you will start by mapping the **Faders**. Click on **Enable Learn** on the top-right to start listening to MIDI input.

![](/files/-Lub1GCEgZ2P2gLob46Z)

* Move, one-by-one, all **Faders** on your MIDI device. They will be added to the **Faders** list.
* To map the **Buttons**, click on **Buttons** (above the table) and repeat the procedure now for all your device buttons.
* Finally, map your **Encoders** by clicking on **Encoders** and repeat the procedure for all the encoders.

You can now close the **Generic MIDI** window by clicking **Back to Elements** or clicking on any menu button.

## 4. Mapping <a href="#id-4-mapping" id="id-4-mapping"></a>

To start mapping the MIDI element to Companion buttons, drag a new connection from the output (right side) of the MIDI element to the input (left side) of the Companion element.

![](/files/-MVh-1b9pTy8KlInJLe9)

This will bring you to the **Mapping** section. This section is divided into 3 columns, from left to right:

* Functions
* Parameters
* Controls

On the left, you should have the **Companion** element selected on the Functions column and you should be able to select a function (for example, "**Button Control**"). When you select the function, the function button will be highlighted and the second column will have the parameters for the function. In this case, you can **select which button you want to control and from which page**.

![Example mapping button 2 of the first Companion page](/files/-MVh-iNpPuVjahdHx1c2)

On the right side (Controls column), you should have your MIDI device element. Open the Buttons list and click on one of the buttons to assign the function.

If you now press the mapped button, you should see the function being triggered in **Companion**, acting exactly as if you pressed a button in the Elgato StreamDeck.

Repeat the process for all desired buttons.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://academy.showcockpit.com/showcockpit-for-windows/tutorials/integration/control-companion-with-a-midi-device.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
