pc:degree   scheme


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

Implementation

;; Returns a scale degree of a given value (pitch) based on a pc
(define pc:degree
   (lambda (value pc)
      (let loop ((i 1)
                 (lst pc))
         (if (null? lst)
             (begin (log-info "pitch not in pc") #f)
             (if (= (car lst) (modulo value 12))
                 i
                 (loop (+ i 1) (cdr lst)))))))


Back to Index