]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix poor automatic fretboard calculation
authorCarl Sorensen <c_sorensen@byu.edu>
Sat, 1 Nov 2008 14:11:57 +0000 (08:11 -0600)
committerCarl Sorensen <c_sorensen@byu.edu>
Sat, 1 Nov 2008 14:11:57 +0000 (08:11 -0600)
Improve the automatic fretboard calculation algorithm by changing
the sort order of the notes.

This improvement broke the example on improving automatic fretboards
by specifying a string.  I could not find another example, so I
removed the existing example.  I wanted to leave the text in case
somebody had the problem in the future.

This improvement also fixed the poor diagram for c:9 in the
predefined fretboards section of fretted-strings.itely

Documentation/user/fretted-strings.itely
scm/translation-functions.scm

index 77c5006191da4356f1be2091ec8851c38eedfefd..9802858c50b33350467c014b7ce5668befacecae 100644 (file)
@@ -1036,25 +1036,6 @@ note need be manually placed on a string; the rest of
 the notes will then be placed appropriately by the @code{FretBoards}
 context.
 
-@lilypond[quote,ragged-right,verbatim]
-<<
-  \context ChordNames {
-     \chordmode { 
-       c1 c 
-     }
-  }
-  \context FretBoards {
-    < c g c' e' g'> 1
-    < c g\4 c' e' g'> 1
-  }
-  \context Staff {
-    \clef "treble_8"
-    < c g c' e' g'> 1
-    < c g c' e' g'> 1
-  }  
->>
-@end lilypond
-
 @cindex fret diagrams, adding fingerings
 @cindex fingerings, adding to fret diagrams
 
index 3767a18be2be9de99549f3541ef00ea2b494dd66..901bff0944e40e0385d8ce81443de09a569fe599 100644 (file)
   (define (note-pitch a)
     (ly:event-property a 'pitch))
 
-  (define (note-pitch<? a b)
-    (ly:pitch<? (note-pitch a)
-               (note-pitch b)))
+  (define (note-pitch>? a b)
+    (ly:pitch<? (note-pitch b)
+               (note-pitch a)))
 
   (define (note-finger ev)
     (let* ((articulations (ly:event-property ev 'articulations))
                           specified-frets))
                           
               )))
-   (sort notes note-pitch<?))
+   (sort notes note-pitch>?))
 
   string-fret-fingering-tuples)