Markup command name changes.
[lilypond.git] / input / new / letter-tablature-formatting.ly
blob5f2b2679039140956ba925c468f6a189c8487a31
1 \version "2.11.53"
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
35 } {
36 \music