]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/ac-extra-voice.ly
(Text markup): add note about
[lilypond.git] / input / test / ac-extra-voice.ly
index fba60bd225df0e82068c5b5a3a17b556a54ff61e..221c609094353b09f1355afa6a8801a723f0025c 100644 (file)
@@ -1,72 +1,59 @@
-global = \notes {
-       \key a \minor;
-       \time 6/4;
-%      \skip 1.*34;
-%      \bar ".|";
+\version "1.7.18"
+
+%% I don't know what this example is supposed to do.  delete it?
+%% It shows how to use the autochange feature together with an extra
+%% voice.  When I needed to typeset this example, I found it not trivial
+%% and dumped a piece of it here.  Move to refman?
+
+\header{
+    texidoc="When using automatic staff changes for the one voice, the
+other voice must be given a name explicitely."
+}
+
+global = \notes{
+    \key a \minor
+    \time 6/4
 }
 
 melody = \notes\relative c''{
-       r2 r r 
-       r2 r r
-       r4 a'8-- \< a-- a-- a-- c-- \!b-- a--\> gis f \!e 
-       es8 \grace b c r4 r2 r
+    r2 r r 
+    r2 r r
+    r4 a'8-- \< a-- a-- a-- c-- \!b-- a--\> gis f \!e 
+    es8 \grace b c r4 r2 r
 }
 
 basloopje = \notes\relative c{
-       d,8(    a' d f a d f d a f d    )a
+    d,8( a' d f a d f d a f d a-)
 }
 
-accompany = \notes \relative c{
-       \notes\relative c \basloopje
-       \notes\relative c \basloopje
-       \notes\relative c \basloopje
-       \notes\relative c \basloopje
-}
+accompany = \repeat unfold 4 \notes \relative c \basloopje
 
 \score{
-       \notes \context PianoStaff <
-               \context Staff=up < 
-                       \global
-                       \context Voice=foo {
-                       \property Voice.verticalDirection = #1
-                       \property Voice.scriptVerticalDirection = #1
-                       \melody 
-                       }
-               >
-               \context Staff=down <
-                       \global
-                       \clef bass;
-                       \autochange Staff \accompany
-               >
+    \notes \context PianoStaff<
+       \context Staff=up <
+           \global
+           \context Voice=foo{
+               \voiceOne
+               \melody 
+           }
        >
+       \context Staff=down<
+           \global
+           \clef bass
+           \autochange Staff \context Voice \accompany
+       >
+    >
 
-       \paper {
-               gourlay_maxmeasures = 4.;
-               indent = 8.\mm;
-               textheight = 295.\mm;
-
-               % ugly is beautiful
-               slur_beautiful = 5.0;
-
-               \translator{ 
-                       \PianoStaffContext
-                       defaultBarType = #"" 
-               }
-               \translator{ 
-                       \StaffContext
-                       % don't auto-generate bars: not a good idea: -> no breakpoints
-                       % barAuto = "0";
-                       % urg defaultBarType = #""
-                       defaultBarType = #"" 
-                       \remove "Time_signature_engraver";
-
-                       slurVerticalDirection = #1
-                       verticalDirection = -1
-                       AutoBeam \push (end * * * *)  = #(make-moment 1 2)
-               }
-       }
-       \midi {
-               \tempo 4 = 54;
+    \paper {
+       \translator{ 
+           \StaffContext
+           autoBeamSettings \override #'(end * * * *)
+           = #(ly:make-moment 1 2)
        }
+    }
+    \midi {
+       \tempo 4 = 54
+    }
 }
 
+