Posted May 24, 20178 yr 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
May 24, 20178 yr 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))
Create an account or sign in to comment