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