Hi List,
I need to get an ancient tab with a standard markup alignment instead of the default vertical one.
Unfortunately, this code has no effect:
\version "2.18.2"
#(define-public
(my-fret-letter-tablature-format context string-number fret-number)
(let ((labels (ly:context-property context 'fretLabels)))
;; changed from make-vcenter-markup
;; has no effect:
(make-simple-markup
(cond
((= 0 (length labels))
(string (integer->char (+ fret-number (char->integer #\a)))))
((and (<= 0 fret-number) (< fret-number (length labels)))
(list-ref labels fret-number))
(else
(ly:warning "No label for fret ~a (on string ~a); only ~a fret labels provided"
fret-number string-number (length labels))
".")))))
\layout {
\context {
\Score
tablatureFormat = #my-fret-letter-tablature-format
}
}
\new TabVoice
\relative {
e' f fis g gis a ais b
}
%% or even when deleting 'vcenter-markup':
#(define-public
(my-fret-letter-tablature-format-bis context string-number fret-number)
(let ((labels (ly:context-property context 'fretLabels)))
;; delete make-vcenter-markup
;; has no effect:
(cond
((= 0 (length labels))
(string (integer->char (+ fret-number (char->integer #\a)))))
((and (<= 0 fret-number) (< fret-number (length labels)))
(list-ref labels fret-number))
(else
(ly:warning "No label for fret ~a (on string ~a); only ~a fret labels provided"
fret-number string-number (length labels))
"."))))
\layout {
\context {
\Score
tablatureFormat = #my-fret-letter-tablature-format-bis
}
}
\new TabVoice
\relative {
e' f fis g gis a ais b
}
Any idea?
Cheers,
Pierre