]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix determine-frets-mf for minimum-fret
authorCarl Sorensen <c_sorensen@byu.edu>
Tue, 12 Aug 2008 00:33:05 +0000 (18:33 -0600)
committerCarl Sorensen <c_sorensen@byu.edu>
Tue, 12 Aug 2008 00:33:05 +0000 (18:33 -0600)
This patch changes determine-frets-mf so that it puts notes
on the highest string with a fret >= min-fret, instead of
putting them on the lowest available string.  This leads to
more rational automatically calculated fretboards.

scm/translation-functions.scm

index d4c84caf612f0cf1fff05b8fc766034c2411a78e..cefdf707764b893e31b7e18f3b98b423b3463560 100644 (file)
      (if (note-string note)
         (set-fret note (note-string note))
         (let*
-            ((string (find (lambda (string) (string-qualifies string
-                                                              (note-pitch note)))
-                             (reverse free-strings))))
-          (if string
-              (set-fret note string)
+            ((fit-string (find (lambda (string) 
+                               (string-qualifies string (note-pitch note)))
+                           free-strings)))
+          (if fit-string
+              (set-fret note fit-string)
               (ly:warning "No string for pitch ~a (given frets ~a)" (note-pitch note)
                           specified-frets))