[CM] problem with list construction for rhythms

Nikolaj Tollenaar nikoltoll at gmail.com
Fri Jun 16 02:58:15 PDT 2017


Dear all,

I'm trying to construct a rhythm value list through this function:

(define (make-rhy-list length)
   ;; chooses random groupings of values
        (loop with rhy = (list) repeat length
               do
               (set! rhy (concat 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)))

But, when I use these in a sprout, all notes are played simultaneously.

(define rhy-lst1 (make-rhy-list 20))
(sprout (play-pattern (make-cycle '(70 72 80 88)) (make-cycle rhy-lst1) 160
115 0.9))

Why is this and what can I do about it?

If I use the single element construction, sprout works as expected.

Like so:

(define (make-rhy-list length)
   ;; chooses random single values
   (loop for key from 1 to length
         collect (pick '(1/4 1/4 1/4 1/8 1/8 1/16 1/2 1/2))))

Greetings,

Nikolaj

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virusvrij.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/mailman/private/cmdist/attachments/20170616/9b55656d/attachment.html>


More information about the Cmdist mailing list