# 关闭乐曲时的 MIDI 命令

## 当乐曲停止时发送 MIDI 停止命令 <a href="#toc165549817" id="toc165549817"></a>

在 SongBook+ 设置中，您可以配置是否在停止某个乐曲时发送 MIDI 停止命令。

## 发送其他可配置的 MIDI 命令 <a href="#toc165549818" id="toc165549818"></a>

在乐曲的编辑窗口中，通过“停止时的操作”按钮，您可以定义在停止乐曲时发送的任意 MIDI 命令。

详细描述请参阅 [打开歌曲时的 MIDI 指令](/zhong-wen/readme/midi-features-verwenden/midi-befehle-beim-offnen-von-songs.md)。

## 对所有乐曲发送相同的 MIDI 命令 <a href="#toc165549819" id="toc165549819"></a>

在“设置” -> “MIDI” -> “MIDI宏” -> “操作乐曲时的宏”中，您可以选择一个预先定义的 MIDI 宏，以便在停止每个乐曲时发送。此外，还可以设置即使乐曲已含有自己的“停止时的操作”，是否仍然发送此宏。

详细描述请参阅 [打开歌曲时的 MIDI 指令](/zhong-wen/readme/midi-features-verwenden/midi-befehle-beim-offnen-von-songs.md)。

## 当乐曲停止时发送 MIDI 文件的内容 <a href="#toc165549816" id="toc165549816"></a>

当某个乐曲**停止**时，如果存在与该 .pdf 文件同名并扩展为“\_stop.mid”的 .mid 文件，SongBook 将发送该 MIDI 文件的内容。

（例如：MySong.pdf -> MySong\_stop.mid）

仅允许使用类型 0（单轨）的 MIDI 文件。所有命令将一次性发送而不考虑时间，因此不能发送音乐，只能发送用于配置环境的命令。


---

# 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-befehle-beim-schliessen-von-songs.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.
