]> git.donarmstrong.com Git - lilypond.git/blob - input/tricks/follow-thread.ly
patch::: 1.3.144.jcn6
[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
9 \version "1.3.139"
10 % followVoice: connect note heads with line when thread switches staff 
11
12 fragment = \notes {
13   \context PianoStaff <
14     \property PianoStaff.followVoice = ##t
15     \property Voice.VoiceFollower \set #'type = #'dashed-line
16     \context Staff \context Voice {
17       c'1
18       \translator Staff=two
19       b2 a
20     }
21     \context Staff=two {\clef bass; \skip 1*2;}
22   >
23 }
24
25 \paper { linewidth = -1.; } 
26
27 \score {
28   \notes\relative c \fragment
29   \paper { }  
30 }