All posts by /r/processing

Communication from Processing to MAX

Hey everyone!

I'm doing a school project and I'm using Processing, MSP/MAX and Arduino. I've already figured it out how to to the communication between Arduino and Processing (I'm using serial), but I'm finding a bit hard to find out how to to the communication from Processing to MSP/MAX.

If it helps, here's a bit of what's suppose to happen. In the Arduino, the user controls the movement of a certain picture (which is in Processing). While the picture is moving, MAX/MSP plays a sound. When the picture stops moving, the sound stops.

Thanks in advance!

submitted by /u/daizeline
[link] [comments]

Help please! Doing the reverse?

Hi there, I am very new to processing. Does anyone know how I can get this triangle to do the reverse after this code is run? I basically want it to go back and forth from triangle to line at that exact speed. I thought that draw was to loop but I just can't get it :( this is what I have so far:

float X1 = 100;

float X2 = 25;

float diffX;

float diffY;

float speed = 0.05;

void setup()




void animateDraw()




diffX = X1 - X2;

X1 = X1 - diffX * speed;


void draw()




Thanks so much!

submitted by /u/pbchocochipcheerios
[link] [comments]

Turning an old laptop into a dedicated machine to run processing sketches to a monitor on my wall?

I want to create a psuedo art installation which will basically be a monitor on my wall constantly running whatever processing sketch I've loaded. Is this possible? Will there be problems with lag after running a sketch for an extended period of time? Any tips or related ideas for a project like this? I don't really know what I'm doing so all comments are appreciated

submitted by /u/Krysos_
[link] [comments]

My hearts are broke )=

Super edit: I fixed it. I hate everything just to make sure I just added and extra vertex at where it should end and where the function should be already plotting a vertex just to be safe. Turns out that was it just adding another point manually at the end point where I know it should be fixes it. I don't know why it wasn't being plotted there before but just adding vertex(-this.radius*2,0); fixed it. I hate custom shapes in processing and want to die.

The custom heart shape I made has some aliasing/not connecting/it looks bad problems. I commented the code before posting so hopefully you can parse it the relevant code is probably in draw(rate){ in the Heart class at the bottom.

It seems to me that either the aliasing is wrong (idk about rendering) or my shapes just aren't connecting properly. Note: The two functions I defined for the heart are from The second post by annonymous or just look at this.

The modifications I made to the heart to fix it for variable sizes do line up in desmos. You can test it by multiplying the functions by size/radius and diving the input by size/radius. Those are the changes I made and it does work in desmos in that they always line up exactly as can be seen here:

With the R slider

Edit: noSmooth() and smooth() look the same.

submitted by /u/CthulhuLies
[link] [comments]