[CM] problem with list construction for rhythms
Nikolaj Tollenaar
nikoltoll at gmail.com
Sat Jun 17 11:48:12 PDT 2017
Hello Heinrich,
This is really puzzling! After running your version, it also works with me,
and all my other versions of make-rhy-list work too. After some time, the
behaviour returns and I get the sound as attached.
That is really bizarre, because this afternoon I already tried the
following function, to no avail:
(define (make-rhy-list length)
;; chooses random groupings of values (more general)
(loop with rhy = (list) repeat length
do
(set! rhy (append rhy (pick '((1/4 1/4)
(1/3 1/3 1/3)
(1/8 1/8 1/8 1/8)
(1/16 1/16 1/8 1/16 1/8 1/16 1/8)
(1/2 1/2)))))
finally (return rhy)))
I also tried different midi outputs, and that does not seem to inluence the
outcome.
This is really hard to test, so I will stick with your version of
make-rhy-list.
Thank you for your help,
Nikolaj
2017-06-17 15:22 GMT+02:00 Taube, Heinrich K <taube at illinois.edu>:
> Hi Nikolaj, ive run your example and it works for me, so offhand I’m not
> sure what the issue might be. Im on a mac and you are on windows, but i
> can’t see what difference that would make. Since you think it has
> something to do with concat, as a test Ive rewritten your make-rhy-list
> function to avoid ‘concat’ . Try this version and tell me if it works. On
> my mac both your version and my version of 'make-rhy-list ‘ work fine so
> lets see what happens on your machine.
>
> best, Rick
>
>
> (define (play-pattern pat rhy times tmpo ampl)
> ;; plays pattern times times, with tempo tmpo and amplitude ampl:
> (let* ((dur (in-tempo 1/4 tmpo)))
> (process repeat times
> for x = (next pat)
> for y = (next rhy)
> do
> (if (number? x)
> (mp:midi :key x :dur dur :amp (* ampl (pick .9 .95 1
> .85))))
> (wait (in-tempo y tmpo))
> )))
>
> ;; NEW VERSION of make-rhy-list avoids concat
>
>
> (define (make-rhy-list length)
> ;; chooses random groupings of values
> (loop repeat length
> append (pick '((1/4 1/4)
> (1/3 1/3 1/3)
> (1/8 1/8 1/8 1/8)
> (1/16 1/16 1/8 1/16 1/8 1/16 1/8)
> (1/2 1/2)))))
>
> (define rhy-lst1 (make-rhy-list 20))
>
> (sprout (play-pattern (make-cycle '(70 72 80 88)) (make-cycle rhy-lst1)
> 160 115 0.9))
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20170617/82ff0e33/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rhy-list make-cycle.wav
Type: audio/x-wav
Size: 233420 bytes
Desc: not available
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20170617/82ff0e33/attachment.wav>
More information about the Cmdist
mailing list