aboutsummaryrefslogtreecommitdiff
path: root/README
blob: 905666f992963b2f50ffc1df0dd0537517d747f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
###########################################################################
pdj - java plugin interface to pure-data
###########################################################################

RELEASE 0.8.5 / May 2008

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. You can also 
create signal/tilde (~) objects.

This is a work in progress and some of features are missing and some might 
not even be ported.		
	    
IMPLEMENTED:

	* MaxClock 100%
	* MSPBuffer 100%
	* Callback 100%
	* MaxObject 100%
	* Atom 98%
	* MaxSystem 90%
	* MaxQelem 90%
	* MSPObject 90% (missing signal in/outlet detection)
	* MSPPerformable 100%
	* MaxPatcher 5%

LIMITATION:

	* Signal inlets cannot be hot inlets for receiving atom messages.
	  This means that if you create a signal inlet and send an atom
	  to this inlet, pdj won't be able to process it; float or symbol.
	  This looks like a work as designed in pd.

WORKAROUNDS: 

	* on most cases you don't have to put the JVM libs dir to the 
	  LD_LIBRARY_PATH. If you have a UnsatisfiedLinkError, add it 
	  before you start PD. 
	* on some machines, the System.out redirection can crash PD. If
	  it is the case, you can disable it in the pdj.properties file;
	  check the property: pdj.redirect-pdio.
	* you must use pdj pd scheduler if you need to use AWT with OS X. 
	  See below.

REQUIEREMENTS:
	
	* pure-data 0.40.x powerpc/intel/ub
	* java JDK version 1.4.x or better; use 1.5 if you can !
	* works on linux, windows and OS X (10.3 or better)
	
REQUIEREMENTS FOR BUILDING:

	* apache ant 1.6.x or better
	* comes with it's own version of cpptask that has been patched for 
	  linking with GCC/OS X with the -arch argument.
	* c compiler

INSTALLATION:

	* if you are using the source distribution, build it before
	  -> download java sdk from java.sun.com (unless you are using OS X)
	  -> edit file <your platform>-build.properties
	  -> in the root directory of pdj, run 'ant package'
	* the other files of the original binary directory must be in 
	  the same directory
	* double check dist/pdj.properties to be sure that the JAVA 
	  environment parameters are right
	* Use the corresponding build for MacOS 10.3 or 10.4 and greater

USAGE:

	* put your .java file in the /classes directory
	* create a pdj object with the name of the java class; if
	  you have not compiled it before, pdj will do it for you

USING AWT WITH OS X:

	=== THIS ONLY WORKS ON pd 41.x ===

	Unlike Linux or Windows, you cannot just simply fire-up a AWT form on OS X. 
	This is because the event GUI mechanism has these limitation :
 	
	--> A CFRunLoopRun must be park in the main thread before the main loop is 
	    started
	--> Java must be run in a secondary thread.
 
	Since this prerequisite need a pure-data patch, we will write our own pd 
	scheduler. This scheduler will simple fire-up another thread that will 
	run the real pd scheduler (m_mainloop) and park the main thread with a 
	CFRunLoopRun.

	To be able to use the pdj scheduler, you need to apply a patch to pd. (Yes
	there is a bug with the -schedlib option). The patch is available in the 
	directory src/pd_patch/osx_extsched_fix.patch. This patch has been made on 
	a miller's 41.2 pd version.

	Once the patch is applied and compiled, you must configure your pure-data 
	environment to add the option : -schedlib [fullpath of the pdj external 
	without the extension]. Use the menu Pd -> Preference -> Startup to do this.
	Don't forget to click on [Save All Settings].

	Rename the file pdj.pd_darwin to pdj.d_fat since pure-data only search for
	.d_fat extensions.

	Be careful when you configure this switch since it can crash PD on startup. 
	If you do have the problem; you will have to delete all pd-preferences by 
	deleting file: ~/Library/Preferences/org.puredata.pd.plist
	
	If the scheduler is loaded, you should have this pd message :
		'pdj: using pdj scheduler for Java AWT'

CHANGELOG:

	--- VERSION 0.8.5 ---
	* added com.cycling74.net package
	* support for the pd-extended auto-build, slowly pdj will be part of pd-extended
	* can now be build with mingw on windows
	* FIXED: sending un-initialized array crash pure-data
	* FIXED: MaxObject reflection with java 1.5 caused an RMI/IIOP error
	* FIXED: Callback reflection with java 1.5 caused IllegalArgumentException
	* FIXED: OS X 10.3 support

	--- VERSION 0.8.4 ---
	* amd64 for Linux (thanks to Sergio Torres-Perez)
	* getInlets() starts at 0 not 1 (thanks to MiS)
	* OS X gets pdj path by it's library path
	* OS X powerpc/intel distribution
	* added a user guide
	* FIXED: AWT usage on OS X

	--- VERSION 0.8.3 ---
	* Atom.getInt() on a float now works.
	* corrected some classpath definition issues with windows
	* bypass the java compilation with pdj.compiler=null
	* remove dependencies task for cpptasks.jar (now part of distribution)
	* FIXED: comment on property pdj.vm_args failed to initialize VM

	--- VERSION 0.8.2 ---
	* if javac is set, using the javac compiler from the JAVA_HOME first
	* optimization (main thread JVM and symbol method resolution)
	* FIXED: using pdj.classpath with directories
	* FIXED: search path on file in the current directory
	* FIXED: leak with open_path and casting warnings
	* build for Intel Mac
	* getting better at attribute support
	
	--- VERSION 0.8.1 ---
	* added MaxPatcher object to get patch path
	* FIXED: to match mxj: method with args[] will always be called first

	--- VERSION 0.8 ---
	* pdj~ object support (MSPSignal/MSPObject/MSPPerformable)
	* The JVM can now be server or in client mode (windows/linux only)
	* JVM selection for OS X
	* FIXED: working jikes compiler on OS X
	* FIXED: declareIO inlets count
	* FIXED: windows: System.out CR/LF errors on the PD console
    
	--- VERSION 0.7.1 ---
	* OS X support with distribution
	* FIXED: MaxSystem.locateFile now works

	--- VERSION 0.7 ---
	* Better JVM resolution on win32 (eg: with the registry)
	* Full implementation of MSPBuffer
	* Added Atom methods with unit tests
	* Windows binaries distribution
	* FIXED: now filtering { and } with post() not to lock PD
	* FIXED: anything gets called on a undefined bang/float/list method
	* FIXED: defined inlet(int) without inlet(float) now works... :-\
	
	--- VERSION 0.6.1 ---
	* FIXED: outlet(Atom) and outlet(Atom[]) resolution error

	--- VERSION 0.6 ---
	* MaxObject constructor with arguments
	* partial attribute support; automatic field setter/getter
	* added method bail on MaxObject
	* strict declaration of inlets/outlets (with info outlet)
	* System.out and System.err linked to the pd console
	* outlet(atom[]) checks type before calling the right func.

	--- VERSION 0.5 ---
	* method inlet resolution (bang->float->list->anything) now works
	* windows support (preliminary support)
	* auto-compiling class of every .java in /class (max -1; pdj +1)

	--- VERSION 0.4 ---
	* more javadoc and documentation... but could be better
	* multiple inlet operations
	* loadbang now works
	
	--- VERSION 0.3 ---
	* added a small and cheap javadoc. the original MXJ should be the
	  reference.
	* partial MSPBuffer support
	* Atom and MaxObject now supports Atom arrays
	
	--- VERSION 0.2 ---
	* added classpath of $PDJ_HOME/classes and $PDJ_HOME/lib/* by default
	* 95 % Dynamic JVM resolution with the JAVA_HOME; via dlsym (see BUGS)
	* MaxSystem.deferLow(...) works ! :-\
	* added an help patch

THANKS:

	* Sergio Torres-Perez
	* Thomas Grill
	* Michal Seta
	* patrick a 11h11
	* pd-mtl crew !

(c) Pascal Gauthier 2004-2008, under BSD like license
asb2m10@users.sourceforge.net