[PD] howto load and install externals tutorial

Roman Haefeli reduzent at gmail.com
Thu Mar 2 14:04:00 CET 2017

On Don, 2017-03-02 at 01:03 -0300, Alexandre Torres Porres wrote:
> Howdy, I worked on a howto load and install externals tutorial and
> put it up in here: https://puredata.info/docs/tutorials/FrontPage
> Also find it in here https://sites.google.com/site/porres/Using%20Pd%
> 20Externals.pdf?attredirects=0&d=1
> feel free to comment and give some feedbacks

Good work! Great coverage of aspects. Do you plan to convert the final
draft into a wikipage? I guess this would ease collaboration on the
long run.

My notes:

Re 2.2.1 C):

The global and application specific paths are dependent on how Pd and
externals were installed. Everything that comes from the
distribution/package manager goes to /usr/, while all self-compiled
stuff goes to /usr/local (when intalled system-wide). As a user, you
shouldn't never ever touch /usr/ directly.

/usr/lib/puredata/extra   if installed via a package manager (apt-get)
/usr/local/lib/pd/extra   if compiled by yourself. 

User-specific (needs to be created):
~/.local/lib/pd/extra     (preferred since version Pd-0.47-1) 
~/pd-externals             (deprecated but still usable). 
/usr/lib/pd-externals	      (searched by Pd from package
/usr/local/lib/pd-externals   (searched by used-installed Pd)

How to load different library formats

Different library layouts require different ways of loading. I'll try
to put together a summary of the different layouts I found "in the

Single-file-per-object libraries

How to load them:

[declare -stdpath libraryname]

  * virtually anything from Pd-extended
  * iemnet
  * all
abstractions libraries

It works for both, abstractions and externals, as long as each object
has its own file and they're in a folder libraryname. Supposedly, the
majority of libraries uses this layout.

Multi-object externals

How to load them:

[declare -stdlib libraryname]

  *  (can't think of any right now)

Mix of multi-object external and abstractions

How to load them:

[declare -stdpath libraryname -stdlib libraryname]

  * zexy (not from Pd-extended)
  * Gem

You can test above with zexy. You need both declarations so that you
can load both [nop] and [dirac~].
Gem is a special animal again. It uses a trick internally and adds the
path automatically. Even if it is a mix of abstractions and a multi-
object external, you stil can load it with [declare -stdlib Gem].

Mix of several multi-object externals and abstractions

[declare -stdpath libname -stdlib libname/lib1 -stdlib/lib2 [...]]

  * iemlib

If the multi-object external doesn't have the same name as the parent
folder, you need to add libname/ prefix to -stdlib. 
If you, for instance, only [declare -stdpath iemlib], you can
successfully load [hp4_butt~] because it is an abstraction of iemlib,
but it throws an error to the Pd-console:

 filter~ hp2c $1 $2 $3 $4
... couldn't create

because it uses [filter~] from iemlib1 internally. So, the proper way
to make [hp4_butt~] work is to use:

[declare -stdpath iemlib -stdlib iemlib/iemlib1]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20170302/d229e384/attachment.sig>

More information about the Pd-list mailing list