Skip to content

th0ma5w/live-jython-processing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an initial release of some unorganized code.

This is:

1. Jython, Processing, OpenGL, and several Processing libraries compiled into a JAR using Maven.
2. A series of scripts for the Jython interpreter to bootstrap connections to an ActiveMQ or Stomp server
3. Given the queues defined, this running process will wait for Jython code, and execute them interpreter style
4. An example browser based editor that can send commands to the queue through a Stomp connection to ActiveMQ

Some issues:

a. May need some coaxing to get working, specifically you need to get Jython and Processing, ActiveMQ, and Stomp for Python elsewhere
b. You will have to register the JARs with Maven for the mvn commands to work:


Here is how to add Jython:

mvn install:install-file -DgroupId=org.python -DartifactId=jython -Dversion=2.5.2b1 -Dpackaging=jar -Dfile=jython.jar

Here is how to add Processing:

mvn install:install-file -DgroupId=org.processing -DartifactId=processing-core -Dversion=0135-BETA -Dpackaging=jar -Dfile=core.jar

Here is an example of how to add a specific Processing library JAR:

mvn install:install-file -DgroupId=keystone -DartifactId=keystone -Dversion=1 -Dpackaging=jar -Dfile=keystone.jar


c. Jython and Jython Libs folder have to be in the correct place.
... When I would run the jar that Maven puts in the work/ path, I had the Lib folder in there, and Jython seemed to find it. I guess this isn't technically required, but having the standard Python library is rather helpful for most things.

d. OpenGL requires LD_LIBRARY_PATH to point to the location of the platform binary libraries


Changes from traditional Processing:

1. Draw actually executes all functions contained in a Jython list called "drawlist" ... simply mix in and out functions to be called, in order, and looped, in this list. This is trade off of various techniques, and I think exposes the functional styling of Python.

2. The display is always in Present mode on each machine you run it on

3. Where Processing overrides things in Java style where a function and a variable can be named the same depending on their strongly typed definition, these things have been renamed, and are listed as some of the first commands in Display.java. For instance, frameRate is a Jython function, but the current frame rate is always in the variable currentFrameRate. See Display.java for more info.

4. Synchronization of running code is surprisingly fast over many machines, with minimal delays, but performance feedback is also welcome.



Best of luck! Contributions very welcome.

https://github.com/th0ma5w/live-jython-processing


About

a minimalistic setup for message queue driven live coding with processing libs and jython

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published