mkchordiatonic   scheme


Defined in:  https://github.com/lambdamusic/extempore-extensions/blob/main/init/init_makers.xtm

Implementation

; 
; MKCHORDIATONIC // 1-based (= tonic)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Returns a diatonic chord based on a major or minor scale. 
; Wrapper around pc:diatonic, which returns a chord as a list of pitch classes, hence it can't be played right away. 
;
; Args:
; root 
; mode (major or minor)
; degree (either as symbols, or via an integer)
;
; NOTE: integer degrees permit to go above 8 
;
; Examples:
; (mkchordiatonic 60 '^ 'iii) ;; (64 67 71)
; (mkchordiatonic 60 '^ 3) ;; (64 67 71)
; (mkchordiatonic 60 '^ 1) ;; (60 64 67)
; (mkchordiatonic 60 'M 8) ;; (72 76 79)
;
(define mkchordiatonic
  (lambda (root mode degree)
    (if (not (member mode *diatonic_modes*))
        (println 'Error: 'modes 'allowed: *diatonic_modes*)
        (begin 
            (if= mode 'M (set! mode '^))
            (if= mode 'm (set! mode '-))


Back to Index