> For the complete documentation index, see [llms.txt](https://docs.songbookplus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.songbookplus.com/portugues/readme/midi-features-verwenden/midi-befehle-beim-schliessen-von-songs.md).

# Comandos MIDI ao fechar músicas

## Enviar MIDI Stop quando uma música é interrompida <a href="#toc165549817" id="toc165549817"></a>

Nas configurações do SongBook+, você pode configurar se um MIDI Stop deve ser enviado ao parar uma música.

## Enviar comandos MIDI configuráveis adicionais <a href="#toc165549818" id="toc165549818"></a>

Com o botão "Ações na parada" na janela de edição da música, você pode definir qualquer comando MIDI que será enviado ao parar a música.

Para uma descrição, consulte [Comandos MIDI ao abrir músicas](/portugues/readme/midi-features-verwenden/midi-befehle-beim-offnen-von-songs.md).

## Enviar os mesmos comandos MIDI para todas as músicas <a href="#toc165549819" id="toc165549819"></a>

Nas configurações MIDI em "MIDI" -> "Macros MIDI" -> "Macros ao tocar canções", você pode selecionar um macro MIDI previamente definido, que será então enviado sempre que qualquer música for parada. Também pode ser determinado se ele será enviado mesmo quando a música já possuir suas próprias "Ações na parada".

Para uma descrição, consulte [Comandos MIDI ao abrir músicas](/portugues/readme/midi-features-verwenden/midi-befehle-beim-offnen-von-songs.md).

## Enviar o conteúdo de um arquivo MIDI quando uma música é interrompida <a href="#toc165549816" id="toc165549816"></a>

O SongBook envia o conteúdo de um arquivo MIDI assim que uma música é **interrompida**, se existir um arquivo .mid com o mesmo nome que o arquivo .pdf, expandido com "\_stop.mid".

(por exemplo, MySong.pdf -> MySong\_stop.mid)

Somente arquivos MIDI do tipo 0 (pista única) são permitidos. Todos os comandos são enviados de uma só vez sem considerar o tempo. Assim, nenhuma música pode ser enviada, apenas comandos para configurar o ambiente.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.songbookplus.com/portugues/readme/midi-features-verwenden/midi-befehle-beim-schliessen-von-songs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
