Integrating P5js + MaxMSP

Dear Friends

If somebody is interested in integrating p5js sketches with MaxMSP patches here is a simple example and some handy infos: https://www.paweljanicki.jp/projects_maxandp5js_en.html

3 Likes

A simple solution for interfacing “patches” created in MaxMSP/Jitter and “sketches” written in P5*js. The solution uses the [jweb] object from MaxMSP to load P5*js sketch, and for bidirectional communication (messaging and sharing Max dictionaries) between MaxMSP patch holding the [jweb] object with the loaded sketch.

Thank you so much for sharing this!

Also, helpful explanation of using instance mode to avoid a namespace conflict.

So appreciated! Nice to see there are Max users here :smiley: :peace_symbol:

I have slightly updated example project by adding a mechanism to enable/disable background (opaque/transparent switching). So now it is possible to use P5js sketch loaded into MaxMSP [jweb] object as a transparent “layer”. This should make a little bit easier to create your own GUI elements in P5js - you no longer need to adjust the background color of the p5js sketch to the background color of the patch in MaxMSP.

Project’s URL is still the same: https://www.paweljanicki.jp/projects_maxandp5js_en.html

2 Likes

Dear Friends

I have updated MaxAndP5js a bit. I added a second example, showing how to launch (from a jweb object in MaxMSP) a p5js sketch using Vida library for simple motion detection.

1 Like

Thank you so much for sharing this!

Have you considered putting it under open source version control – for example, hosting it on github?

Some people asked about that (mostly about Vida library on Github). Yes, I have such plans, but for now I just don’t have enough time for it - I don’t use GitHub and similar services myself, so I would just have to add one extra “layer” to my workflow.

@yaniki you are my hero! Thank you for sharing so generously!

Thank you very much.

I have to admit, that I did not expect that sharing such a simple (as I thought) idea I will receive such significant feedback from both the P5js and MaxMSP communities.

I have ideas for updates that I will try to introduce later this year. Besides, it’s probably time for GitHub or a similar mechanism :wink:

1 Like

amazing, iv been obsessed with max but some ui elements could be very inspiring.