Jump to content

Recommended Posts

Posted

New function in 3.0.28902

 

rhythm-series num number-of-notes span &key length prob seed

 

This function returns a list of successive rhythmic series derived from a span (overall duration), length values, and a number of length-notes per bar. The length- notes within each bar are positioned at random.

 

Simple examples:

 

(rhythm-series 4 3 3/8)
=> ((-1/16 1/8 -1/16 1/16 1/16) (1/16 3/16 1/8)
    (1/8 3/16 1/16) (3/16 1/16 1/8))
    
(rhythm-series 4 5 3/8)
=> ((1/16 1/16 1/16 1/8 1/16) (-1/16 1/16 1/16 1/16 1/16 1/16)
    (1/16 1/16 1/16 -1/16 1/16 1/16) (1/16 1/16 1/16 1/16 -1/16 1/16))
    
(rhythm-series 4 3 1/4)
=> ((1/16 1/8 1/16) (1/16 1/16 1/8)
    (1/16 1/8 1/16) (1/16 1/8 1/16))

 

Examples with given length values:

 

(rhythm-series 4 3 1 :length '(q. e. s))
=> ((-1/4 1/16 1/16 1/16 -9/16) (1/8 3/16 -5/16 3/8)
    (1/16 3/16 -3/8 3/8) (3/16 -1/16 3/8 3/8))

(rhythm-series 6 5 3/8 :length '(q. e. e s 3q) :prob 0.1)
=> ((1/16 1/16 1/16 1/16 1/8) (1/8 1/16 1/16 1/16 1/16)
    (1/16 1/8 1/16 1/16 1/16) (1/16 1/8 1/16 1/16 1/16)
    (1/16 1/16 1/16 1/16 1/16 -1/16) (1/16 1/16 1/16 1/8 1/16))
    
(rhythm-series 6 5 3/8 :length '(q. e. e s 3q) :prob 0.9)
=> ((1/12 1/12 1/12 1/12 1/24) (1/24 1/12 1/12 1/12 1/12)
    (1/16 1/16 1/16 1/16 1/16 -1/16) (1/16 1/16 -1/16 1/16 1/16 1/16)
    (1/16 1/16 1/16 -1/16 1/16 1/16) (1/16 1/16 1/16 1/16 -1/16 1/16))    

 

Example with list of unique values for each generated series:

 

(rhythm-series '(1 4 3 2)
               '(7 5 7 7)
               '(3/8 3/8 1/2 3/4)
               :prob '(.4 .6 .7 .1)
               :length '(q. e. e s 5q 3q)
               :seed 34)
=> ((1/20 1/20 1/20 1/20 1/20 1/20 1/40 -1/20)
    (1/24 1/12 1/12 1/12 1/12)
    (1/20 -1/20 1/20 -1/20 1/20 1/20 1/40 -1/20)
    (1/16 1/16 1/16 1/16 1/8)
    (1/16 1/16 1/8 1/16 1/16)
    (1/20 1/20 1/20 1/20 1/20 -1/20 1/20 -1/20 1/20 -1/20)
    (-1/20 -1/20 1/20 1/20 -1/20 1/20 1/20 1/20 1/20 1/20)
    (-1/20 1/20 -1/20 1/20 1/20 1/20 1/20 1/20 -1/20 1/20)
    (-1/16 1/16 1/16 1/16 -1/8 1/16 -1/16 1/16 1/16 1/16 -1/16)
    (1/12 -1/12 -1/12 1/12 1/12 1/12 1/12 1/12 1/12))

 

OMN example:

 

(make-omn :length (rhythm-series '(1 4 3 2)
                                 '(7 5 7 7) 1/2
                                 :prob '(.4 .6 .7 .1)
                                 :length '(q. e. e s)
                                 :seed 34)
 :pitch (gen-chord3 '((cs4 g4 a5) (c4 gs3 a4)
                      (b5 f5 gs5) (b4 fs4 bb5)
                      (cs5 c6 gs4) (e5 g3 a5))
                    '((6 8 11) (3 5 13) (2 7 11))))
Best wishes,
Janusz

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