summaryrefslogtreecommitdiff
path: root/Documentation/snippets/automatically-changing-the-stem-direction-of-the-middle-note-based-on-the-melody.ly
blob: a6982aa7fe3a0b89c2b0201f4c7af0d49f37d931 (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
%% DO NOT EDIT this file manually; it is automatically
%% generated from LSR http://lsr.di.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.18.0"

\header {
  lsrtags = "contexts-and-engravers, pitches"

  texidoc = "
LilyPond can alter the stem direction of the middle note on a staff so
that it follows the melody, by adding the @code{Melody_engraver} to the
Voice context and overriding the @code{neutral-direction} of Stem.

"
  doctitle = "Automatically changing the stem direction of the middle note based on the melody"
} % begin verbatim

\relative c'' {
  \time 3/4
  \autoBeamOff
  a8 b g f b g |
  c b d c b c
}

\layout {
  \context {
    \Voice
    \consists "Melody_engraver"
    \override Stem.neutral-direction = #'()
  }
}