]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/fret-diagrams.scm
ignore .dotest
[lilypond.git] / scm / fret-diagrams.scm
index bc74dc98033b09a7f151371b44137d515974a6b7..2792ef7956197d0d3dcb5bf2518fe5f81944ad47 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c) 2004--2005 Carl D. Sorensen <c_sorensen@byu.edu>
+;;;; (c) 2004--2006 Carl D. Sorensen <c_sorensen@byu.edu>
 
 (define (fret-parse-marking-list marking-list fret-count)
    (let* ((fret-range (list 1 fret-count))
@@ -21,7 +21,8 @@
                      ((eq? my-code 'place-fret)
                         (set! dot-list (cons* (cdr my-item) dot-list))))
                  (parse-item (cdr mylist)))))
-               ; calculate fret-range
+      
+      ;; calculate fret-range
                (let ((maxfret 0) (minfret 99))
                     (let updatemax ((fret-list dot-list))
                         (if (null?  fret-list)
@@ -40,7 +41,9 @@
                (acons 'barre-list barre-list
                (acons 'dot-list dot-list
                (acons 'xo-list xo-list '()))))))
-   
+
+
+
 (define (subtract-base-fret base-fret dot-list)
 "Subtract @var{base-fret} from every fret in @var{dot-list}"  
   (if (null? dot-list)
@@ -133,6 +136,7 @@ Line thickness is given by @var{th}, fret & string spacing by
 (define (draw-dots layout props string-count fret-range size finger-code 
                     dot-position dot-radius dot-thickness dot-list)
   "Make dots for fret diagram."
+
   (let* ((scale-dot-radius (* size dot-radius))
          (scale-dot-thick (* size dot-thickness))
          (dot-color (chain-assoc-get 'dot-color props 'black))
@@ -291,14 +295,14 @@ Line thickness is given by @var{th}, fret & string spacing by
            (sans-serif-stencil layout props (* size label-font-mag) label-text) 
                        (* size (+ fret-count label-vertical-offset)) Y)))
  
-(def-markup-command (fret-diagram-verbose layout props marking-list)
+(define-markup-command (fret-diagram-verbose layout props marking-list)
   (list?)
   "Make a fret diagram containing the symbols indicated in @var{marking-list}
   
   For example,
   
 @example
-   \\markup \\fret-diagram #'((mute 6) (mute 5) (open 4)
+   \\markup \\fret-diagram-verbose #'((mute 6) (mute 5) (open 4)
         (place-fret 3 2) (place-fret 2 3) (place-fret 1 2))
 @end example 
   
@@ -326,6 +330,9 @@ changed by setting the value of the variable @var{dot-color}.  If the
 variable @var{finger-code}.  There is no limit to the number of fret
 indications per string.
 
+
+
+
 @end table
 "
    (make-fret-diagram layout props marking-list))
@@ -347,7 +354,7 @@ indications per string.
          (default-dot-position (if (eq? finger-code 'in-dot) (- 0.95 default-dot-radius) 0.6))  ; move up to make room for bigger if labeled
          (dot-radius (chain-assoc-get 'dot-radius props default-dot-radius))  ; needed for both draw-dots and draw-barre
          (dot-position (chain-assoc-get 'dot-position props default-dot-position)) ; needed for both draw-dots and draw-barre
-         (th (* (ly:output-def-lookup layout 'linethickness)
+         (th (* (ly:output-def-lookup layout 'line-thickness)
                 (chain-assoc-get 'thickness props 0.5))) ; needed for both draw-frets and draw-strings
                 
          (alignment (chain-assoc-get 'align-dir props -0.4)) ; needed only here
@@ -384,7 +391,7 @@ indications per string.
          (ly:stencil-aligned-to fret-diagram-stencil X alignment)
         ))
          
-(def-markup-command (fret-diagram layout props definition-string)
+(define-markup-command (fret-diagram layout props definition-string)
   (string?)
   "  
 Example
@@ -515,7 +522,7 @@ Note:  There is no limit to the number of fret indications per string.
                 (cons* numeric-value (numerify (cdr mylist)))
                 (cons* (car (string->list (car mylist))) (numerify (cdr mylist)))))))
            
-(def-markup-command (fret-diagram-terse layout props definition-string)
+(define-markup-command (fret-diagram-terse layout props definition-string)
   (string?)
   "Make a fret diagram markup using terse string-based syntax.