ivl:melody-by-ivl   scheme


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

Implementation

;; generate a meldoy from a list of intervals
(define ivl:melody-by-ivl
   (lambda (starting-pitch ivls . args)
      (if (null? ivls)
          (reverse (car args))
          (if (null? args)
              (ivl:melody-by-ivl starting-pitch ivls (cons starting-pitch args))
              (ivl:melody-by-ivl (+ starting-pitch (car ivls)) (cdr ivls)
                                 (cons (+ starting-pitch (car ivls)) (car args)))))))


Back to Index