# 通过 MIDI 遥控打开歌曲

SongBook+ 可以在 MIDI 接口上侦听 *BankSelect* 和 *ProgramChange* 命令，然后打开一个歌曲。这些命令通常用于选择乐器。

一个典型的应用是从 MIDI 风格中发送 *ProgramChange* 命令，从播放的 MIDI 文件中，或从键盘选择注册时发送。然后，SongBook+ 打开匹配的文本。（MIDI 风格可以在重复时不断发送相同的 *ProgramChange* 命令，而不会有问题）。

当 SongBook+ 接收到如在“编辑歌曲详情”窗口中设置的 *BankSelect* 和 *ProgramChange* 命令时，会打开一首歌曲。

请注意，SongBook+ 使用 0 到 127 的值。如果您的键盘使用 1 到 128 的值，您需要减去 1，以获得在 SongBook+ 中设置的值。

<figure><img src="/files/FNRXi4z6kQZYDP4jOgfz" alt=""><figcaption><p>通过 MIDI 打开歌曲</p></figcaption></figure>

<img src="/files/1VcYzo8aucANRZwWaSRb" alt="" data-size="line">使用这些设置，当一个 MIDI 设备发送选择乐器 16 的命令，在 Bank 1 / 5 上时，会打开歌曲。

<img src="/files/uCap4LBCwP0Vi5uKHYM1" alt="" data-size="line">按下这个按钮，如果您希望学习 MIDI 序列而不是通过旋钮来设置。

<img src="/files/XpAvp1deOqgC4tBraMKv" alt="" data-size="line">在 MIDI 监视器窗口中，您可以看到当接收到这些指令时的内容。

{% hint style="info" %}
请使用 SongBook+ 的内置 MIDI 监视器查看 MIDI 接口实际接收到的内容，以防歌曲并未如预期打开。
{% endhint %}

对于 Yamaha 和 Korg 的键盘，有更简单的方法。更多信息可在本章中找到：[简单键盘控制](/zhong-wen/readme/midi-features-verwenden/einfache-keyboardsteuerung.md)


---

# 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/song-ferngesteuert-uber-midi-offnen.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.
