PDJ enables you to write java code to interact with pure-data objects. The API is totally based on Cycling74 Max/MSP 'mxj' object implementation. This will enable java mxj objects to run on pure-data with pdj.
This is a work in progress and some features are missing and some might not even be ported. I am trying to do my best to release soon and often! If you find any bugs feel free to contact me.
On the I/O level it is. Anything that deals on receiving/sending atoms will try to match extact mxj behavior. Off course, mxj is acting like a reference implementation. The API complience is based on Max/MSP 4.5.5 with MSP signal support.
This overview :
import com.cycling74.max.*;Looks like this:
public class help_class extends MaxObject {
public help_class() {
declareOutlets(new int[] { DataTypes.FLOAT, DataTypes.ALL });
}
public void inlet(float x) {
outlet(0, x);
}
public void bang() {
outlet(1, "BANG! received");
}
public void callme(Atom args[]) {
outlet(1, "callme has called with arg1:" + args[0].toString());
}
public void dynamic_method() {
outlet(1, "dynamic_method has been called");
}
}
Please see the javadoc for more information.
Edit your .java in the /classes directory (in the pdj home) with your favorite editor. Type the name of the .java file (without the extension) into the pdj object argument. If pdj finds out that the .java is younger than the .class, pdj will compile it for you.
Download latest release here: pdj-0.8.4.tar.gz / pdj-0.8.4-win32.zip / pdj-0.8.4-osx.zip (March 2008)
Documentation: pdj.pdf
Contact: asb2m10 .at. users.sourceforge.net