Fading matrix to black

    Apr 14 2011 | 5:40 pm
    I would like to fade a matrix with a dynamicly created content slowly to black. I've made an example maxpatch attached at the end of this post that shows how it should work.
    Every click on the button "create square" creates a white square in the pwindow. The matrix should fade by and by to black, so the white squares can have different grey values whenever the user clicked on the button.
    I'm trying since hours how this could be made. I thought about recursively methods but you can't make
    recursively loops in Max without creating an error. I've also tried to use jit.op somehow, but with no success. Perhaps there's an easy way to do this. But unfortunately I have no idea.
    It would be great if anyone can give me a tip. Many thanks in advance.

    • Apr 14 2011 | 8:41 pm
      you need to use feedback with jit.op. take a look:
    • Apr 15 2011 | 10:25 am
      Hi Robert!
      Thank you very much. Exactly what I needed.
    • May 16 2011 | 10:03 am
      I need to achieve something quite similar to this.
      I have a 10x10 video that i use to drive a 10x10 led matrix. All i need to do is : each time you have a pixel that goes to "ON" (let's say, value = 100, or 255 if you prefer), i'd like it to fade out to black just after it goes to 255, or also have the possibility of doing 0>fade to 255>fade to 0, at a specific (fixed) speed.
      I don't really understand how to use jit.op ....
    • May 17 2011 | 9:08 am
      Ok, a friend helped me to find out that jit.slide @slide_down [ms value] does the trick. Thanks to you Adrien.