Jump to content

distribute-seq, how does it work?


Recommended Posts

Hi,

I'am examin the distribute-seq function and don't get the exact logic behind it:

 

(setf pitch '(c4 cs4 d4 ds4 e4 f4 fs4 g4 gs4 a4 as4 b4))
#|            1  2   3  4   5  6  7   8  9   10 11  12 |#
(setf
 l-v1 '(1/8 -1/8 2/8 -1/8 5/8)
 l-v2 '(1/8 1/8 -1/8 2/8 1/8)
 l-va '(-2/8 1/8 -5/8 1/8)
 l-vc '(-1/8 3/8 1/8 1/8)
 )

(setf align (distribute-seq pitch l-v1 l-v2 l-va l-vc))
==>((c4 e4 gs4) (cs4 d4 fs4 a4) (f4 b4) (ds4 g4 as4))

;;;from the docs, what is the rule for the distribution (when the lists are of different size)?
;;;Do the list of pitches (have to) match the list of length values?

#|

-----------------that's what I would expect:-------------------

        1        5        9
 l-v1 '(1/8 -1/8 2/8 -1/8 5/8)
        2   6        10  12
 l-v2 '(1/8 1/8 -1/8 2/8 1/8)
             3        7    
 l-va '(-2/8 1/8 -5/8 1/8)
             4   8   11  
 l-vc '(-1/8 3/8 1/8 1/8)

-----------------that's how it works:------------------------

        1        5        9
 l-v1 '(1/8 -1/8 2/8 -1/8 5/8)
        2   3        7   10
 l-v2 '(1/8 1/8 -1/8 2/8 1/8)
             6        12
 l-va '(-2/8 1/8 -5/8 1/8)
             4   8   11
 l-vc '(-1/8 3/8 1/8 1/8)

----------------that's what Stéphane would expect (and what would also make sense to me):

       1        6        11
l-v1 '(1/8 -1/8 2/8 -1/8 5/8)
       2   3        8   12
l-v2 '(1/8 1/8 -1/8 2/8 1/8)
            4        9    
l-va '(-2/8 1/8 -5/8 1/8)
            5   7   10  
l-vc '(-1/8 3/8 1/8 1/8)

|#

 

 

greatful for some insight, thanks!

 

ole

Link to comment
Share on other sites

This will explain the delta time pitch distribution. 🙂

 

(ps 'gm
    :va (list '(1/8 c5 -1/8 2/8 -1/8 5/8) 
              '(1/8 g4 1/8 -1/8 2/8 1/8)
              '(-2/8 1/8 e4 -5/8 1/8)
              '(-1/8 3/8 c4 1/8 1/8)))

Screenshot 2021-01-10 at 18.58.20.png

 

Now with your values:

(setf row '(c4 cs4 d4 ds4 e4 f4 fs4 g4 gs4 a4 as4 b4))
(setf
 l-v1 '(1/8 -1/8 2/8 -1/8 5/8)
 l-v2 '(1/8 1/8 -1/8 2/8 1/8)
 l-va '(-2/8 1/8 -5/8 1/8)
 l-vc '(-1/8 3/8 1/8 1/8)
 )
 
(setf length (list l-v1 l-v2 l-va l-vc))
(setf pitch (distribute-seq row length))

(setf seq (make-omn
           :length length
           :pitch pitch))
           
(ps 'gm
    :vn1 (list (1~ seq))
    :vn2 (list (2~ seq))
    :va (list (3~ seq))
    :vc (list (4~ seq)))

Screenshot 2021-01-10 at 19.10.17.png

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy