Is it possible to move image pixels in Processing?

Hello, I am new to Processing!
I just started self-studying Processing to visualize my idea.
My final goal is to create a video that shows an image reacts to the sound. In the video, the image pixels that are located on the top move to the bottom by reacting to the sound. Like the image is melting.

Sample)Red block building (2019) - YouTube

As I am a real beginner, I am trying to study with examples but it is so vague for me to find a way. It would be very helpful if I could get some bits of help here. Lastly, I would like to know your thoughts about the possibility of this idea.

Thank you.

1 Like

Hi @probeginner! The short answer to your question is, yes. It is possible. :sunglasses: :crazy_face:

The longer more detailed answer would entail going through these great tutorials that explain how Audio and Pixel/Image manipulation work in Processing:

Pixels

Sound

I would suggest attacking the problem one item at a time: Learn how pixels work; Recreate some of the example sketches with Pixel manipulation; Start modifying those sketches to do some different things you think up; Make your own sketch that does the melting picture thing without audio. Then go through the same process for the Sound library. Then incorporate the two. It’ll probably take a bit of time and work, but the payoff will be great.

As for ideas on how to do what you’re thinking, you’ll possibly need to get the pixels of an image, have a way to store each vertical column of pixels, modify the column, and then replace the original with the columns. The exact implementation of it would be for you to figure out. And after you better understand how Pixels and Sound work, you might come up with a better/easier technique than i did. There’s a lot of different ways to accomplish the same thing!

1 Like

Thank you so much for your reply!

1 Like