pc:chord-options   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/pc_ivl.xtm

Implementation

;; returns chord options for root in maj-min key of pc
;;
;; e.g. (pc:chord-options 0 '^ (pc:scale 0 'ionian)) => ((0 4 7) (0 4 7 11) (0 5 7) (0 4 7 11 2) (0 4 7 11 6))
(define pc:chord-options
   (lambda (root maj-min pc)
      (let ((major7 '(^ ^7 ^sus ^9 ^7#4))
            (dom7 '(^ 7 ^sus 9))
            (minor7 '(- -7 -sus -9))
            (dim7 '(o -7b5 o7))
            (degree (pc:degree root pc)))
         (map (lambda (sym)
                 (pc:chord root sym))
              (if (equal? maj-min '^)
                  (case degree
                        ((-1) '())
                        ((1 4) major7)
                        ((5) dom7)
                        ((2 3 6) minor7)
                        ((7) dim7))
                  (case degree
                        ((-1) '())
                        ((1 4 6) minor7)
                        ((3) major7)
                        ((5) (append minor7 dom7))
                        ((2) dim7)
                        ((7) (append dom7 dim7))))))))


Back to Index