Archive for October, 2016

p5js – 2

We have moved on to combining for loops and arrays in p5js. This is a quick way to multiply a ton of objects and get them animated. I’m kind of understanding the basic idea, but still cannot seem to build out a sketch without referencing a tutorial or help website. Every animation or function has a glitch and executing what I think are simple functions¬†is taking forever right now. Hopefully I get more fluent with practice. My main issue is that I have conflicting for loops, one will not allow the other to run, and I ¬†have no clue how to fix this. I’m also still trying to clarify how to write conditional statements correctly the first time around.

What you see above is a limited version of what I was trying to accomplish, still kind of fun to look at though. The ellipses are bouncing back and forth as they touch the edges of the canvas, changing color depending on which side they bounce off of. I have a couple growing and shrinking rings that mask the snow globe effect to create a little more visual interest. The rings are supposed to be fading in and out, but I can’t get the “if” statement to work as of yet.

I’m hoping to get this syntax down quickly, because I’m thinking of incorporating a looping p5js animation into my final Sonic Arts sound installation. It would be really nice to have a projected dynamic animation accompanying my sound project, so I’m diving into sound interactivity tutorials with Dan Shiffman. Am I going way in over my head? Probably. Right now I’m looking at amplitude analysis so I can make my animations visually react to a soundtrack.

Mario Pong

Click in the window to play. A and Z keys move the left bar up and down.