Processing vs p5.js


#1

I asked Mr Bomb about this, but can someone weigh in on which is better for interfacing with Sonic Pi. I’m especially interesting in creating generative art with processing/p5.js based on midi/osc received from SP.

Extra caveat – I’m planning on teaching this in 8th grade classes, so what might work for us as adults may not work for students.

TIA!
Bob Irving
Charleson, SC


#2

I’m not an expert on either if these, but I have tried both of them with some success.
My impression is that processing is easier to set up and get going with SP.
p5.js was trickier to get going but did give good results. I think because of the trickier setup that processing would be a better place to start with your students.

two links to my experiments below


#3

Just to weigh in publicly and speak more specifically to your caveat:

Since Processing is a standalone program, I assume it doesn’t require additional libraries beyond an OSC library to get SPi communicating with it. p5.js is meant to work within a browser, so you need to install node.js, do some command line stuff to set it all up and run it in the browser. (point - Processing)

With that said, you would need to install Processing on every computer you intend to use it on, whereas p5.js has a web editor (https://editor.p5js.org/) that is easily accessible with an internet connection. This would also allow students to access their work outside of the classroom if they wanted as well as share projects that they have made by simply sending a link to someone… (point - p5.js)

I think the choice really depends on your classroom setup, the amount of time you have and how receptive your students are to the initial setup process prior to actual creating something.


#4

Thanks for weighing in. I’m also looking at my familiarity with the language(s) as an important consideration. I’ve spent some time in the last week doing some tutorials in both Processing and p5.js and the former makes more sense to me at this point.

That translates into me being able to help the students more, which is kinda the point! I’m sure that I can learn p5.js and so perhaps that’s something to integrate further down the road.

My setup in my classroom is pretty flexible. 22 Win10 machines and 22 Raspberry Pi’s. I can install whatever I need on either platform, so the web-basedness of p5.js isn’t a plus for me.

Thanks to you and Robin for weighing in and all the thoughtful advice!
Bob


#5

Do let us know how it goes! :slight_smile:


#6

Will do!

Right now I’m developing my skills in both tracks: visuals(Processing) and music(SonicPi). My ultimate goal is to integrate the two and have the music generate visuals live. From there… well, I just snagged a Kinect camera and I hope to someday have the code(s) respond to visual input. Very ambitious (probably too ambitious!), but I love the challenge and feel that this whole art/music/code thing is where I feel most comfortable. Thanks to Sam for his inspiration!