LSR: Update.
[lilypond.git] / input / lsr / letter-tablature-formatting.ly
blobbeaaa0f723900e39e445286458e698e6dc4b5fe5
1 %% Do not edit this file; it is auto-generated from input/new
2 %% This file is in the public domain.
3 \version "2.12.0"
5 \header {
6 lsrtags = "staff-notation,fretted-strings"
8 texidoc = "Tablature can be formatted using letters instead of
9 numbers."
10 doctitle = "Letter tablature formatting"
11 } % begin verbatim
14 #(define (letter-tablature-format str context event)
15 (let*
16 ((tuning (ly:context-property context 'stringTunings))
17 (pitch (ly:event-property event 'pitch)))
18 (make-whiteout-markup
19 (make-vcenter-markup
20 (string (integer->char
21 (+ (char->integer #\a)
22 (- (ly:pitch-semitones pitch)
23 (list-ref tuning (- str 1))))))))))
25 music = \relative c {
26 c4 d e f
27 g4 a b c
28 d4 e f g
32 \new Staff {
33 \clef "G_8"
34 \music
36 \new TabStaff \with {
37 tablatureFormat = #letter-tablature-format
40 \music