;; returns a chord given a root and type
;; see *pc:chord-syms* for currently available types
;;
;; e.g. (pc:chord 0 '^7) => '(0 4 7 11)
(define pc:chord
(lambda (root type)
(let ((chord (assoc type *pc:chord-syms*)))
(if chord
(let loop ((l (cdr chord))
(newlst '()))
(if (null? l)
(reverse newlst)
(loop (cdr l) (cons (modulo (+ (car l) root) 12) newlst))))
(begin (log-info "Chord type not found." type) #f)))))