tracking pixels in a matrix and output as individual numbers or list


    Mar 01 2008 | 7:00 pm
    I have a matrix, where pixels change. Active state is white, inactive is black. I want to output a list of the active pixels, so the coordinates of every pixel. Then I want these pixels to be connected to a pitch. the jit.iter is almost what I want but I only get the last pixel (ok, the rest to, but I can't put them in a list). In short, my matrix is connected to jit.iter and that is connected to the unpacks. However, how can I make a decent list of the active pixels that is easy to read?

    • Mar 01 2008 | 9:14 pm
      one possible way...
    • Mar 01 2008 | 11:27 pm
      Almost, but I have 1200 pixels to unravel (a matrix of 40X30) and the unpack doesnt take that much outlets. What should I do?
    • Mar 01 2008 | 11:36 pm
      What are you trying to do with this list. I would strongly advise against using lists. You should keep everything in the matrix domain if possible. If you're going to audio, you could use jit.buffer~, jit.peek~ etc.
      wes
      On Sat, Mar 1, 2008 at 3:27 PM, Samuel Van Ransbeeck wrote: > > Almost, but I have 1200 pixels to unravel (a matrix of 40X30) and the unpack doesnt take that much outlets. What should I do? > > >
    • Mar 01 2008 | 11:42 pm
      entirely depends on what you're trying to do. if you need to keep the cell coord info, i would use jit.iter, otherwise, you can stick a normal iter after the jit.spill. each cell value comes through, sel 255 will send a bang if it's "active" and you can send that bang wherever you want.
      or if you need to process the whole list in some way, look at the zl object or the listops objects.
      if you just want to see the state of your matrix, hook it up to a jit.cellblock, couldn't be easier.
      -rob
    • Mar 01 2008 | 11:52 pm
    • Mar 02 2008 | 3:01 am
      > Then I want these pixels to be connected to a pitch
      what do you mean by "connected to a pitch"?
      here's another way (when there are dozens) -a coll to store -jit.3m middle outlet to find the percentage.
      next time you should start by posting a patch because your request is really not clear... nobody here has the slightest idea about what you finally want to achieve. my guess is that the rest of your process contains the major problem.
      one last advise, try to take it easy on the unpacks.
      //yac
    • Mar 02 2008 | 3:07 am
      Here goes the conway patch. I want to know which pixel is alive and from every pixel alive i want it to sent a bang (if then ...) to a makenoteobject. For that I need to output the coordinates of every pixel and its state. Most important is too know which cells are alive, and this in an automated way. I have written algorhitmic music once withdoing all the calculations and so by hand. I really want to avoid doing that again
    • Mar 02 2008 | 3:14 am
      anyway, your solution seems to work good enough for now. I will be using this printed list to get my notes. Would it be possible to export the printed text in the max window to an excellsheet or so, then I can look easier which notes are common in every change of generation.
    • Mar 02 2008 | 1:28 pm
      the [print] was only there to illustrate. if you don't know about the [coll] I strongly recommend you spend some time reading its help file and especially the read, write & dump messages.
      anyways, I m out of this thread, good luck!
      //yac
      > > anyway, your solution seems to work good enough for now. I will be > using this printed list to get my notes. Would it be possible to > export the printed text in the max window to an excellsheet or so, > then I can look easier which notes are common in every change of > generation.