Some common problems when typesetting with Lilypond

Here is a list of common tasks when writing songs and how to solve them.

Notes with lyrics
Setting simple songs is among the first tasks you learn when you read the LilyPond Learning Manual (p.28 ff.). Of course Lilypond knows how to align lyrics to the melody (p.29), including syllables sung to more than one note (mellisma), hyphens between syllables (p.31), and more than one syllable to a single note (p.32).
Notes without lyrics
What I didn't find in the Learning Manual, is how to set notes without lyrics (or "empty lyrics"). I tried empty strings ("") but that lead to error messages:
  programming error: cannot align on self: empty element
To get rid of this, I put a space between the quotation marks (" "). This works. It is used in If you're happy and you know it.
Note chords (harmonies) along with the melody
This is covered in LilyPond Learning Manual p.142
Setting MIDI instruments for melody and chords
There is a hint in LilyPond Learning Manual p.168 to setting the melody instrument:
  set Staff.midiInstrument = #"accordion"
but setting the chords instrument is nowhere mentioned explicitly:
  set ChordNames.midiInstrument = #"bass"
Printing stanzas at the end in verse form
Most songs in my songbooks have one stanza set to the music, and the rest added in verse form at the end of the piece. This can be accomplished in Lilypond as well and is described in LilyPond Notation Reference p.197.
Accordion notation
I would like to implement the following notation, often used in accordion music:

The bass is shown by a diagonal cross (such as noteheads.s2cross), the chord by a diagonal line (such as noteheads.s2slash), bass and chord together by a cross with one double line (from bottom left to top right; noteheads.s2cross and noteheads.s2slash could be used on top of one another, but don't fit together optically), quint bass by diagonal cross in a circle (such as noteheads.s2xcircle; for C, quint bass is G, for G it's D and so on), and bass and chord at the same time, with a cross having a double line. The staff consists of a single line. Some hints can be found in LilyPond Notation Reference p.52, but mostly that refers to Internals Reference (TODO; test.ly).
Setting MIDI tempo without printed tempo indication
Without a tempo indication, the created MIDI files play too slowly. Setting the tempo with tempo 4 = 120 results in a printed tempo indication, which is not what I wanted. Setting the MIDI tempo alone works like this:
	midi {
		context {
			Score
			tempoWholesPerMinute = #(ly:make-moment 120 4)
		}
	}
	
See LilyPond Notation Reference p.326.

MIDI problems

LilyPond Notation Reference covers creating MIDI files on p.324. If there is a warning:
  no such MIDI instrument: `guitar'
then piano is used instead of the desired instrument. If there is no warning, the instrument should have been accepted. However, not all MIDI players know all instruments. Timidity, for example, as it comes with Debian, ignores a lot of instruments:
"guitar harmonics", "string ensemble 2", "choir aahs", "fiddle", "bagpipe", "contrabass", "whistle", "synth voice", "agogo", "taiko drum", "melodic tom", "synth drum", "applause", "gunshot", ...
Instruments that work include:
"acoustic guitar (nylon)", "acoustic bass", "glockenspiel", "string ensemble 1", "orchestral strings", "church organ", "flute", "recorder", "voice oohs", "trumpet", "piccolo", "woodblock", "steel drums", ...
LilyPond Notation Reference lists the MIDI instruments on p.444.