]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/automatically-changing-the-stem-direction-of-the-middle-note-based-on-the-melody.ly
Imported Upstream version 2.19.45
[lilypond.git] / Documentation / snippets / automatically-changing-the-stem-direction-of-the-middle-note-based-on-the-melody.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.18.0"
8
9 \header {
10   lsrtags = "contexts-and-engravers, pitches"
11
12   texidoc = "
13 LilyPond can alter the stem direction of the middle note on a staff so
14 that it follows the melody, by adding the @code{Melody_engraver} to the
15 Voice context and overriding the @code{neutral-direction} of Stem.
16
17 "
18   doctitle = "Automatically changing the stem direction of the middle note based on the melody"
19 } % begin verbatim
20
21 \relative c'' {
22   \time 3/4
23   a8 b g f b g |
24   c  b d c b c |
25 }
26
27 \layout {
28   \context {
29     \Voice
30     \consists "Melody_engraver"
31     \autoBeamOff
32     \override Stem.neutral-direction = #'()
33   }
34 }