Jump to content

Featured Replies

Posted

Hello, I am Tamas and kind of new in Opusmodus, but learning pretty quickly. It is probably in easy case but I'm stuck at the moment:

I ha a rising c major scale, and then I always want to swap only 2 pitches at a time from the scale. At the next evaluation I want to repeat the same process but already with the previously processed new scale. Is there any way to automate this process because I only came up with this idea which is I am sure the most beginner solution 🙂 

 

(setf scale '(c3 d3 e3 f3 g3 a3 b3))

(setf first (position-swap (rnd-sample 2 '(0 1 2 3 4 5 6) :norep t) scale))
(setf second (position-swap (rnd-sample 2 '(0 1 2 3 4 5 6) :norep t) first))
(setf third (position-swap (rnd-sample 2 '(0 1 2 3 4 5 6) :norep t) second))
(setf fourth (position-swap (rnd-sample 2 '(0 1 2 3 4 5 6) :norep t) third))

(list first second third fourth)

 

Thank you all in advance! 

All the best, Tamas

With :seq set to T you will get what you are looking for:

 

(setf scale '(c3 d3 e3 f3 g3 a3 b3))

(setf pos (gen-loop 4 (rnd-sample 2 '(0 1 2 3 4 5 6) :norep t)))
=> ((6 0) (0 4) (5 4) (0 2))

(position-swap pos scale :seq t)
=> ((e3 d3 c3 f3 g3 a3 b3)
    (e3 d3 g3 f3 c3 a3 b3)
    (e3 b3 g3 f3 c3 a3 d3)
    (c3 b3 g3 f3 e3 a3 d3))

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