d3cod3/ofxPdExternals

Does it run with current OF and ofxPd (with Linux / Ubuntu)?

Opened this issue · 4 comments

Hey @d3cod3,
Does it run with current OF and ofxPd (with Linux / Ubuntu)?
Because I tried it without success (also not with the doc on the ofxPd git page). ofxPd runs well. Do you have an example that uses your external maybe?
Would be great to use ofxPd with externals (or in my case the [seq] object from cyclone).

Hi, i've tested it lately on ubuntu 20.04 and OF 11.0 and it was working fine, i suppose OF11.2 will be the same. You can check some code in the Mosaic pd source code here:

https://github.com/d3cod3/ofxVisualProgramming/blob/master/src/objects/sound/PDPatch.cpp

but basically you just need to:

include the addon:

#include "ofxPd.h"
#include "ofxPdExternals.h"

init the externals after pd.init, specifying the folder where you store your pd externals:

pd.init(4,4,sampleRate,bufferSize/ofxPd::blockSize(),false);
pd.addToSearchPath("YOUR_PATH_TO_EXTERNAL_FOLDER");
cyclone_setup();
zexy_setup();

And that's it

I hope it helps!

Thank you for your help. I forgot pd.addToSearchPath("YOUR_PATH_TO_EXTERNAL_FOLDER"); Zexy is working now, but somehow no luck with cyclone (it compiles but the objects are not recognized in PD).

That should probably be related with the cyclone lib version and the external you have downloaded, the ofxPDExternals comes now with cyclone lib 0.5-4, so the external loaded in your machine must coincide.
I just check and the last release is the 0.6-0, so you'll need to download this:

https://github.com/porres/pd-cyclone/releases/tag/cyclone_0.5-4

Anyway, thanks for remind me, i'll update the cyclone lib to the last release soon!

Not sure if I still make something wrong, because it works a little different for me, but it works now.
For zexy its the same as you described: zexy_setup().
For cyclone and else it works for single objects, for example:
seq_setup(); for [seq] in ofApp.cpp and ofxPdExternals.h.
Also there are some duplicate definitions in else and cyclone,
so it seems better to choose one.
Somehow it also works without pd.addToSearchPath("YOUR_PATH_TO_EXTERNAL_FOLDER");, but maybe that is, because my externals folder is in the src folder from the project.