#N canvas 385 62 878 468 12;
#X floatatom 313 410 4 0 0 0 - - - 0;
#N canvas 685 165 422 119 sample-subpatch 0;
#X text 39 43 this is a subpatch of the main patch.;
#X restore 124 112 pd sample-subpatch;
#N canvas 566 198 644 307 eager-adder 0;
#X obj 67 46 inlet;
#X obj 123 46 inlet;
#X obj 123 161 outlet;
#X obj 123 74 t b f;
#X obj 123 129 +;
#X text 212 124 Because of the two inlets and the one outlet \, the containing box (in the parent patch) has two inlets and one outlet. They respect the left-to-right order of the inlet and outlet objects in the subpatch., f 52;
#X text 212 28 This is a sample subpatch which maintains the sum of two inputs \, doing the computation when either input changes. If it's the left input \, the [+] object takes care if it. If the right \, the [trigger] object first gives the [+] the new value \, then "bangs" the right inlet to make [+] do the computation., f 52;
#X text 97 213 Aside: this shows why \, in Pd and Max \, objects such as [+] only trigger on their left inlets: it's easy to build up from there \, but if more than one inlet were "hot" \, you wouldn't be able to change both of them without firing the calculation twice., f 63;
#X connect 0 0 4 0;
#X connect 1 0 3 0;
#X connect 3 0 4 0;
#X connect 3 1 4 1;
#X connect 4 0 2 0;
#X restore 183 229 pd eager-adder;
#X floatatom 183 202 0 0 0 0 - - - 0;
#X floatatom 278 202 0 0 0 0 - - - 0;
#X floatatom 183 257 0 0 0 0 - - - 0;
#X obj 84 407 sendnumber 45 cookies;
#X obj 548 57 sendnumber 67 pretzels;
#X floatatom 750 77 4 0 0 0 - - - 0;
#X text 538 335 Note that "\$1" \, etc \, has a different meaning in object boxes. Open one of the "sendnumber" abstractions for details., f 42;
#X text 537 240 If you change one copy of an abstraction the change isn't automatically made on any other copies. You must keep track \, save the changes \, and cause Pd to reload the other copies (for example \, by closing and reopening the containing patch.), f 42;
#X obj 313 383 r cookies;
#X obj 750 50 r pretzels;
#X text 636 408 updated for Pd version 0.34;
#X text 536 119 There is a separate file in this directory named "sendnumber.pd" which is loaded every time you type "sendnumber" in a box. Click on a "sendnumber" box above to see it. You can make changes in the subpatch and save them. The changes will be saved back to sendnumber.pd and not as part of this (containing) patch., f 43;
#X text 52 111 click --> to open, f 9;
#X text 259 111 <-- you can give the window;
#X text 288 127 a name as an argument;
#X text 34 162 Click on the one below to see how you give a subpatch inlets and outlets., f 63;
#X text 34 16 You can nest entire windows inside Pd boxes (and so on \, as deep as you wish.) There are two different ways to do it. First \, if you just want to add a room to the house \, so to speak \, type "pd" into an object box. If you click on the box (in run mode) the subwindow appears., f 63;
#X text 37 290 There is also a facility for making many copies of a patch which track any changes you make in the original. This subpatch type is called an abstraction. For example \, here's a simple abstraction that sends a number to a "receive" on command:, f 65;
#X obj 84 374 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X obj 548 24 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X connect 2 0 5 0;
#X connect 3 0 2 0;
#X connect 4 0 2 1;
#X connect 11 0 0 0;
#X connect 12 0 8 0;
#X connect 21 0 6 0;
#X connect 22 0 7 0;
