RST Posted July 27 Share Posted July 27 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): When written to the variable "out" using omn-to-measure the result is the following: 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): Which outputs to "out2" as follows: I am hoping someone can enlighten me as to my mistakes with the first code fragment. With thanks! Quote Link to comment Share on other sites More sharing options...
opmo Posted July 28 Share Posted July 28 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))) RST 1 Quote Link to comment Share on other sites More sharing options...
RST Posted July 29 Author Share Posted July 29 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.