+
+ (define (string-frets->dot-placement string-frets string-count)
+ (let*
+ ((desc (list->vector
+ (map (lambda (x) (list 'mute (1+ x)))
+ (iota string-count)))))
+
+ (for-each (lambda (sf)
+ (let*
+ ((string (car sf))
+ (fret (cadr sf))
+ (finger (caddr sf)))
+
+ (vector-set!
+ desc (1- string)
+ (if (= 0 fret)
+ (list 'open string)
+ (if finger
+ (list 'place-fret string fret finger)
+ (list 'place-fret string fret))
+ ))
+ ))
+ string-frets)
+ (vector->list desc)))
+
+ (define (get-predefined-fretboard predefined-fret-table tuning pitches)
+; (_i "Search through @var{predefined-fret-table} looking for a predefined
+;fretboard with a key of @var{(tuning . pitches)}. The search will check
+;both up and down an octave in order to accomodate transposition of the
+;chords.")
+ (define (get-fretboard key)
+ (let ((hash-handle
+ (hash-get-handle predefined-fret-table key)))
+ (if hash-handle
+ (cdr hash-handle) ; return table entry
+ '())))
+
+ (let ((test-fretboard (get-fretboard (cons tuning pitches))))
+ (if (not (null? test-fretboard))
+ test-fretboard
+ (let ((test-fretboard
+ (get-fretboard
+ (cons tuning (map (lambda (x) (shift-octave x 1)) pitches)))))
+ (if (not (null? test-fretboard))
+ test-fretboard
+ (get-fretboard
+ (cons tuning (map (lambda (x) (shift-octave x -1)) pitches))))))))
+
+;; body.
+ (let*