Hi,
I want to pipe my sketches to
Syphon using the
syphon processing library. This works reliably from processing and is as simple as importing the library and running a function at the end of
draw(). I succeed in in importing the library in clojure/quil, but then I'm stuck. How do i create the "server object", how can I call it?
not a total clojure noob, but close enough I guess :)
this is the part that does not crash
I added the libs in the projects resources folder and added:
:resource-paths [
"Syphon/library/jsyphon.jar"
"Syphon/library/libJSyphon.jnilib"
"Syphon/library/Syphon.framework"
"Syphon/library/Syphon.jar"
]
to my project.clj
in my namespace I can use
(:import [codeanticode.syphon])
which loads fine. but from thenn on, I'm stuck, I have no idea on how to implement the three other lines of required code :/
SyphonServer server;
in the setup routine:
server = new SyphonServer(this, "Processing Syphon");
in the draw routine:
server.sendScreen();
So this code from processing
import codeanticode.syphon.*;
SyphonServer server;
void setup() {
size(400,400, P3D);
// Create syhpon server to send frames out.
server = new SyphonServer(this, "Processing Syphon");
}
void draw() {
background(127);
lights();
translate(width/2, height/2);
rotateX(frameCount * 0.01);
rotateY(frameCount * 0.01);
box(150);
server.sendScreen();
}
works fine.
can this be done in quil?
thanks
Kasper