[CM] help with repeated notes not running through a list...

Aykut Caglayan aykut_caglayan at yahoo.com
Wed Feb 24 09:43:59 PST 2016


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


More information about the Cmdist mailing list