How do I send only part of sketch with Syphon

This might be a simple job but I've been searching and trying all kind of "simple" solutions but can't manage to send only part of the processing sketch through Syphon.

I have this grid in a sketch:

Screen Shot 2018-03-20 at 7.11.57 PM

I only want to output one of the 4 coloured rectangles at a time according to a conditional statement but I just can't manage.

Tagged:

Answers

  • I don't really know anything about Syphon, but in general you can do stuff like this using PGraphics canvases, which you can create using the createGraphics() function.

  • Hey Kevin, thanks for your reply.

    Yes I've tried something with the createGraphics() but could't manage to select part of the screen as its arguments are only to adjust size.

    Is there a way to copy a chunk of pixels and put them in an image variable?

  • Is there a way to copy a chunk of pixels and put them in an image variable?

    Sure. You're looking for the get() or copy() functions.

  • edited March 2018

    Thanks for your direction Kevin.

  • edited March 2018

    Haha I just researched a bit both, thanks for the tip.

    I just added extra space in the sketch to have room where to paste the copied pixels at the bottom of the sketch and managed to work around what I needed like this.

    I'm sending the Syphon screen to Resolume, than in advanced setting I'm mapping the bottom copied section only with the screen chunk I originally needed.

Sign In or Register to comment.