]> git.donarmstrong.com Git - lilypond.git/blob - input/test/improv.ly
release: 1.3.150
[lilypond.git] / input / test / improv.ly
1
2 \header {
3 texidoc = "note heads for improvisation have a different shape. "
4 }
5
6 %{ TODO: the construct with separet SquashVoice context is a little
7  gory. FIXME.  %}
8
9 \version "1.3.146"
10
11 improOn = \notes {\translator Voice = impro }
12 improOff = \notes {\translator SquashVoice = melo }
13
14 global = \notes { s1*3 \bar "|." }
15
16 \score {
17   <
18     \context ChordNames \chords {e8*7:m7 a2.:m7 bes4:m7 b1:m7 e8:m }
19     \context Staff \notes <
20       \context SquashVoice = impro { \global }
21       \context Voice = melo \transpose c'' {
22         e8 e g a a16()bes()a8 g \improOn e8
23         ~e2~e8 f4 fis8
24         ~fis2 \improOff a16()bes a8 g e
25       }
26     >
27   >
28   \paper { 
29     \translator {
30       \VoiceContext
31       \name SquashVoice
32       \alias Voice
33       \consists Pitch_squash_engraver
34       \consists Local_key_engraver
35       squashedPosition = #0
36       NoteHead \override #'style = #'slash
37       Accidentals \override #'transparent = ##t
38     }
39     \translator {
40       \VoiceContext
41       \alias SquashVoice
42       \consists Local_key_engraver
43     }
44     \translator {
45       \ScoreContext
46       \accepts SquashVoice
47     }
48     \translator {
49       \StaffContext
50       \remove Local_key_engraver
51       \accepts SquashVoice
52     }
53     linewidth = -1
54   }
55 }