[CM] help with repeated notes not running through a list...
Rob Howiler
rhowiler at presby.edu
Wed Feb 24 10:28:53 PST 2016
Yep. I saw the error of my ways. I set up “k" to be keynum, but then used “key" in the argument list. Makes sense now. Just didn’t realize what I was doing. Still new to this….
Thanks again
Rob
> On Feb 24, 2016, at 12:43 PM, Aykut Caglayan <aykut_caglayan at yahoo.com> wrote:
>
> Hi Rob,
>
>> ;;;;;;;;;This returns repeated note on execution
>> (define (ttone2 len row key beat amp)
>> (process repeat len
>> for i from 0
>> for p = (mod i len)
>> for pc = (list-ref row p)
>> for n = (if (chance? .5)
>> (+ key 12)
>> (- key 12))
>> for k = (+ n pc)
>> do (mp:midi :time 0 :key key :dur 1 :amp amp)
>> (wait beat)))
>
> the updated key value - k - within the loop doesn't seem to be passed to (mp:midi :key ..).
> it had to be - do (mp:midi :key k :dur 1 :amp amp)
>
> and you don't need to put :time value when you are using 'process', which deals with timing by itself
>
> Ike
------------------------------------------------------
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