AlainJamot Posted May 24, 2017 Share Posted May 24, 2017 Hi, is there any function in OPMOD implementing self-similar algorithm, like those used by Tom Johnson in his great book "Self-Similar Melodies" ? http://repmus.ircam.fr/_media/mamux/saisons/saison06-2006-2007/johnson-2006-10-14.pdf http://www.algorithmiccomposer.com/2011/06/tom-johnsons-self-similar-melodies.html I'm sure they are hidden in the menus... :-) but where ? Alain hujairi 1 Quote Link to comment Share on other sites More sharing options...
opmo Posted May 24, 2017 Share Posted May 24, 2017 There are endless possibilities: Example 1 (let* ((l '(0 1 -1 0)) (r l)) (loop repeat 3 collect (x+b l (car (setf r (gen-rotate -1 r)))) into bag finally (return (append (list l) bag)))) => ((0 1 -1 0) (1 2 0 1) (-1 0 -2 -1) (0 1 -1 0)) Example 2 (gen-eval 4 '(x+b (rnd-order '(0 1 -1 0)) (rnd-pick '(0 1 -1 0)))) => ((0 0 1 -1) (-1 -2 0 -1) (1 2 0 1) (-1 0 -2 -1)) Example 3 (progn (setf l '(0 1 -1 0)) (gen-eval 4 '(setf l (x+b (rnd-order l) (rnd-pick '(0 1 -1 0)))))) => ((1 0 2 1) (2 3 2 1) (1 0 1 2) (1 0 2 1)) lviklund and hujairi 2 Quote Link to comment Share on other sites More sharing options...
AlainJamot Posted May 24, 2017 Author Share Posted May 24, 2017 Wow, a lot of possibilities, indeed... ! 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.