We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I think it would be really cool to develop an environment to use Processing for live-coding / performance, but I am not sure how possible this is. With Java processing it seems out of the question but maybe with Python mode or p5.js? I am basically envisioning a use of processing in which the compiler recompiles and updates the output on each iteration of the draw loop, without having to restart. This would require exceptions to avoid breaking on half written modifications to the code. Additions / changes to the code would be compiled in the background and then added to the sketch. TidalCycles and SuperCollider (sound languages) do this: you can recompile snippets of the code which will add / remove / modify what the global output is without stopping it.
This might be completely incompatible with Processing but I thought I would ask if someone could confirm/deny its plausibility before I get too deep in it. Thanks in advance!
Comments
Khan Academy's own spinoff of Processing.JS (Pjs) already provides live-programming:
Other potentially relevant resources:
TweakMode, for live variable parameterization in running PDE sketches:
Current patch-based livecoding environment for Processing (rather than a watch mode paradigm):
An old discussion from Forum One:
A simple tool for livecoding back in Processing v1:
@jeremeydouglass these are really cool! sounds like this project has more or less already been done-- but i wonder if Tweak can be further developed to allow the writing of new code in addition to changing of values?
@jvntf -- I would not that say Processing + live coding has "already been done." Some things have been done, but many others haven't because they are very hard.
As you say, in the Java language there are significant structural barriers to live coding -- see for example discussion here: http://stackoverflow.com/questions/9519384/editing-programs-while-they-are-running-how
Tweak mode was one way of addressing what Java 7 made possible. Livecoding in pure Python might be a bit easier, but Processing.py isn't just running Python -- it is transpiling Python into Java bytecode, so the core Java issue is still there. Some technologies like JRebel make modifying actual Java code on-the-fly easier, but it still might be very hard to do a single "live sketch" interface in the style of projects like Field.
However, if you are interested in node based / patch based live performance environments in general, you should also check out this thread:
I don't know if complete live coding support exists for p5.js, but if doesn't exist, I would recommend creating a system for live coding in it.
In Java, there are way too many structural barriers to allow complete live coding support. Changing a few variables, maybe a few lines of code, but more than that would be impossible in Java, and consequently, Processing and Processing.py
The source for the Khan Academy live editor is available on Github. I would recommend bringing in some of the KA editor features to the new p5.js editor.
THere's also Quil and various extensions of that.