]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/general/examples/bach-tab-example.ly
Merge commit 'origin/master'
[lilypond.git] / Documentation / general / examples / bach-tab-example.ly
1 \version "2.11.62"
2 \include "example-header.ily"
3
4 % Example of Tab Polyphony from Bach Lute Suite in E Minor
5
6
7
8 %#(define (fret-letter-tablature-format string tuning pitch)
9 %(make-string 1 (integer->char
10 %(+ (char->integer #\a)
11 %(- (pitch-semitones pitch)
12 %(list-ref tuning (- string 1)))))))
13
14 global = {
15   \time 12/8
16   \key e \minor
17   \set Staff.midiInstrument = "acoustic guitar (nylon)"
18 %  \set TabStaff.tablatureFormat = #fret-letter-tablature-format
19 }
20
21 upper = \relative c' {
22         \global
23         \voiceOne
24         r4. r8 e, fis g16 b g e e' b c b a g fis e
25 }
26
27 lower = \relative c {
28         \global
29         \voiceTwo
30         r16 e d c b a g4 fis8 e fis g a b c | 
31 }
32
33 \score {
34   <<
35     \new StaffGroup = "tab with traditional" <<
36        \new Staff = "guitar" <<
37             \clef "treble_8"
38             \context Voice = "upper" \upper
39             \context Voice = "lower" \lower
40        >>
41        \new TabStaff = "guitar" << 
42             \context TabVoice = "upper"  \upper 
43             \context TabVoice = "lower"  \lower 
44        >>
45     >>
46   >>
47   \layout {}
48   %\midi {}
49 }
50