Changing the interval of lines on the stave

staffLineLayoutFunction is used to change the position of notes. This snippet shows setting its value to ly:pitch-semitones in order to produce a chromatic scale with the distance between each space and line of the stave equal to one semitone.

scale = \relative c' {
  a4 ais b c
  cis4 d dis e
  f4 fis g gis

\new Staff \with {
  \remove "Accidental_engraver"
  staffLineLayoutFunction = #ly:pitch-semitones
    \context NoteNames {
      \set printOctaveNames = ##f

[image of music]

LilyPond snippets v2.25.16 (development-branch).