Random Pattern Question

    Feb 06 2014 | 3:20 am
    I'm trying to duplicate the pattern system in Common Music in Max and I'm stumped with "heap" which is described: 'Generates random permutations of its elements'
    It basically takes a list shuffles it around then outputs the list, then shuffles it again then outputs for as many items output as I'd like.
    For instance: given this list '(a4 b c5 d) (next pat1 #t) ⇒ (69 72 74 71) (next pat1 #t) ⇒ (72 74 71 69) (next pat1 #t) ⇒ (72 71 69 74) (next pat1 #t) ⇒ (71 69 74 72)
    My problem is going from Lisp where you calculate stuff to Max and needing to generate realtime or maybe I'm approaching this wrong. I probably need to sleep...Thanks for any advice.

    • Feb 06 2014 | 6:26 am
      Spend some time with the zl objects. For instance [zl.scramble] and [zl.rot]. Lots there to help you with list processing.
    • Feb 06 2014 | 8:07 am
      Max Patcher
      In Max, select New From Clipboard.
    • Feb 06 2014 | 2:26 pm
      Thanks guys, just needed a point in the right direction, appreciate...
      Man that was almost TOO easy, I was way over-thinking that one...embarrassing.