-@node Creating MIDI files
-@subsection Creating MIDI files
-
-@cindex MIDI block
-To create a MIDI output file from a LilyPond file, insert a @code{\midi}
-block inside a @code{\score} block;
-
-@example
-\score @{
- @var{@dots{}music@dots{}}
- \layout @{ @}
- \midi @{ @}
-@}
-@end example
-
-If there is @emph{only} a @code{\midi} block in a @code{\score} (i.e.
-without any @code{\layout} block), then @emph{only} MIDI output will be
-produced. No musical notation will be typeset.
-
-@example
-\score @{
- @var{@dots{}music@dots{}}
- \midi @{ @}
-@}
-@end example
-
-Dynamics, pitches, rhythms, tempo changes and ties are all interpreted
-and translated correctly. Dynamic @q{marks} translate into volume
-levels with a @q{fixed fraction} of the available MIDI volume range;
-crescendi and decrescendi make the volume vary linearly between their
-two extremes.
-
-All @code{\tempo} indications, including all subsequent tempo changes,
-specified within the music notation will be reflected in the MIDI
-output.
-
-Usually it is enough to leave the @code{\midi} block empty, but it can
-contain context rearrangements, new context definitions or code to set
-the values of properties. Here the tempo is set to 72 quarter-note
-beats per minute, but @emph{only} for the MIDI's audio playback.
-
-@example
-\score @{
- @var{@dots{}music@dots{}}
- \midi @{
- \tempo 4 = 72
- @}
-@}
-@end example
-
-Note that @code{\tempo} is actually a command for setting properties
-during the interpretation of the music and in the context of output
-definitions, like a @code{\midi} block, is reinterpreted as if it were a
-context modification.
-
-@cindex MIDI context definitions
-
-Context definitions follow the same syntax as those in a @code{\layout}
-block;
-
-@example
-\score @{
- @var{@dots{}music@dots{}}
- \midi @{
- \context @{
- \Voice
- \remove "Dynamic_performer"
- @}
- @}
-@}
-@end example
-
-removes the effect of dynamics from the MIDI output. Translation
-modules for sound are called @q{performers}.
-
-@snippets
-@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{changing-midi-output-to-one-channel-per-voice.ly}
-
-@seealso
-Learning Manual:
-@rlearning{Other sources of information}.
-
-Notation Reference:
-@ref{Expressive marks},
-@ref{Score layout}.
-
-Installed Files:
-@file{ly/performer-init.ly}.
-
-Snippets:
-@rlsr{MIDI}.
-
-Internals Reference:
-@rinternals{Dynamic_performer}.
-
-@knownissues
-Some operating systems require a @emph{specific} file extension for MIDI
-files. If a different extension is preferred insert the following line
-at the top-level of the input file, before the start of any
-@code{\book}, @code{\bookpart} or @code{\score} blocks;
-
-@example
-#(ly:set-option 'midi-extension "mid")
-@end example
-
-This will set the default extension for MIDI files to @code{.mid}.
-
-Alternatively, an option can be supplied on the command line:
-
-@example
-lilypond -dmidi-extension=mid MyFile.ly
-@end example
-
-Changes in the MIDI volume take place only on starting a note, so
-crescendi and decrescendi cannot affect the volume of a single note.
-
-Some MIDI players may not always correctly handle tempo changes in the
-midi output.
-
-Changes to @code{midiInstrument} (and other MIDI options) at the
-beginning of a staff may appear twice in the MIDI output.
-
-
-@node MIDI Instruments
-@subsection MIDI Instruments
-
-@cindex instrument names
-@cindex MIDI, instruments
-@funindex Staff.midiInstrument
-
-The MIDI instrument to be used is specified by setting the
-@code{Staff.midiInstrument} property to the instrument name. The name
-should be chosen from the list in @ref{MIDI instruments}.
-
-@example
-\new Staff @{
- \set Staff.midiInstrument = #"glockenspiel"
- @var{@dots{}notes@dots{}}
-@}
-@end example
-
-@example
-\new Staff \with @{midiInstrument = #"cello"@} @{
- @var{@dots{}notes@dots{}}
-@}
-@end example
-
-If the selected instrument does not exactly match an instrument from
-the list of MIDI instruments, the Grand Piano (@code{"acoustic grand"})
-instrument is used.
-
-@seealso
-Notation Reference:
-@ref{MIDI instruments}.
-
-Internals Reference:
-@rinternals{Dynamic_performer}.
-