[CM] basic question (newbie still)

Rob Howiler rhowiler at presby.edu
Tue Feb 23 05:51:59 PST 2016


I’m trying to work through this exercise.

This works as it should…..
-------------------
(define (strum2 key1 key2 rate dur amp)
  (let ((step (if (< key2 key1) -1 1))
      (diff (abs (- key2 key1))))
    (process repeat (+ diff 14)
             for key from key1 by 1
             for beg from 0 by rate
             do
             (mp:midi :key key :time beg))))
;;(execute)
(sprout (strum2 60 72 .15 .25 .1))
———————————



This works, but it gives an immediate chord instead of a “scale”….
--------------------

(define (strum3 key1 key2 beat dur amp)
  (let ((step (if (< key2 key1) -1 1))
        (diff (abs (- key2 key1))))
    (process repeat (+ diff 1)
             for key from key1 by step
             for beg = (now)
             do
             (mp:midi :key key)
             wait beat)))
;;;execute
(sprout (strum3 60 63 10 10 .1))
————————————


This seems to work, but I get no sound at all.  No errors, just no sound.
————————————
(define (strum3 key1 key2 beat dur amp)
  (let ((step (if (< key2 key1) -1 1))
        (diff (abs (- key2 key1))))
    (process repeat (+ diff 1)
             for key from key1 by step
             for beg = (now)
             do
             (mp:midi :key key :time beg)
             wait beat)))
;;;execute
(sprout (strum3 60 63 10 10 .1))
———————————————

Any help would be appreciated.  I’m going by an outdated example in the Notes From the Metalevel Book which suggests using the output (new midi :time (now) :duration….. etc.  The "new midi" isn’t being recognized.  I understand the language has changed since the book was written, so I’m trying to get my head around the way things work now.

Thanks again in advance.
Rob



------------------------------------------------------
Dr. Rob Howiler
Academic Computing Services Coordinator
Assisstant Professor of Music
rhowiler at presby.edu
(864) 833-8324
-------------------------------------------------------


-- 

------------------------------
<http://www.presby.edu>



More information about the Cmdist mailing list