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
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
(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)