]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/fret-diagrams.scm
Fretboards: markup strings in dot positions
[lilypond.git] / scm / fret-diagrams.scm
index e60c0dca359cf782697afa6ca5ffc1524a255e4e..f8ccb59a111886ce250590d822c6f7bb9624aa6e 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2004--2014 Carl D. Sorensen <c_sorensen@byu.edu>
+;;;; Copyright (C) 2004--2015 Carl D. Sorensen <c_sorensen@byu.edu>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
@@ -109,11 +109,12 @@ to end-point."
                   (car this-list)
                 ;; fret
                   (- (second this-list) base-fret)
-                ;; finger
-                  (if (or (null? (cddr this-list))
-                        (not (number? (caddr this-list))))
-                      '()
-                      (third this-list))
+                ;; finger-number or markup
+                  (if (and (not (null? (cddr this-list)))
+                           (or (markup? (caddr this-list))
+                               (number? (caddr this-list))))
+                      (third this-list)
+                      '())
                 ;; inverted
                   (dot-is-inverted this-list)
                 ;; parenthesis
@@ -801,19 +802,9 @@ at @var{fret}."
              (number-type
               (assoc-get 'number-type details 'roman-lower))
              (label-text
-              (cond
-               ((equal? number-type 'roman-lower)
-                (fancy-format #f "~(~@r~)" base-fret))
-               ((equal? number-type 'roman-upper)
-                (fancy-format #f "~@r" base-fret))
-               ((equal? 'arabic number-type)
-                (fancy-format #f "~d" base-fret))
-               ((equal? 'custom number-type)
-                (fancy-format #f
-                              (assoc-get 'fret-label-custom-format
-                                         details "~a")
-                              base-fret))
-               (else (fancy-format #f "~(~@r~)" base-fret))))
+              (number-format number-type base-fret
+                             (assoc-get 'fret-label-custom-format
+                                         details "~a")))
              (label-stencil
               (centered-stencil
                (sans-serif-stencil