- (define (string-frets->dot-placement string-frets string-count)
- (let* ((desc (list->vector
- (map (lambda (x) (list 'mute (1+ x)))
- (iota string-count)))))
+ ;; Add string-count from string-tunings to fret-diagram-details.
+ (set! (ly:grob-property grob 'fret-diagram-details)
+ (acons 'string-count my-string-count details))
+ ;; Create the dot-placement list for the grob
+ (set! (ly:grob-property grob 'dot-placement-list) placement-list)))
+
+(define-public
+ (determine-frets context notes defined-strings . rest)
+ "Determine string numbers and frets for playing @var{notes}
+as a chord, given specified string numbers @var{defined-strings}.
+Will look for predefined fretboards if @code{predefinedFretboardTable}
+is not @code {#f}. If @var{rest} is present, it contains the
+FretBoard grob, and a fretboard will be
+created. Otherwise, a list of (string fret finger) lists will
+be returned)."
+
+ ;; helper functions
+
+ (define (string-frets->placement-list string-frets string-count)
+ "Convert @var{string-frets} to @code{fret-diagram-verbose}
+dot placement entries."
+ (let* ((placements (list->vector
+ (map (lambda (x) (list 'mute (1+ x)))
+ (iota string-count)))))