# MIDI-Makros

MIDI-Makros 是 SongBook+ 非常强大的 MIDI 功能。

您可以定义一组 MIDI 命令序列，并在 SongBook+ 的许多不同位置使用：

* 作为脚踏板设置的动作
* 作为手势控制的动作
* 作为功能按钮中的动作
* 作为 MIDI-Makro 中的动作（嵌套宏）
* 作为歌曲中在打开/启动/停止/关闭时的动作
* 作为打开/启动/停止/关闭歌曲时的全局动作
* 标记为收藏的宏会出现在工具栏中的 MIDI 按钮上

这样，可以定义一些常用的 MIDI 序列，比如打开或关闭某些效果，并在许多歌曲中使用，而不是每次都输入相同的序列。这也有一个好处，如果需要稍后对序列进行调整，只需在一个中心位置进行更改。

<figure><img src="/files/4ceLgSumupwlaiKO8oJT" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**提示：**

在 MIDI 脚踏板设置的动作中使用 MIDI-Makro，可以使 SongBook+ 对一个可配置的 MIDI 命令做出响应并发送其他 MIDI 命令。

这样，它可以作为一个翻译器，对来自键盘的 MIDI 命令做出反应，并在其他支持 MIDI 的设备中触发某些操作。
{% endhint %}

{% hint style="info" %}
**提示：**

如果您将包含 MIDI-Makros 的歌曲（在打开或功能按钮中的动作）作为 .sbk 文件导出，所使用的 MIDI-Makros 也会被导出到 .sbk 文件中，这样在其他设备上导入该 .sbk 文件后，这些 Makros 也会存在。

通过这种方式，可以将 MIDI-Makros 从一个设备传输到另一个设备，方法是创建一个歌曲，然后将宏插入“启动时的动作”或功能按钮中，并导出该歌曲。

如果导入 .sbk 文件的设备上已存在相同名称但不同内容的宏，则会询问是否要替换现有的宏。
{% 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/zhong-wen/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.
