Live programming

so, I’m the kind of person who likes to test their program and edit it while doing so and i was wondering if Processing has a live programming option, where it will run the program and you can change the code and when the cod changes the run screen updates but doesn’t reopen it’s self. Is this a thing or am I making a suggestion right now?

It does not have such a mode.

Processing has a Tweak Mode:
https://funprogramming.org/139-Tweak-values-while-a-program-runs.html

:slight_smile:

2 Likes

Check out PraxisLIVE! It’s a general purpose Java live programming environment which supports Processing out of the box.

See it in action here - https://youtu.be/3cQ-8wZwsmY?t=485

1 Like

I checked it out and can’t get it to work right and don’t feel like trying o learn another language right now. So I guess now I’m suggesting that a developer for processing maybe add this feature. It would be very nice to have I feel. Kind regards.

It’s Java. Besides a couple of quirky (and annoying) syntax additions, Processing is exactly the same language.

The IDE works quite differently, but happy to talk you through getting to a live-codeable sketch.

  1. Right-click in the Projects tab and select New Project. Give it a name (eg. MyProject) and leave everything else as defaults
  2. Right-click on the MyProject node that appears in the Projects tab and select New > Video Patch. A graph will appear with an output node.
  3. Press the play button on the video patch and a blank sketch will appear.
  4. Right-click on the graph editor and add a Processing node video:gl > p2d or p3d. Choose the default name, and connect this node to the output.
  5. Right-click the new node and select Edit Code. A code editor will appear with empty setup() and draw() methods. Code something, and every time you hit Save (CTRL-S) the sketch will update.
  6. Click the red circular arrow (Restart Hub) when you’re done, and make sure to save everything if you want to keep it.

Want to take it further, jump on our support chat at https://gitter.im/praxis-live/support