Jump to content

Self-similar melodies


Recommended Posts

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

Link to comment
Share on other sites

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))

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy