Jump to content

Featured Replies

Posted

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

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

 

  • Author
11 hours ago, Stephane Boussuge said:

Ok, the distribution is based on delta time, I understand.

 

S.

Can you please ellaborate a little, thanks!

 

ole

Create an account or sign in to comment


Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy