3.5.3 The MIDI block

To create a MIDI output file from a LilyPond input file, insert a \midi block, which can be empty, within the \score block;

\score {
  … music …
  \layout { }
  \midi { }
}

Nota: A \score block that, as well as the music, contains only a \midi block (i.e. without the \layout block), will only produce MIDI output files. No notation will be printed.

The default output file extension (.midi) can be changed by using the -dmidi-extension option with the lilypond command:

lilypond -dmidi-extension=mid MyFile.ly

Alternatively, add the following Scheme expression before the start of either the \book, \bookpart or \score blocks. See File structure.

#(ly:set-option 'midi-extension "mid")

Vedi anche

Notation Reference: File structure.

Installed Files: ‘scm/midi.scm’.

Problemi noti e avvertimenti

There are fifteen MIDI channels available and one additional channel (#10) for drums. Staves are assigned to channels in sequence, so a score that contains more than fifteen staves will result in the extra staves sharing (but not overwriting) the same MIDI channel. This may be a problem if the sharing staves have conflicting, channel-based, MIDI properties – such as different MIDI instruments – set.


Altre lingue: English, français.
About automatic language selection.

LilyPond — Guida alla Notazione v2.19.24 (ramo di sviluppo).