pc:closest-pitch   scheme


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

Implementation

(define pc:closest-pitch
  (lambda (pc pitches)
    (cdar (cl:sort (map (lambda (p) (cons (pc:distance p pc) p)) pitches)
                   (lambda (a b) (< (car a) (car b)))))))


Back to Index