]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/fretted-string-harmonics-in-tablature.ly
Imported Upstream version 2.14.2
[lilypond.git] / Documentation / snippets / new / fretted-string-harmonics-in-tablature.ly
1 \version "2.14.0"
2
3 \header {
4   lsrtags = "fretted-strings"
5   texidoc = "
6 Fretted-string harmonics:
7 "
8   doctitle = "Fretted-string harmonics in tablature"
9 }
10
11 pinchedHarmonics = {
12    \textSpannerDown
13    \override TextSpanner #'bound-details #'left #'text =
14       \markup {\halign #-0.5 \teeny "PH" }
15       \override TextSpanner #'style =
16          #'dashed-line
17    \override TextSpanner #'dash-period = #0.6
18    \override TextSpanner #'bound-details #'right #'attach-dir = #1
19    \override TextSpanner #'bound-details #'right #'text =
20       \markup { \draw-line #'(0 . 1) }
21    \override TextSpanner #'bound-details #'right #'padding = #-0.5
22 }
23
24 harmonics = {
25   %artificial harmonics (AH)
26   \textLengthOn
27   <\parenthesize b b'\harmonic>4_\markup{ \teeny "AH 16" }
28   <\parenthesize g g'\harmonic>4_\markup{ \teeny "AH 17" }
29   <\parenthesize d' d''\harmonic>2_\markup{ \teeny "AH 19" }
30   %pinched harmonics (PH)
31   \pinchedHarmonics
32   <a'\harmonic>2\startTextSpan
33   <d''\harmonic>4
34   <e'\harmonic>4\stopTextSpan
35   %tapped harmonics (TH)
36   <\parenthesize g\4 g'\harmonic>4_\markup{ \teeny "TH 17" }
37   <\parenthesize a\4 a'\harmonic>4_\markup{ \teeny "TH 19" }
38   <\parenthesize c'\3 c''\harmonic>2_\markup{ \teeny "TH 17" }
39   %touch harmonics (TCH)
40   a4( <e''\harmonic>2. )_\markup{ \teeny "TCH" }
41 }
42
43 frettedStrings = {
44   %artificial harmonics (AH)
45   \harmonicByFret #4 g4\3
46   \harmonicByFret #5 d4\4
47   \harmonicByFret #7 g2\3
48   %pinched harmonics (PH)
49   \harmonicByFret #7 d2\4
50   \harmonicByFret #5 d4\4
51   \harmonicByFret #7 a4\5
52   %tapped harmonics (TH)
53   \harmonicByFret #5 d4\4
54   \harmonicByFret #7 d4\4
55   \harmonicByFret #5 g2\3
56   %touch harmonics (TCH)
57   a4 \harmonicByFret #9 g2.\3
58 }
59
60 \score {
61   <<
62     \new Staff {
63       \new Voice {
64         \clef "treble_8"
65         \harmonics
66       }
67     }
68     \new TabStaff {
69       \new TabVoice {
70         \frettedStrings
71       }
72     }
73   >>
74 }