]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/fret-diagrams.scm
Merge branch 'master' of ssh+git://hanwen@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / scm / fret-diagrams.scm
index 80bf4fc22a7c4e4d3df97f32aabb7cfa4f9add7e..fb986f91b990f3589d48d05f883017aa2a559220 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;;
-;;;; (c) 2004--2007 Carl D. Sorensen <c_sorensen@byu.edu>
+;;;; (c) 2004--2008 Carl D. Sorensen <c_sorensen@byu.edu>
 
 (define (fret-parse-marking-list marking-list fret-count)
   (let* ((fret-range (list 1 fret-count))
@@ -147,7 +147,7 @@ fret & string spacing by @var{size}. Orientation is given by @var{orientation}"
          (y1 (- half-thick))
          (y2 (+ top-fret-thick half-thick))
          (x-extent (cons (- x1) x2))
-         (y-extent (cons 0 y2)))
+         (y-extent (cons sth top-fret-thick)))
     (if (eq? orientation 'normal)
         (ly:make-stencil (list 'round-filled-box x1 x2 y1 y2 sth)
                          x-extent y-extent)
@@ -366,7 +366,8 @@ Line thickness is given by @var{th}, fret & string spacing by
                  (make-bezier-sandwich-list
                   (* size barre-start-string-coordinate)
                   (* size barre-end-string-coordinate)
-                  (* size (+ 1 (- top-fret fret) barre-fret-coordinate))
+                   (* size (+ 2 (- top-fret 
+                                   (+ low-fret barre-fret-coordinate))))
                   (* size bezier-height)
                   (* size bezier-thick)
                   orientation)
@@ -435,12 +436,12 @@ Line thickness is given by @var{th}, fret & string spacing by
         (label-text
          (cond
            ((equal? number-type 'roman-lower)
-           (fancy-format #f "~(~:@r~)" base-fret))
+           (fancy-format #f "~(~@r~)" base-fret))
            ((equal? number-type 'roman-upper)
-           (fancy-format #f "~:@r" base-fret))
+           (fancy-format #f "~@r" base-fret))
            ((equal? 'arabic number-type)
            (fancy-format #f "~d" base-fret))
-           (else (fancy-format #f "~(~:@r~)" base-fret)))))
+           (else (fancy-format #f "~(~@r~)" base-fret)))))
     (if (eq? orientation 'normal)
        (ly:stencil-translate-axis
         (sans-serif-stencil layout props (* size label-font-mag) label-text)
@@ -547,11 +548,14 @@ indications per string.
          (xo-list (cdr (assoc 'xo-list parameters)))
          (fret-range (cdr (assoc 'fret-range parameters)))
          (barre-list (cdr (assoc 'barre-list parameters)))
+         (barre-type
+          (assoc-get 'barre-type details 'curved))
          (fret-diagram-stencil
          (ly:stencil-add
           (draw-strings string-count fret-range th size orientation)
           (draw-frets fret-range string-count th size orientation))))
-    (if (not (null? barre-list))
+    (if (and (not (null? barre-list))
+             (not (eq? 'none barre-type)))
        (set! fret-diagram-stencil
              (ly:stencil-add
               (draw-barre layout props string-count fret-range size
@@ -823,7 +827,8 @@ with @code{-(} to start a barre and @code{-)} to end the barre.
                                 (car definition-list)
                                 (cdr definition-list))))
 
-(define (fret-parse-terse-definition-string props definition-string)
+(define-public 
+  (fret-parse-terse-definition-string props definition-string)
   "Parse a fret diagram string that uses terse syntax; return a pair containing:
     props, modified to include the string-count determined by the
     definition-string, and