making a mosaic with jitter or gem

stefane's icon

Hello, I did a mosaic made out of 256 squares... Each squares should be totaly independent in color and in resizing.
I did it with the Gem librairie in Max, because it was much easier for me.
The big problem is the heavyness of my project. My machine is exploding!
I m pluging an arduino with a sensor in it.
This sensor is supposed to change the colors and the size of each squares of the mosaic...

Somebody could help me
I cannot send my patch here it's too heavy...1,9mb
If you need it to understand I can send it to you by mail.

my machine is mac book pro 2.6ghz and I use max 4.6

thanx and please help me!!!

Jean-Francois Charles's icon

If it's a patch using GEM, you may have more luck on a PD forum, or even ask on the Max/MSP list. But hopefully someone here can help you as well.
J-F

Zachary Seldess's icon

poly~ or jit.gl.multiple are your friends for this kind of thing. Here's something simple to get you started. It's super light. If you don't know how to control each instance inside of the poly~ independantly, read a bit about it in the docs, then post back here with questions/problems.

best,
Zachary

----------

Main patch - save as whatever name:

Max Patch
Copy patch and select New From Clipboard in Max.

save this as mosaic_grid.pat -

Max Patch
Copy patch and select New From Clipboard in Max.

stefane's icon

Hello and thanx a lot for your answer. poly is a very nice object and I find how it works.
But I have 2 problems ... :
First is when you want to change in real time the color (for instance) of 256 squares... the framerate goes to 50 ips to 4 ips !!!!
and the variation is the same for the 256 squares... Imagine if it was a different varaition...

My second is how to make two different variation for two different square in real time. I m using the message target to assign a preset on one square but how to do it if I want a different variation on the two squares???

thank you for your answer

here s my patch :

Max Patch
Copy patch and select New From Clipboard in Max.

and

Max Patch
Copy patch and select New From Clipboard in Max.


Jean-Francois Charles's icon

petahertz wrote on Thu, 26 March 2009 09:12Hello
My second is how to make two different variation for two different square in real time. I m using the message target to assign a preset on one square but how to do it if I want a different variation on the two squares???

To make different variations for the different squares, you can either talk to different poly voices, using "target" message, or change the poly sub-patch to make it variable. For instance, if you incorporate some random process inside the poly voice, you will have different results for each voice.
By the way, whether you have a similar or a different process for each voice shouldn't influence the rate (fps).
Also, do you have a multicore? You could take advantage of running the poly~ voices on different cores (Max 5 only).
Jean-François.

Dg's icon

You could probably do something with this?

Max Patch
Copy patch and select New From Clipboard in Max.

stefane's icon

Thank you
The second patch is much too complicated for me with all the expressions of Jitter... So I will not be able to organize my grid as I need...
I need a simple grid (see the attached file)
And then I just downloaded the max 5 maybe to buy it : to work with two cores is it parallel procesing in the info windows?
thanx

Dg's icon

Don't know if I should do that, but just for fun. See the patch below. You have to set the colors ...

> I just downloaded the max 5 maybe to buy it

Yes! of course, own it!

stefane's icon

You can't imagine how much you helped me!
i made a lot of bad testing!! and you did it and it's perfect.... Thanx now I can study the bases of jitter expression because I understand what is doing what...

Thanx a lot
retake7
Petahertz

Dg's icon

Folk here helped me so many times when I was reaching a stalemate.
Great is this forum ... and this software