]> git.donarmstrong.com Git - lilypond.git/blob - input/tricks/follow-thread.ly
c09efe20756b2a460b640c3480f0c6996cc1ea0a
[lilypond.git] / input / tricks / follow-thread.ly
1
2 \header{
3 texidoc="
4 Theads can be traced automagically when they switch staffs by setting
5 property @code{followVoice}.
6 ";
7 }
8 % followThread: connect note heads with line when thread switches staff 
9
10 fragment = \notes {
11   \context PianoStaff <
12     \property PianoStaff.followVoice = ##t
13     \context Staff \context Voice {
14       c'1
15       \translator Staff=two
16       b2 a
17     }
18     \context Staff=two {\clef bass; \skip 1*2;}
19   >
20 }
21
22 \paper { linewidth = -1.; } 
23
24 \score {
25   \notes\relative c \fragment
26   \paper { }  
27 }