I'm having some trouble trying to load zexy and iemlib into Pd Vanilla 0.46-7. I had no problems compiling and installing cyclone from https://github.com/electrickery/pd-cyclone. It works fine. So I tried installing iemlib and zexy from https://github.com/iem-projects/pd-iem using their binaries but there's something wrong going on. When I turn on "verbose" under path preferences, PD seems to be looking for a file with the same name as the object I'm trying to use. Using [zexy/multiplex] in a patch gives:
tried ~/Library/Pd/zexy/multiplex.d_fat and failed
tried ~/Library/Pd/zexy/multiplex.pd_darwin and failed
tried ~/Library/Pd/zexy/multiplex/multiplex.d_fat and failed
But there's no multiplex.d_fat only zexy.d_fat. Same with iemlib, there's no dollarg.d_fat or dollarg.pd_darwin only iem_mp3.d_fat, iem_t3_lib.d_fat, iemlib1.d_fat, and iemlib2.d_fat. I'm guessing these files are where the externals were compiled in.
I tried using deken and iemlib installs the .pd_darwin files but I guess this is an older version(?) and zexy is still installing zexy.d_fat so I can't load its objects.
I also tried loading the lib "zexy/zexy" under startup preferences and it loads ok but then I get messages like:
warning: class 'abs~' overwritten; old one renamed 'abs~_aliased'
and I seem to loose namespace functionality, I can no longer refer to [zexy/multiplex] and need to use only [multiplex], which I guess is the correct behaviour.
How does Pd know how to look for objects on files with different names?
Any advice?
This thread is marked as solved http://forum.pdpatchrepo.info/topic/9677/having-trouble-with-deken-plugin-and-zexy-library-solved and sounds like a similar problem but I haven't been successful.
zexy
is built as a multi-object library, so there is no separate binary for zexy/multiplex
.
As you have correctly guessed, the correct way to load zexy is a whole (either using [declare -lib zexy]
in your patch or adding zexy
to the startup libs (no need to use zexy/zexy
)), and ignore the warning about abs~.
as for how loading works:
[pack]
, Pd will lookup pack in its list of known-objects and use the information found there to actually create the object.[foo]
), then Pd will look for a library named foo (e.g: foo.pd_linux
) and if found, it will "load" it.foo_setup()
in our case)foo
in the list of known objects. if it does, it will create the object.Now the magic is done in the special function, that is called when Pd loads the library: this function's main purpose is to tell Pd about new objects (basically saying: "if somebody asks for object "foo", i can make one or you").
When zexy's special function is loaded, it tells Pd about all zexy objects (including multiplex
), so after Pd has loaded zexy, it knows how to create the [multiplex]
object.
If the special function registers an object that Pd already knows about (e.g. in the case of zexy it tries to register a new object abs~
even though Pd already has a built-in object of the same name), then Pd will rename the original object by appending _aliased
and the newly registered object will take over the name.