Hi,
On Sat, 2 Oct 2021 at 13:05, Jackson <
jackson....@gmail.com> wrote:
> Hi all, I'm still very much a beginner (2 years with Processing) at this, so if this is a silly question my apologies.
Welcome! There are no silly questions, just incomplete documentation! :-)
> A lot of Processing sketches I like require the background() function to be called once during setup(), and never again. This makes anything drawn in the draw() function start to accumulate over time like a long exposure on a camera.
...
> From what I can tell, either the draw() function inherits this behaviour or the output code draws a background every frame before the input is drawn.
This is a deliberate difference between Processing and PraxisLIVE.
Because we support having many different components (nodes), each with
their own "sketches", keeping the background would involve keeping a
copy of the output of every single component. Instead, we recycle
surfaces through the pipeline - the output surface gets reused later
down the pipe.
So, to get the effect you want, you need an input port, and to connect
the output to it as well to create a feedback loop.
Code-wise you want
@In(1) PImage in;
public void draw() {
image(in, 0, 0);
// rest of draw
}
This has lots of additional advantages. You can feedback over
multiple nodes, alter how you render the previous frame (eg. position,
opacity), and add FX nodes in the feedback loop.
> I'm really liking how PraxisLIVE works with Processing code, and I'd like to stick with praxis for my live music - if I can get past this initial hitch.
Good to know! Do share what you make with it. Also, as well as here,
you can get help at
https://gitter.im/praxis-live/support
Best wishes,
Neil