# MIDI Macros

MIDI macros are a very powerful MIDI feature of SongBook+.

They allow you to define a sequence of MIDI commands, which can then be used in many different places within SongBook+:

* As an action with foot pedal settings
* As an action with gesture control
* As an action in function buttons
* As an action in a MIDI macro (nesting macros)
* As an action in songs upon opening/starting/stopping/closing
* As a global action when opening/starting/stopping/closing songs
* Macros marked as favorites appear in the MIDI button in the toolbar

This allows you to define often-used MIDI sequences, for example, to turn certain effects on or off once, and then use them across many songs instead of entering the same sequence everywhere. This also has the advantage that you can later adjust this sequence centrally in one place.

<figure><img src="/files/gxtODNpIp7XnnLgY97MI" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Tip:**

With a MIDI macro as an action in the settings of the MIDI foot pedal, it is even possible for SongBook+ to respond to a configurable MIDI command and consequently send out other MIDI commands.

For example, it could act as a translator, responding to a MIDI command from the keyboard and then triggering something on another MIDI-capable device.
{% endhint %}

{% hint style="info" %}
**Tip:**

If you export a song that contains MIDI macros (in actions upon opening or in function buttons) as a .sbk file, the MIDI macros used in it will also be exported into this .sbk file, so that the macros are also available after importing this .sbk file on the other device.

In this way, you can intentionally transfer MIDI macros from one device to another by creating a song, then inserting the macros, for example, in "actions upon starting" or in a function button, and then exporting this song.

If there are already macros with the same name but different content on the device where the .sbk file is imported, you will be asked whether the existing macros should be replaced or not.
{% endhint %}


---

# 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://docs.songbookplus.com/english/readme/midi-features-verwenden/midi-makros.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.
