X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fautomatically-changing-the-stem-direction-of-the-middle-note-based-on-the-melody.ly;fp=Documentation%2Fsnippets%2Fautomatically-changing-the-stem-direction-of-the-middle-note-based-on-the-melody.ly;h=6ff6b998560a96d847d192129772e4298a6a82db;hb=0ac07f31e0f95fc18e5916ce756b9c746af7cc58;hp=0000000000000000000000000000000000000000;hpb=2f1263e2ccdddcac2eb9f7d8ce2ed92867d3d160;p=lilypond.git diff --git a/Documentation/snippets/automatically-changing-the-stem-direction-of-the-middle-note-based-on-the-melody.ly b/Documentation/snippets/automatically-changing-the-stem-direction-of-the-middle-note-based-on-the-melody.ly new file mode 100644 index 0000000000..6ff6b99856 --- /dev/null +++ b/Documentation/snippets/automatically-changing-the-stem-direction-of-the-middle-note-based-on-the-melody.ly @@ -0,0 +1,34 @@ +%% 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.17.6" + +\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 = #'() + } +}