summaryrefslogtreecommitdiff
path: root/Documentation/snippets/changing-the-interval-of-lines-on-the-stave.ly
blob: bb52c169ffc275af4761876ef65db2a508f7e9e0 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
%% DO NOT EDIT this file manually; it is automatically
%% generated from LSR http://lsr.dsi.unimi.it
%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
\version "2.16.0"

\header {
  lsrtags = "pitches"

  texidoc = "
@code{staffLineLayoutFunction} is used to change the position of notes.
This snippet shows setting its value to @code{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.

"
  doctitle = "Changing the interval of lines on the stave"
} % begin verbatim


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

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