[PD] Exporting a patch as a zip file

Henri Augusto Bisognini msndohenri at hotmail.com
Fri Nov 16 22:57:34 CET 2018

It really depends on how you managed your dependencies. That seems like an easy matter but it is more complicated than it look (and than it should)

I will write down how i do it:


(you probably know that but just for the record: the .pd are text files that can be opened in any text editor)

Most powerful programming text editors (atom/sublime text/etc) can perform searches in all files inside a folder. That includes performing regex searches.

I've separated the dependencies loading methods but you can of course mix all of them. Let's see some possible cases:

1 - You document your dependencies in a readme file, in your library main help patch or in any other sensible way: take a moment to salute yourself for having good programming habits and appreciate the fact that you can just read your documentation to see what you need.

If you do that you might skip the rest but it might still be useful when dealing with other people's code...

Okay, if you don't do number 1...  first of all: start doing it :)

2 -externals are loaded using [declare] : search the .pd files for "declare " so you can easily see what externals you're using

3 - externals are loaded using the [library name/external] syntax: search, using regexp,  the .pd files for .*\/.*
                 that finds stuff in the form "some words/some words"
                 btw i personally recommend using the PD's auto completion plugin for writing code using in that syntax. It avoids name clashes and makes it absolutely clear which library you're using and where.
                 search for completion-plugin on deken. I'm already working on the next version with new features and bugfixes.

4 - externals are loaded on startup (that includes using pd extended): well, in that case it will be really hard to know what you're using withouth using the trick i will describe below.



let PD tell you whats missing by running vanilla completely stripped down.

How to do that may vary according to your setup but it usually consists of:

-Removing all startup flags to load libraries.
-Removing all search paths
-removing libraries/externals you've installed in the standar paths

Now when you open a patch PD won't be able to load any externals. So, reduced only to vanilla objects, you will get an error message everytime something couldn't be loaded.

Then add whats missing, write it down the dependencies,  and set PD to find them again (adding a search path, etc).

Then repeat until you don't get any errors.

Repeating is important because those depencies you've just added might have their own dependencies.

Let me quickly share one thing i've learned from experience:

If in doubt, paranoid or if you're sending important files, be sure to test them in another computer. If you're sending a patch to a performance of one of your pieces in a festival for example. Always test in another computer just to be sure. And test it on the platform they're going to use.



This is very personal but i like to put all my libraries in a "my externals" folder and add only that one folder to the search paths.


Let's say you add "C:\Users\YourName\Desktop\Pure Data\libs\cyclone" to your search paths because thats where you've just installed cyclone.

Then you add "C:\Users\YourName\Desktop\Pure Data\libs\easyflow" to your search paths because thats where you've just installed easyflow.

Then you type [counter] and you don't know if you've loaded the counter object from cyclone or from easyflow.

So i add "C:\Users\YourName\Desktop\Pure Data\libs\" and then i can use [easyflow/counter] and [cyclone/counter] and i know exactly what i'm getting. Plus having only 1 search path makes it really easier/quicker to use the trick above.


Now that you can find your dependencies then, as of current state of development, you must include them manually in your zip file.

Hope that helps you or anyone searching through the mailing list.


De: Pd-list <pd-list-bounces at lists.iem.at> em nome de Dario Sanfilippo <sanfilippo.dario at gmail.com>
Enviado: sexta-feira, 16 de novembro de 2018 16:57
Para: pd-list
Assunto: [PD] Exporting a patch as a zip file

Hello, list.

Do you have a workaround for exporting a patch as a zip file containing all abstractions and externals in the patch?

It would be amazing to be able to do that because manually locating all the necessary abstractions and externals from a supposedly large folder is a bit tricky and many are often left behind.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20181116/8be180a6/attachment.html>

More information about the Pd-list mailing list