Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
markmarijnissen
markmarijnissen's Profile
2
Posts
3
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Use Processing from WITHIN Max/MSP (or from MATLAB!)
[7 Replies]
15-Jun-2011 05:09 PM
Forum:
Integration and Hardware
The "maxlink" solution creates a connection between Processing and Max/MSP through an UDP connection.
Since MAX/MSP allows you to run Java-code, it is also possible to run Processing sketches directly from within Java.
I have written a simple class that allows you to control and launch Processing sketches from MAX/MSP.
With this class, you can create your own MXJ-objects that can pass data FROM and TO a Processing Sketch.
Benefits are:
- Speed (same JVM, no network!)
- Easier distribution (Processing Sketches can come along with MAX/MSP)
- Easier start-up; no need to start the Processing sketch independently!
Disadvantages are:
- I haven't figured out how to configure the MAX/MSP classpath to allow Processing's OPENGL capabilities....
(currently I only depend on Processings "core.jar")
Download here:
http://markmarijnissen.ruhosting.nl/other/processingmaxmspmatlab.zip
Examples are included, as well as instructions on how to set MAX/MSP's classpath to run Processing.
PS. The class also works in Matlab!
PS2: If anybody can get the OPENGL running, that would be great!
PS3: Does anybody know the best place to share this? I think it's usefull for a lot of people! (I also posted it on Matlab's File Exchange)
Quick question: How to destroy a PApplet without terminating the entire JVM?
[4 Replies]
14-Jun-2011 07:15 PM
Forum:
Integration and Hardware
I launch processing sketches from MAX/MSP & Matlab.
To do this, I instantiate a Frame (AWT) and add the PApplet as a component.
Then I init() and start() the applet, make the frame visible, and do a redraw().
Now - how do I destroy the PApplet?
Calling destory() calls stop() which calls exit at some point and terminates MAX/MSP or Matlab.
There these other methods like dispose() and delete() - but I have no clue what they are doing.
Please help me out, as I might be creating and destroying a lots of processing sketches!
Thanks!
public static void show(PApplet aSketch)
{
sketch = aSketch;
frame = new Frame(sketch.toString());
/* do layout stuff */
frame.add(sketch);
/* do frame stuff */
frame.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent we){
frame.dispose();
frame = null;
/* HOW TO DESTROY THE SKETCH HERE??? */
}
});
//initialize applet, start everything...
sketch.init();
sketch.start();
frame.setVisible(true);
sketch.redraw();
}
«Prev
Next »
Moderate user : markmarijnissen
Forum