Jump to content

Featured Replies

Posted

Greetings:

I present two code fragments:

 

(setf val 256)
(setf mat1 (sieve-tree 8 2 5 :rnd-order NIL))
(setf stream (make-omn
:length mat1
:pitch '(c4)))
(setf out (omn-to-measure stream '(4/4)))

 

This evaluates to:

(q c4 mf c4 3h 3q_3q 3h q_3q 3h 3h 3q_7q 7h. 7h. q_3q 3h_3h 3q_3q 3h 7h. 7h. 7q_3q e 3e_5q 5w_7q 7h 7h 7h q_3q 3h_3h 3q_7w 7h._7h. 7w_3q 3h 3h 3q_7q 7h. 7h. 7h. 7h. 7q_e. s. s s s._7w 7h._7h. 7h. 7q_7h 7h 7h 7q_5q 5h. 5q 3e 3e 3q 3q)

 

Here is the OMN stream (stream):
image.png.2e2dfa85cb7f23f79819e2cbc479ab0f.png

When written to the variable "out" using omn-to-measure the result is the following:

image.png.f64990e7b4948ffcd7086fe51be3fc46.png

 

 

Here is another code fragment:


(setf mat2 (flatten (gen-loop 8 (gen-tuplet 1 3 'd 'n 'q '(5 3 4) :times 2 :omn t :seed val))))
(setf stream2 (make-omn
:length mat2
:pitch '(c4)))
(setf out2 (omn-to-measure stream2 '(3/4)))

This produces the OMN stream (stream2):

image.png.e9d7d7ee89067a6858fedbbcdd10ac0a.png

Which outputs to "out2" as follows:

image.png.e55fec477deab799f0984e633eccf0b7.png

 

 

I am  hoping someone can enlighten me as to my mistakes with the first code fragment.

With thanks!

  • RST changed the title to onn-to-measure question

Use alway quantize function with complex lengths:
 

(setf val 256)
(setf mat1 (sieve-tree 8 2 5 :rnd-order nil))
(setf stream (make-omn :length mat1 :pitch '(c4)))
(setf out (quantize (omn-to-measure stream '(4/4)) '(1 2 3 4 5 7 8)))

 

  • Author

So helpful!  Thank you!

 

The third line of code creates a notation with 4/4 measures throughout.

 

The final line of code produces a 31/32 measure at the end.  Probably due to the fact that the mat1 call does not create an "even" number of events.

image.png.8f212f0359b5e9fdcfefa58217b713da.png

 

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