]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/open-string-harmonics-in-tablature.ly
Imported Upstream version 2.19.45
[lilypond.git] / Documentation / snippets / open-string-harmonics-in-tablature.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.18.0"
8
9 \header {
10   lsrtags = "fretted-strings"
11
12   texidoc = "
13 This snippet demonstrates open-string harmonics
14
15 "
16   doctitle = "Open string harmonics in tablature"
17 } % begin verbatim
18
19 openStringHarmonics = {
20   \textSpannerDown
21   \override TextSpanner.staff-padding = #3
22   \override TextSpanner.dash-fraction = #0.3
23   \override TextSpanner.dash-period = #1
24
25   %first harmonic
26   \override TextSpanner.bound-details.left.text = \markup\small "1st harm. "
27   \harmonicByFret #12 e,2\6\startTextSpan
28   \harmonicByRatio #1/2 e,\6\stopTextSpan
29
30   %second harmonic
31   \override TextSpanner.bound-details.left.text = \markup\small "2nd harm. "
32   \harmonicByFret #7 e,\6\startTextSpan
33   \harmonicByRatio #1/3 e,\6
34   \harmonicByFret #19 e,\6
35   \harmonicByRatio #2/3 e,\6\stopTextSpan
36   %\harmonicByFret #19 < e,\6 a,\5 d\4 >
37   %\harmonicByRatio #2/3 < e,\6 a,\5 d\4 >
38
39   %third harmonic
40   \override TextSpanner.bound-details.left.text = \markup\small "3rd harm. "
41   \harmonicByFret #5 e,\6\startTextSpan
42   \harmonicByRatio #1/4 e,\6
43   \harmonicByFret #24 e,\6
44   \harmonicByRatio #3/4 e,\6\stopTextSpan
45   \break
46
47   %fourth harmonic
48   \override TextSpanner.bound-details.left.text = \markup\small "4th harm. "
49   \harmonicByFret #4 e,\6\startTextSpan
50   \harmonicByRatio #1/5 e,\6
51   \harmonicByFret #9 e,\6
52   \harmonicByRatio #2/5 e,\6
53   \harmonicByFret #16 e,\6
54   \harmonicByRatio #3/5 e,\6\stopTextSpan
55
56   %fifth harmonic
57   \override TextSpanner.bound-details.left.text = \markup\small "5th harm. "
58   \harmonicByFret #3 e,\6\startTextSpan
59   \harmonicByRatio #1/6 e,\6\stopTextSpan
60   \break
61
62   %sixth harmonic
63   \override TextSpanner.bound-details.left.text = \markup\small "6th harm. "
64   \harmonicByFret #2.7 e,\6\startTextSpan
65   \harmonicByRatio #1/7 e,\6\stopTextSpan
66
67   %seventh harmonic
68   \override TextSpanner.bound-details.left.text = \markup\small "7th harm. "
69   \harmonicByFret #2.3 e,\6\startTextSpan
70   \harmonicByRatio #1/8 e,\6\stopTextSpan
71
72   %eighth harmonic
73   \override TextSpanner.bound-details.left.text = \markup\small "8th harm. "
74   \harmonicByFret #2 e,\6\startTextSpan
75   \harmonicByRatio #1/9 e,\6\stopTextSpan
76 }
77
78 \score {
79   <<
80     \new Staff
81     \with { \omit StringNumber } {
82       \new Voice {
83         \clef "treble_8"
84         \openStringHarmonics
85       }
86     }
87     \new TabStaff {
88       \new TabVoice {
89         \openStringHarmonics
90       }
91     }
92   >>
93 }