Miscellaneous Lilypond Tips

An ongoing attempt to collect all of the various Lilypond tweaks I find myself continually having to look up online or in my own previous engravings.

Hiding String Numbers in Notation

Override the StringNumber stencil:

\version "2.22.2"

banjoPart = \relative c {
  \key c \major
  \time 3/4
  c8. c'16 e8. g16\5 a8. g16\5 |
}

\score {
  \new Staff \with {
    \clef "treble_8"
    \override StringNumber #'stencil = ##f
  }
  \banjoPart
}

Manual Beaming

\version "2.22.2"

% Stems auto:
fis''8. [e16 dis8. e16 a8. cis,16]

% Stems up:
fis''8. ^[e16 dis8. e16 a8. cis,16]

% Stems down:
fis''8. _[e16 dis8. e16 a8. cis,16]

Ad Hoc Voices in a Single Measure

(For example, for a finger-style guitar arrangement with a bass note that should ring under the melody)

\version "2.22.2"

<< {e,4 s2.} \\ { e' fis g a } >> |