Jump to content

Featured Replies

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

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