#N canvas 148 35 1137 665 12;
#X declare;
#X declare;
#X declare -path path1 -path path2;
#X obj 23 10 declare;
#X text 42 262 -lib;
#X text 21 279 -stdlib;
#X text 35 227 -path;
#X text 14 244 -stdpath;
#X text 630 566 BUG: The name "-stdpath" is confusing \, as it has a quite different effect from "-stdpath" on the pd command line., f 66;
#X text 914 636 updated for Pd version 0.52;
#X text 594 182 It is a current best practice to just use [declare] instead of permanently adding paths to the user search paths or libs to startup. With [declare] you can better manage and avoid conflicts with externals from different libraries that have the same name by using it to call the right library you want., f 74;
#X obj 708 396 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X text 63 308 (For any of these you may use a full pathname such as "/tmp/dir" or \, in Windows \, "C:/garbage" instead of a relative path)., f 64;
#N canvas 798 148 456 264 open-manual 0;
#X obj 101 59 inlet;
#X obj 101 190 pdcontrol;
#X obj 101 130 pdcontrol;
#X msg 101 105 dir;
#X msg 101 159 browse \$1/../1.manual/x4.htm;
#X text 205 94 this window opens the html manual link via the [pdcontrol] object., f 25;
#X connect 0 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X restore 708 424 pd open-manual;
#X msg 917 517 \; pd compatibility \$1;
#X msg 917 456 0.46;
#X text 960 458 earlier (buggy);
#X msg 930 485 0.47;
#X text 968 486 new (correct);
#X text 17 51 Compiled external libraries come either as a single binary pack (the "classic" library format) or as a set of separate binaries and/or abstractions. A single binary pack is what we refer to as a 'library' and needs to be pre loaded - whereas external libraries that have separate binaries/abstractions can be loaded by simply adding its directory to the search path. Adding a directory to the path is also needed if you want to load things like audio and text files that are in it., f 78;
#X obj 4 41 cnv 1 1125 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 708 186 618 221 reference 0;
#X obj 8 42 cnv 5 600 5 empty empty INLETS/OUTLETS: 8 18 0 13 #202020 #000000 0;
#X obj 7 195 cnv 5 600 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 8 80 cnv 2 600 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 105 cnv 1 600 1 empty empty flags: 8 12 0 13 #7c7c7c #000000 0;
#X obj 24 14 declare;
#X text 156 53 NONE;
#X text 75 113 -path <symbol> - add to search path \, relative to the patch or user paths., f 73;
#X text 54 132 -stdpath <symbol> - add to search path \, relative to Pd (the 'extra' folder)., f 76;
#X text 82 150 -lib <symbol> - load a library \, relative to the patch or user paths., f 72;
#X text 61 168 -stdlib <symbol> - load a library \, relative to Pd (the 'extra' folder)., f 75;
#X text 91 14 - set search path and/or libraries for the patch., f 68;
#X restore 941 9 pd reference;
#X text 1034 9 <= click;
#X text 17 359 For instance \, if you put abstractions and/or other supporting files in a subdirectory "more" \, you can put an object [declare -path more] to make sure Pd sees them when the patch is loaded. Or \, if you have files installed in the directory extra/stillmore (in the Pd installation) you can get it using [declare -stdpath stillmore]., f 78;
#X text 596 462 WARNING: as of version 0.47 \, "-path" and "-stdpath" inside abstractions take effect only within those abstractions. If Pd's compatibility version is set to 0.46 or earlier the old (buggy) behavior takes effect., f 42;
#X text 736 396 <-- click to open Pd's manual \, chapter 4;
#X text 90 9 - set search path and/or libraries for the patch;
#X obj 235 443 declare -path path1 -path path2;
#X text 59 443 example loading 2 paths;
#X text 82 262 load library relative to the patch \, user paths or 'extra', f 68;
#X text 82 227 add search path relative to the patch \, user paths or 'extra', f 68;
#X text 82 244 add search path relative to 'standard' path (the 'extra' folder), f 68;
#X text 82 279 load library relative to 'standard' path (the 'extra' folder), f 68;
#X text 17 158 The [declare] object adds one or more directories as a search path and/or pre-loads one or more libraries in preparation for loading a patch from a file. The usage is "declare [-flag value] [-flag value] ..." where the flag can be:, f 78;
#X text 210 472 no error is given if the paths don't exist;
#X text 20 504 The "-path" and "-lib" flags will fall back to the other search paths if the relative path to the patch does not exist. To avoid checking further \, use an explicit relative path by prepending "./" or "../" to the path or lib name. If you don't do it \, the other search paths will be (in order of priority): the user added search paths (set in "Preferences => Path") and \, lastly \, the standard path (a.k.a the 'extra' folder) \, which is also searched with '-stdpath'/'-stdlib' (but only this folder is searched in this case)., f 77;
#X text 593 56 Paths declared with '-path' will have top search priority when loading the patch. Next priority is the relative path \, then user added search paths and finally the standard path (a.k.a the 'extra' folder)., f 74;
#X text 594 115 Since the 'extra' folder is part of the search path but last in priority \, you can use [declare -stdpath ./] to ensure it has search priority. Note that the order you specify '-path' flags also specify the search priority., f 74;
#X text 594 269 Note however that while [declare] only adds search paths for the owing patch \, when you load a library (via startup or [declare]) all etxernals get pre loaded and prevail even in other patches with priority. This may cause some issues and you may need to adopt slash declarations to find an external with the same name in a given path (as in [library/objectname].) These are edge cases anyway and for more details on how external loading works in Pd \, please refer to the chapter 4 of Pd's manual., f 74;
#X obj 4 625 cnv 1 1125 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X connect 8 0 10 0;
#X connect 12 0 11 0;
#X connect 14 0 11 0;
