Update .ly files.
[lilypond.git] / input / new / letter-tablature-formatting.ly
blob79da84dff51bbaf350b786d87bef2c063381bd18
1 \version "2.12.0"
3 \header {
4 lsrtags = "staff-notation,fretted-strings"
6 texidoc = "Tablature can be formatted using letters instead of
7 numbers."
8 doctitle = "Letter tablature formatting"
11 #(define (letter-tablature-format str context event)
12 (let*
13 ((tuning (ly:context-property context 'stringTunings))
14 (pitch (ly:event-property event 'pitch)))
15 (make-whiteout-markup
16 (make-vcenter-markup
17 (string (integer->char
18 (+ (char->integer #\a)
19 (- (ly:pitch-semitones pitch)
20 (list-ref tuning (- str 1))))))))))
22 music = \relative c {
23 c4 d e f
24 g4 a b c
25 d4 e f g
29 \new Staff {
30 \clef "G_8"
31 \music
33 \new TabStaff \with {
34 tablatureFormat = #letter-tablature-format
37 \music