aboutsummaryrefslogtreecommitdiff
path: root/pd/doc/2.control.examples
diff options
context:
space:
mode:
Diffstat (limited to 'pd/doc/2.control.examples')
-rw-r--r--pd/doc/2.control.examples/00.INTRO.txt19
-rw-r--r--pd/doc/2.control.examples/01.PART1.hello.pd16
-rw-r--r--pd/doc/2.control.examples/02.editing.pd17
-rw-r--r--pd/doc/2.control.examples/03.connections.pd58
-rw-r--r--pd/doc/2.control.examples/04.messages.pd35
-rw-r--r--pd/doc/2.control.examples/05.counter.pd45
-rw-r--r--pd/doc/2.control.examples/06.more.counters.pd55
-rw-r--r--pd/doc/2.control.examples/07.time.pd39
-rw-r--r--pd/doc/2.control.examples/08.depthfirst.pd48
-rw-r--r--pd/doc/2.control.examples/09.send_receive.pd35
-rw-r--r--pd/doc/2.control.examples/10.more.messages.pd56
-rw-r--r--pd/doc/2.control.examples/11.review.pd42
-rw-r--r--pd/doc/2.control.examples/12.PART2.subpatch.pd72
-rw-r--r--pd/doc/2.control.examples/13.locality.pd27
-rw-r--r--pd/doc/2.control.examples/14.dollarsigns.pd5
-rw-r--r--pd/doc/2.control.examples/15.array.pd70
-rw-r--r--pd/doc/2.control.examples/15.file.txt2
-rw-r--r--pd/doc/2.control.examples/16.more.arrays.pd23
-rw-r--r--pd/doc/2.control.examples/17.PART3.midi.pd35
-rw-r--r--pd/doc/2.control.examples/18.conditional.pd59
-rw-r--r--pd/doc/2.control.examples/19.random.pd39
-rw-r--r--pd/doc/2.control.examples/20.weighted-random.pd44
-rw-r--r--pd/doc/2.control.examples/21.markov.chain.pd105
-rw-r--r--pd/doc/2.control.examples/22.sequencing.pd20
-rw-r--r--pd/doc/2.control.examples/dollarsign.pd35
-rw-r--r--pd/doc/2.control.examples/dollarsign2.pd54
-rw-r--r--pd/doc/2.control.examples/sendnumber.pd20
27 files changed, 1075 insertions, 0 deletions
diff --git a/pd/doc/2.control.examples/00.INTRO.txt b/pd/doc/2.control.examples/00.INTRO.txt
new file mode 100644
index 00000000..c799044d
--- /dev/null
+++ b/pd/doc/2.control.examples/00.INTRO.txt
@@ -0,0 +1,19 @@
+This series of patches serves as a tutorial for Pd's "control" structure, as
+opposed to its audio functions (covered in the next series.) These tutorials
+are inspired by Chris Dobrian's Max tutorial patches.
+
+It's probably best to look at the first section here before going on to the
+audio portion, but afterward there's no reason not to browse back and forth
+between the two, and even the third series on "fft" based techniques.
+
+The relationship between "control" and "audio" is described in Pd's HTML
+documentation, which is more like a reference manual than an introduction.
+Also, you probably will need to look there to get Pd up and running stably so
+that you can enjoy the patches here.
+
+The patches are roughly divided as shown:
+
+1. objects and connections
+2. subpatches, tables, and organization
+3. specific techniques.
+
diff --git a/pd/doc/2.control.examples/01.PART1.hello.pd b/pd/doc/2.control.examples/01.PART1.hello.pd
new file mode 100644
index 00000000..e0a4daf1
--- /dev/null
+++ b/pd/doc/2.control.examples/01.PART1.hello.pd
@@ -0,0 +1,16 @@
+#N canvas 9 21 600 496 12;
+#X msg 204 32 hello world;
+#X obj 204 105 print;
+#X floatatom 321 32 0 0 0;
+#X text 215 48 message;
+#X text 319 49 atom;
+#X text 201 123 object;
+#X text 53 150 There are four types of text objects in Pd: message \, atom \, object \, and comment.;
+#X text 54 187 Messages respond to mouse clicks by sending their contents to one or more destinations. The usual destination is the "outlet" at the lower left corner of the box.;
+#X text 55 239 Click the message box and watch the terminal window Pd was started in. You should see the "hello world" message appear.;
+#X text 55 278 Atoms respond to "Dragging" up and down with the mouse \, by changing their contents and sending the result out their outlets. You can also type at an atom after clicking on it \; hit "enter" to output the number or click anywhere else to cancel.;
+#X text 52 359 Objects \, like "print" above \, may have all sorts of functions depending on what's typed into them. The "print" object simply prints out every message it receives.;
+#X text 53 415 To get help on an object \, right-click it. You should see a "help window" for the object.;
+#X text 354 470 updated for release 0.33;
+#X connect 0 0 1 0;
+#X connect 2 0 1 0;
diff --git a/pd/doc/2.control.examples/02.editing.pd b/pd/doc/2.control.examples/02.editing.pd
new file mode 100644
index 00000000..a2442ee8
--- /dev/null
+++ b/pd/doc/2.control.examples/02.editing.pd
@@ -0,0 +1,17 @@
+#N canvas 1 0 581 630 12;
+#X msg 195 36 hello world;
+#X obj 195 72 print;
+#X floatatom 304 36 0 0 0;
+#X text 194 15 message;
+#X text 304 14 atom;
+#X text 255 73 object;
+#X text 34 102 When you first open a Pd document like this one \, your cursor will be an arrow. Select "edit mode" in the Edit menu and the cursor will change to the image of a hand. The patch is now in edit mode. You can move any object by dragging it.;
+#X text 33 185 Select "Edit mode" again in the Edit menu and you're back to the arrow cursor which acts on objects without moving them.;
+#X text 32 373 You can create new objects by duplicating existing ones using the "duplicate" menu item. You can also "cut" and "paste" them. If you duplicate several connected objects the connections will be replicated too.;
+#X text 33 237 In Edit mode \, if you click on a message \, object \, or comment \, you can then retype the text. For objects this will create a new object and delete the old one. Pd will try to reconnect the newly created object in the same way as the old one.;
+#X text 34 442 Edit mode also lets you make and break connections between objects. Put the "hand" cursor over a line connecting two objects: it turns into an X. Clicking will delete the connection. Hold the cursor over an outlet and it becomes a circle (a patch point). Drag to any box and release \; you will be connected to the nearest inlet.;
+#X text 32 320 When you're done changing the contents of the box \, click outside the box to deselect it. This tells Pd to incorporate the new text.;
+#X text 328 604 updated for Pd version 0.33;
+#X text 35 544 The "put" menu creates new text items of any of the four types. You can also put a "symbol" box \, analogous to a number box but for showing and entering text strings.;
+#X connect 0 0 1 0;
+#X connect 2 0 1 0;
diff --git a/pd/doc/2.control.examples/03.connections.pd b/pd/doc/2.control.examples/03.connections.pd
new file mode 100644
index 00000000..3cde81fa
--- /dev/null
+++ b/pd/doc/2.control.examples/03.connections.pd
@@ -0,0 +1,58 @@
+#N canvas 185 28 660 552 12;
+#X floatatom 76 400 0 0 0;
+#X floatatom 189 401 0 0 0;
+#X floatatom 76 307 0 0 0;
+#X floatatom 553 161 0 0 0;
+#X floatatom 599 162 0 0 0;
+#X obj 553 135 +;
+#X floatatom 553 105 0 0 0;
+#X obj 599 136 +;
+#X text 114 16 In Pd \, most objects carry out their functions when
+they get messages in their rightmost inlets \, and their other inlets
+are for storing values that can modify the next action. Here \, the
+"+" object does its thing only when the left-hand input changes.;
+#X floatatom 26 109 0 0 0;
+#X floatatom 26 17 0 0 0;
+#X floatatom 48 41 0 0 0;
+#X obj 26 85 +;
+#X text 3 64 hot;
+#X text 53 66 cold;
+#X text 232 105 Here's the downside: drag this--->;
+#X text 551 180 good;
+#X text 600 181 bad;
+#X obj 76 376 *;
+#X obj 189 377 -;
+#X text 15 400 square;
+#X text 229 402 first difference;
+#X obj 76 330 trigger float float;
+#X text 412 526 updated for Pd version 0.33;
+#X text 19 433 Trigger takes any number of "bang" and "float" arguments
+(among others) and copies its input to its outlets \, in the requested
+forms \, in right-to-left order. Hook it to two inputs without crossing
+the wires and you get the expected result. Cross the wires and you
+get a memory effect.;
+#X text 9 136 In Pd you must sometimes think about what order an object
+is going to get its messages in. If an outlet is connected to more
+than one inlet it's undefined which inlet will get the cookie first.
+I've rigged this example so that the left-hand side box gets its inputs
+in the good \, right-to-left order \, so that the hot inlet gets hit
+when all the data are good. The "bad adder" happens to receive its
+inputs in the wrong order and is perpetually doing its addition before
+all the data are in. There's an object that exists solely to allow
+you to control message order explicitly:;
+#X connect 2 0 22 0;
+#X connect 5 0 3 0;
+#X connect 6 0 7 0;
+#X connect 6 0 7 1;
+#X connect 6 0 5 1;
+#X connect 6 0 5 0;
+#X connect 7 0 4 0;
+#X connect 10 0 12 0;
+#X connect 11 0 12 1;
+#X connect 12 0 9 0;
+#X connect 18 0 0 0;
+#X connect 19 0 1 0;
+#X connect 22 0 18 0;
+#X connect 22 0 19 1;
+#X connect 22 1 18 1;
+#X connect 22 1 19 0;
diff --git a/pd/doc/2.control.examples/04.messages.pd b/pd/doc/2.control.examples/04.messages.pd
new file mode 100644
index 00000000..a56dd92b
--- /dev/null
+++ b/pd/doc/2.control.examples/04.messages.pd
@@ -0,0 +1,35 @@
+#N canvas 0 0 591 442 12;
+#X floatatom 225 110 0 0 0;
+#X floatatom 184 109 0 0 0;
+#X msg 184 56 5 6;
+#X floatatom 132 108 0 0 0;
+#X floatatom 64 105 0 0 0;
+#X text 30 21 Most Pd messages are just numbers or short lists of numbers:;
+#X msg 64 55 5;
+#X obj 64 80 + 9;
+#X obj 132 83 +;
+#X obj 184 84 unpack;
+#X msg 288 55 5;
+#X obj 288 107 print;
+#X obj 288 81 pack 34 78;
+#X msg 132 55 5 6;
+#X floatatom 195 328 0 0 0;
+#X obj 195 303 +;
+#X msg 195 254 1.2 3.4;
+#X msg 205 277 5 6;
+#X text 36 206 Unlike Max \, in Pd all numbers are floating point. Numbers whose values happen to be integers are displayed without decimal points.;
+#X text 31 363 For more on messages \, get help on any message box by right-clicking.;
+#X text 329 409 updated for Pd release 0.33;
+#X text 34 149 If you send a list to an object with more than one inlet \, the items in the list are spread out over the inlets \, as seen in the 5+6 example above.;
+#X connect 2 0 9 0;
+#X connect 6 0 7 0;
+#X connect 7 0 4 0;
+#X connect 8 0 3 0;
+#X connect 9 0 1 0;
+#X connect 9 1 0 0;
+#X connect 10 0 12 0;
+#X connect 12 0 11 0;
+#X connect 13 0 8 0;
+#X connect 15 0 14 0;
+#X connect 16 0 15 0;
+#X connect 17 0 15 0;
diff --git a/pd/doc/2.control.examples/05.counter.pd b/pd/doc/2.control.examples/05.counter.pd
new file mode 100644
index 00000000..14c48dea
--- /dev/null
+++ b/pd/doc/2.control.examples/05.counter.pd
@@ -0,0 +1,45 @@
+#N canvas 0 0 685 496 12;
+#X floatatom 107 424 0 0 0;
+#X msg 53 344 bang;
+#X obj 107 399 + 1;
+#X obj 376 262 + 1;
+#X floatatom 152 197 0 0 0;
+#X floatatom 108 245 0 0 0;
+#X msg 108 196 bang;
+#X floatatom 169 107 0 0 0;
+#X msg 112 58 bang;
+#X obj 169 82 + 1;
+#X text 31 21 Here's a simple counter. Click repeatedly on the "bang
+message to see it:;
+#X text 422 263 to its cold inlet.;
+#X text 25 284 The incremented value is stored for the next "bang"
+to spit out.;
+#X text 28 322 Here's a timed counter. Hit the "bang" to start it...
+;
+#X obj 53 373 metro 500;
+#X msg 99 344 stop;
+#X obj 112 83 float;
+#X text 28 132 The "float" box is a storage element holding one floating-point
+number. The cold inlet (i.e. \, the one on the right) stores numbers.
+Sending the message "bang" to the hot inlet gets the number back out:
+;
+#X obj 108 221 float;
+#X obj 53 399 float;
+#X text 25 263 Float's outlet above is connected via;
+#X text 384 462 updated for Pd version 0.34;
+#X text 142 373 <-- new object: metronome. The "500" means every 500
+milliseconds--i.e. \, twice a second.;
+#X connect 1 0 14 0;
+#X connect 2 0 0 0;
+#X connect 2 0 19 1;
+#X connect 4 0 18 1;
+#X connect 6 0 18 0;
+#X connect 8 0 16 0;
+#X connect 9 0 7 0;
+#X connect 9 0 16 1;
+#X connect 14 0 19 0;
+#X connect 15 0 14 0;
+#X connect 15 0 14 0;
+#X connect 16 0 9 0;
+#X connect 18 0 5 0;
+#X connect 19 0 2 0;
diff --git a/pd/doc/2.control.examples/06.more.counters.pd b/pd/doc/2.control.examples/06.more.counters.pd
new file mode 100644
index 00000000..e0ef3c40
--- /dev/null
+++ b/pd/doc/2.control.examples/06.more.counters.pd
@@ -0,0 +1,55 @@
+#N canvas 8 0 659 487 12;
+#X floatatom 147 177 0 0 0;
+#X obj 147 151 + 1;
+#X msg 147 47 bang;
+#X obj 147 99 metro 500;
+#X msg 56 105 stop;
+#X obj 147 125 float;
+#X obj 147 73 trigger bang bang;
+#X msg 261 105 0;
+#X obj 56 79 select 10;
+#X text 305 102 first set value to zero;
+#X text 304 73 initialization is in two steps;
+#X text 305 121 (before starting the metronome);
+#X text 9 128 conditionally;
+#X text 9 145 stop the;
+#X text 10 159 metronome;
+#X text 184 46 <--- click here to start;
+#X floatatom 85 289 0 0 0;
+#X obj 85 315 >= 0;
+#X obj 85 341 select 0 1;
+#X obj 85 393 float;
+#X floatatom 139 420 0 0 0;
+#X msg 119 367 bang;
+#X obj 139 394 + 1;
+#X msg 85 367 -1;
+#X text 131 313 <-- are we nonnegative? (1 if true \, 0 if false);
+#X text 180 340 <-- selectively bang the first or second outlet;
+#X text 167 363 <-- as a result either clear or increment the counter
+;
+#X text 32 11 Here's a counter that counts from 1 to 10:;
+#X text 392 452 updated for Pd version 0.34;
+#X text 33 200 We're using one new object \, "select \, " which outputs
+a bang when it gets a matching value (10). This is useful for doing
+conditional computations \, such as this one which counts while its
+input is 0 or positive but clears when negative:;
+#X connect 1 0 0 0;
+#X connect 1 0 5 1;
+#X connect 1 0 8 0;
+#X connect 2 0 6 0;
+#X connect 3 0 5 0;
+#X connect 4 0 3 0;
+#X connect 5 0 1 0;
+#X connect 6 0 3 0;
+#X connect 6 1 7 0;
+#X connect 7 0 5 1;
+#X connect 8 0 4 0;
+#X connect 16 0 17 0;
+#X connect 17 0 18 0;
+#X connect 18 0 23 0;
+#X connect 18 1 21 0;
+#X connect 19 0 22 0;
+#X connect 21 0 19 0;
+#X connect 22 0 19 1;
+#X connect 22 0 20 0;
+#X connect 23 0 19 0;
diff --git a/pd/doc/2.control.examples/07.time.pd b/pd/doc/2.control.examples/07.time.pd
new file mode 100644
index 00000000..69398bd9
--- /dev/null
+++ b/pd/doc/2.control.examples/07.time.pd
@@ -0,0 +1,39 @@
+#N canvas 0 0 724 474 12;
+#X text 34 13 Besides the metronome \, there are three objects for
+dealing with time:;
+#X obj 64 117 print;
+#X msg 64 59 bang;
+#X msg 110 61 stop;
+#X obj 64 89 delay 2000;
+#X text 161 44 The delay objects sechedules an event for a future time
+expressed in milliseconds. Unlike in Max \, time values need not be
+integers. If a delay has been scheduled and you "bang" it again \,
+it is rescheduled (the previously scheduled output is cancelled.);
+#X msg 76 190 bang;
+#X obj 76 237 timer;
+#X text 160 117 The right inlet can be used to set the time value without
+scheduling any output.;
+#X text 35 156 The timer \, shown below \, measures the time elapsed
+between its left and right inlets:;
+#X obj 106 212 delay 123.45;
+#X floatatom 76 262 0 0 0;
+#X text 29 287 Note that all time calculations are idealized \; they
+do not show the effects of computation time or OS latency. This way
+you can write deterministic algorithms dealing with time passage.;
+#X obj 74 385 pipe 2000;
+#X floatatom 74 358 0 0 0;
+#X floatatom 74 411 0 0 0;
+#X text 165 359 The pipe object allocates memory dynamically in order
+to schedule any number of delayed events. The events may hold any collection
+of data (as usual \, for more details you can consult the help window.)
+;
+#X text 442 440 updated for Pd version 0.34;
+#X connect 2 0 4 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 6 0 7 0;
+#X connect 6 0 10 0;
+#X connect 7 0 11 0;
+#X connect 10 0 7 1;
+#X connect 13 0 15 0;
+#X connect 14 0 13 0;
diff --git a/pd/doc/2.control.examples/08.depthfirst.pd b/pd/doc/2.control.examples/08.depthfirst.pd
new file mode 100644
index 00000000..8820d226
--- /dev/null
+++ b/pd/doc/2.control.examples/08.depthfirst.pd
@@ -0,0 +1,48 @@
+#N canvas 144 162 632 551 12;
+#X msg 64 51 1;
+#X obj 89 150 + 1;
+#X obj 209 187 print x1;
+#X obj 64 209 print x3;
+#X obj 114 122 print x2;
+#X obj 209 100 + 1;
+#X obj 209 129 + 1;
+#X obj 209 158 + 1;
+#X obj 64 80 t f f f f;
+#X obj 89 179 print x2;
+#X text 34 13 In Pd \, message passing is depth first \, so that in
+this patch:;
+#X text 104 51 <-- click here;
+#X text 17 243 ... you get "x1" first \, notwidthstanding the fact
+that "x2" and "x3" appear to be closer to the source. This means that
+you shouldn't do this:;
+#X msg 76 304 1;
+#X text 116 304 <-- maybe you shouldn't click here;
+#X obj 115 334 + 1;
+#X obj 76 333 f;
+#X floatatom 76 365 0 0 0;
+#X text 377 520 updated for Pd version 0.34;
+#X text 35 393 ... because the "depth" is infinite. The counters you've
+seen always have the message chain terminated somewhere in a cold inlet:
+;
+#X msg 75 453 1;
+#X obj 114 483 + 1;
+#X obj 75 482 f;
+#X floatatom 75 514 0 0 0;
+#X text 115 453 <-- better;
+#X connect 0 0 8 0;
+#X connect 1 0 9 0;
+#X connect 5 0 6 0;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X connect 8 0 3 0;
+#X connect 8 1 1 0;
+#X connect 8 2 4 0;
+#X connect 8 3 5 0;
+#X connect 13 0 16 0;
+#X connect 15 0 16 0;
+#X connect 16 0 17 0;
+#X connect 16 0 15 0;
+#X connect 20 0 22 0;
+#X connect 21 0 22 1;
+#X connect 22 0 23 0;
+#X connect 22 0 21 0;
diff --git a/pd/doc/2.control.examples/09.send_receive.pd b/pd/doc/2.control.examples/09.send_receive.pd
new file mode 100644
index 00000000..374a74b5
--- /dev/null
+++ b/pd/doc/2.control.examples/09.send_receive.pd
@@ -0,0 +1,35 @@
+#N canvas 136 31 738 479 12;
+#X floatatom 88 199 0 0 0;
+#X obj 88 172 receive crackers;
+#X floatatom 248 204 0 0 0;
+#X obj 248 177 receive pickles;
+#X obj 88 145 send crackers;
+#X obj 250 139 send pickles;
+#X obj 389 138 send pickles;
+#X floatatom 392 203 0 0 0;
+#X obj 392 176 receive pickles;
+#X msg 51 306 \; pickles 99 \; crackers 56;
+#X floatatom 88 118 0 0 0;
+#X floatatom 250 112 0 0 0;
+#X floatatom 389 111 0 0 0;
+#X obj 371 404 r crackers;
+#X obj 371 377 s crackers;
+#X text 39 392 send and receive can be abbreviated:;
+#X text 48 245 You can use the semicolon feature of message boxes to
+address receives \, too. This is useful if you want to do a whole list
+of things:;
+#X text 166 305 The transaction takes place in zero time---i.e. \,
+if you tried to use "timer" to measure the time delay between the two
+\, you would get zero.;
+#X text 459 447 updated for Pd version 0.34;
+#X text 51 6 The send and receive objects allow you to make non-local
+connections. These work globally--you can use them to make two different
+patches intercommunicate if you wish. Any message a "send" gets appears
+at the output of every receive of the same name. There can be any number
+of sends and receives sharing the same name:;
+#X connect 1 0 0 0;
+#X connect 3 0 2 0;
+#X connect 8 0 7 0;
+#X connect 10 0 4 0;
+#X connect 11 0 5 0;
+#X connect 12 0 6 0;
diff --git a/pd/doc/2.control.examples/10.more.messages.pd b/pd/doc/2.control.examples/10.more.messages.pd
new file mode 100644
index 00000000..7f0c8539
--- /dev/null
+++ b/pd/doc/2.control.examples/10.more.messages.pd
@@ -0,0 +1,56 @@
+#N canvas 91 95 675 539 12;
+#X obj 211 341 print;
+#X msg 52 89 3 \, 4 \, 5;
+#X msg 44 62 3 4 5;
+#X msg 57 313 3 \$1 5;
+#X floatatom 57 286 4 0 0;
+#X msg 211 315 \$2 \$1 5;
+#X msg 211 290 45 67;
+#X msg 289 290 45 67;
+#X floatatom 28 425 4 0 0;
+#X floatatom 76 425 4 0 0;
+#X floatatom 332 179 4 0 0;
+#X floatatom 186 182 4 0 0;
+#X obj 186 155 receive number9;
+#X obj 332 155 receive 9bis;
+#X obj 44 178 print;
+#X text 27 5 In addition to using semicolons to separate messages \,
+you can use commas \, which continue a stream of messages to the same
+destination. Thus:;
+#X msg 65 116 3 \; number9 5 \; 9bis 45;
+#X text 126 89 <-- three separate messages;
+#X text 109 58 <-- one message: the list \, "3 4 5".;
+#X text 167 114 <-- three separate messages \, with three destinations.
+;
+#X text 406 511 updated for Pd version 0.34;
+#X msg 289 315 \; number9 \$1 \; 9bis \$2;
+#X text 9 209 You can use "$1" \, etc. \, as variables in messages.
+Send the message box a list whose elements supply the values. A number
+is just a list with one element.;
+#X obj 57 339 print;
+#X text 51 265 one variable:;
+#X text 216 263 two variables:;
+#X text 1 367 But to really exploit the possibilities using multiple
+variables \, you will need the "pack" object to get two or more values
+into the same message:;
+#X obj 28 507 print;
+#X obj 28 455 pack 0 0 0;
+#X floatatom 124 425 4 0 0;
+#X msg 28 481 cis \$1 \, boom \$2 \, bah \$3;
+#X text 124 455 <-- creation arguments to "pack" set the number of
+inlets.;
+#X connect 1 0 14 0;
+#X connect 2 0 14 0;
+#X connect 3 0 23 0;
+#X connect 4 0 3 0;
+#X connect 5 0 0 0;
+#X connect 6 0 5 0;
+#X connect 7 0 21 0;
+#X connect 8 0 28 0;
+#X connect 9 0 28 1;
+#X connect 12 0 11 0;
+#X connect 13 0 10 0;
+#X connect 16 0 14 0;
+#X connect 28 0 30 0;
+#X connect 29 0 28 2;
+#X connect 30 0 27 0;
diff --git a/pd/doc/2.control.examples/11.review.pd b/pd/doc/2.control.examples/11.review.pd
new file mode 100644
index 00000000..9e5b6c95
--- /dev/null
+++ b/pd/doc/2.control.examples/11.review.pd
@@ -0,0 +1,42 @@
+#N canvas 255 248 675 539 12;
+#X text 406 511 updated for Pd version 0.34;
+#X obj 39 232 receive;
+#X obj 39 203 send;
+#X obj 39 289 pack;
+#X obj 111 233 r;
+#X obj 82 203 s;
+#X obj 40 348 timer;
+#X obj 40 60 float;
+#X obj 39 175 select;
+#X obj 40 89 +;
+#X obj 40 117 >=;
+#X obj 39 146 print;
+#X obj 39 260 trigger;
+#X obj 95 61 f;
+#X obj 100 176 sel;
+#X obj 111 259 t;
+#X obj 39 318 unpack;
+#X obj 40 435 pipe;
+#X obj 40 377 delay;
+#X obj 40 406 metro;
+#X text 20 8 So far we've seen the following objects \, some of which
+have abbreviations. Right click on any one to get reference documentation:
+;
+#X text 150 205 wireless message send;
+#X text 151 229 wireless message receive;
+#X text 145 175 test for two equal numbers;
+#X text 151 258 control message order and format;
+#X text 148 293 combine atoms (e.g. \, numbers) into a list;
+#X text 146 319 take a list apart into atoms;
+#X text 146 146 printout;
+#X text 147 90 arithmetic;
+#X text 75 89 (etc.);
+#X text 74 117 (etc.);
+#X text 145 117 comparison;
+#X text 145 60 store a number;
+#X text 145 348 measure elapsed time;
+#X text 145 379 pass a message after delay;
+#X text 145 437 multiple delay;
+#X text 143 409 repeated message;
+#X text 38 473 There are many others... you can see a complete list
+in INTRO.txt in the reference patches (../5.reference).;
diff --git a/pd/doc/2.control.examples/12.PART2.subpatch.pd b/pd/doc/2.control.examples/12.PART2.subpatch.pd
new file mode 100644
index 00000000..5bd40306
--- /dev/null
+++ b/pd/doc/2.control.examples/12.PART2.subpatch.pd
@@ -0,0 +1,72 @@
+#N canvas 84 47 648 623 12;
+#X msg 29 318 bang;
+#X floatatom 432 341 0 0 0;
+#X text 32 14 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
+;
+#N canvas 344 151 422 119 sample-subpatch 1;
+#X text 39 43 this is a subpatch of the main patch.;
+#X restore 29 85 pd sample-subpatch;
+#X text 201 85 <-- you can give the window a name as an argument;
+#N canvas 0 0 654 340 eager-adder 0;
+#X obj 62 73 inlet;
+#X obj 118 73 inlet;
+#X obj 62 188 outlet;
+#X obj 118 101 t b f;
+#X obj 62 156 +;
+#X text 197 23 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.;
+#X text 55 232 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.;
+#X text 197 112 Because of the two inlets and the one outlet \, the
+containing box (int eh parent patch) has two inlets and one outlet.
+They respect the left-to-right order of the inlet and outlet objects
+in the subpatch.;
+#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 135 185 pd eager-adder;
+#X floatatom 135 158 0 0 0;
+#X floatatom 256 158 0 0 0;
+#X floatatom 135 213 0 0 0;
+#X text 26 235 There is also a facility for making many copies of a
+patch which track any changes you make in the original. The subpatches
+are called abstractions. For example \, here's a simple abstraction
+that sends a number to a "receive" on command:;
+#X obj 29 342 sendnumber 45 cookies;
+#X msg 226 314 bang;
+#X obj 226 341 sendnumber 67 pretzels;
+#X floatatom 519 341 0 0 0;
+#X text 27 553 note that "$1" \, etc \, has a different meaning in
+object boxes (open one of the "sendnumber" abstractions for comments.)
+;
+#X text 26 470 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.);
+#X obj 432 314 r cookies;
+#X obj 519 314 r pretzels;
+#X text 31 107 If you click on the box (in run mode) the subwindow
+appears. Click on the one below to see how you give a subpatch inlets
+and outlets.;
+#X text 332 594 updated for Pd version 0.34;
+#X text 27 372 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.;
+#X connect 0 0 10 0;
+#X connect 5 0 8 0;
+#X connect 6 0 5 0;
+#X connect 7 0 5 1;
+#X connect 11 0 12 0;
+#X connect 16 0 1 0;
+#X connect 17 0 13 0;
diff --git a/pd/doc/2.control.examples/13.locality.pd b/pd/doc/2.control.examples/13.locality.pd
new file mode 100644
index 00000000..6203ad98
--- /dev/null
+++ b/pd/doc/2.control.examples/13.locality.pd
@@ -0,0 +1,27 @@
+#N canvas 24 192 606 297 12;
+#X floatatom 38 223 0 0 0;
+#X floatatom 191 221 0 0 0;
+#X text 356 264 updated for Pd version 0.34;
+#X text 32 14 You can use dollarsigns in abstractions to get local
+sends and receives as shown here.;
+#X obj 29 85 dollarsign one;
+#X obj 167 86 dollarsign two;
+#X obj 38 196 r one-a;
+#X obj 191 194 r two-a;
+#X floatatom 110 225 0 0 0;
+#X floatatom 264 220 0 0 0;
+#X obj 110 197 r one-b;
+#X obj 264 191 r two-b;
+#X text 26 112 Open both copies to see what's happening...;
+#X floatatom 29 59 0 0 0;
+#X floatatom 124 58 0 0 0;
+#X floatatom 167 60 0 0 0;
+#X floatatom 264 58 0 0 0;
+#X connect 6 0 0 0;
+#X connect 7 0 1 0;
+#X connect 10 0 8 0;
+#X connect 11 0 9 0;
+#X connect 13 0 4 0;
+#X connect 14 0 4 1;
+#X connect 15 0 5 0;
+#X connect 16 0 5 1;
diff --git a/pd/doc/2.control.examples/14.dollarsigns.pd b/pd/doc/2.control.examples/14.dollarsigns.pd
new file mode 100644
index 00000000..c4b6eee3
--- /dev/null
+++ b/pd/doc/2.control.examples/14.dollarsigns.pd
@@ -0,0 +1,5 @@
+#N canvas 12 363 561 155 12;
+#X text 303 114 updated for Pd version 0.34;
+#X obj 34 68 dollarsign2 three 4;
+#X text 32 14 An abstraction's creation arguments may be either numbers
+or symbols. Gory details are inside:;
diff --git a/pd/doc/2.control.examples/15.array.pd b/pd/doc/2.control.examples/15.array.pd
new file mode 100644
index 00000000..da054b1e
--- /dev/null
+++ b/pd/doc/2.control.examples/15.array.pd
@@ -0,0 +1,70 @@
+#N canvas 268 28 1030 744 12;
+#X text 204 19 ARRAYS;
+#N canvas 0 0 450 300 graph1 0;
+#X array array99 100 float 0;
+#X coords 0 1 99 -1 400 300 1;
+#X restore 614 49 graph;
+#X msg 179 325 \; array99 resize \$1;
+#X floatatom 179 292 0 0 0;
+#X floatatom 21 260 0 0 0;
+#X obj 21 294 / 100;
+#X msg 21 324 \; array99 const \$1;
+#X text 22 233 You can send messages to an array object:;
+#X msg 341 325 \; array99 print;
+#X text 64 262 <-- set to a constant value;
+#X text 221 291 resize;
+#X text 342 286 print size;
+#X text 22 487 read a text file;
+#X text 23 558 write a text file;
+#X text 271 559 write a WAV format soundfile;
+#X obj 104 714 tabread;
+#X obj 255 714 tabwrite;
+#X text 20 665 Objects are provided for reading and writing the contents
+of arrays via control messages:;
+#X obj 602 654 tabread4~;
+#X obj 602 679 tabwrite~;
+#X obj 695 654 tabreceive~;
+#X text 593 601 ...and audio signals:;
+#X obj 695 630 tabsend~;
+#X msg 381 400 \; array99 normalize;
+#X msg 382 442 \; array99 normalize 0.5;
+#X text 375 378 normalize to 1 or otherwise;
+#X obj 266 537 soundfiler;
+#X obj 812 631 tabosc4~;
+#X msg 19 402 \; array99 sinesum 64 0.2 0.2 0.2 0.2;
+#X msg 19 444 \; array99 cosinesum 64 0.2 0.2 0.2 0.2;
+#X text 23 378 Fourier synthesis (resizes table);
+#X text 257 484 read a soundfile;
+#X text 735 698 last updated for release 0.34;
+#X obj 175 715 tabread4;
+#X obj 602 628 tabread~;
+#X msg 267 511 read ../sound/voice2.wav array99;
+#X text 19 47 Arrays in Pd provide a unified way to deal with lists
+of numbers \, treating them as either audio samples or for "control"
+uses. To make one \, select "array" on the "new" menu. Dialogs appear
+to help you choose the name \, number of elements \, and various flags.
+;
+#X text 17 134 You can also change the array size using the "resize"
+message shown below. Arrays live in graphs and graphs may hold more
+than one array--however \, graphs containing more than one array won't
+know how to readjust themselves automatically when the arrays are resized.
+;
+#X msg 15 507 \; array99 read 15.file.txt;
+#X obj 26 581 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 26 600 savepanel;
+#X msg 26 623 \; array99 write \$1;
+#X obj 270 577 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 270 596 savepanel;
+#X obj 270 642 soundfiler;
+#X msg 270 619 write \$1 array99;
+#X connect 3 0 2 0;
+#X connect 4 0 5 0;
+#X connect 5 0 6 0;
+#X connect 35 0 26 0;
+#X connect 39 0 40 0;
+#X connect 40 0 41 0;
+#X connect 42 0 43 0;
+#X connect 43 0 45 0;
+#X connect 45 0 44 0;
diff --git a/pd/doc/2.control.examples/15.file.txt b/pd/doc/2.control.examples/15.file.txt
new file mode 100644
index 00000000..6fc963dd
--- /dev/null
+++ b/pd/doc/2.control.examples/15.file.txt
@@ -0,0 +1,2 @@
+0.3
+-0.6 -0.2 0.8 0
diff --git a/pd/doc/2.control.examples/16.more.arrays.pd b/pd/doc/2.control.examples/16.more.arrays.pd
new file mode 100644
index 00000000..cf9eacc1
--- /dev/null
+++ b/pd/doc/2.control.examples/16.more.arrays.pd
@@ -0,0 +1,23 @@
+#N canvas 19 83 830 601 12;
+#X graph graph1 0 -1 5 1 569 304 769 154;
+#X array array99 5 float;
+#X array array98 7 float;
+#X pop;
+#X text 135 18 MORE ON ARRAYS;
+#X msg 17 229 \; array99 rename george;
+#X msg 221 229 \; george rename array99;
+#X msg 317 166 \; array99 3 -0.5 0.5;
+#X text 17 207 renaming an array:;
+#X text 16 276 setting the bounds rectangle:;
+#X msg 18 296 \; array99 bounds 0 -2 10 2;
+#X msg 245 294 \; array99 bounds 0 -1 5 1;
+#X msg 19 395 \; array99 xticks 0 1 1;
+#X msg 212 394 \; array99 yticks 0 0.1 5;
+#X text 15 342 adding x and y labels: give a point to put a tick \, the interval between ticks \, and the number of ticks overall per large tick.;
+#X msg 15 472 \; array99 xlabel -1.1 0 1 2 3 4 5;
+#X text 12 436 adding labels. Give a y value and a bunch of x values or vice versa:;
+#X msg 17 166 \; array98 0 -1 1 -1 1 -1 1 -1 1 -1;
+#X msg 305 472 \; array99 ylabel 5.15 -1 0 1;
+#X text 556 575 last updated for release 0.33;
+#X text 10 39 Arrays have methods to set their values explicitly \; to set their "bounds" rectangles \, to rename them (but if you have two with the same name this won't necessarily do what you want) and to add markings. To set values by message \, send a list whise first element gives the index to start at. The second example sets two values starting at index three. Indices count up from zero.;
+#X text 11 522 You can also change x and y range and size in the "properties" dialog. Note that information about size and ranges is saved \, but ticks \, labels \, and the actual data are lost between Pd sessions.;
diff --git a/pd/doc/2.control.examples/17.PART3.midi.pd b/pd/doc/2.control.examples/17.PART3.midi.pd
new file mode 100644
index 00000000..b2467cd9
--- /dev/null
+++ b/pd/doc/2.control.examples/17.PART3.midi.pd
@@ -0,0 +1,35 @@
+#N canvas 47 52 517 445 12;
+#X floatatom 108 89 0 0 0;
+#X floatatom 72 89 0 0 0;
+#X obj 36 62 notein;
+#X floatatom 36 88 0 0 0;
+#X floatatom 228 91 0 0 0;
+#X floatatom 192 91 0 0 0;
+#X floatatom 156 90 0 0 0;
+#X obj 156 64 ctlin;
+#X floatatom 319 90 0 0 0;
+#X floatatom 283 89 0 0 0;
+#X obj 283 63 bendin;
+#X floatatom 329 128 0 0 0;
+#X floatatom 285 127 0 0 0;
+#X obj 285 157 bendout;
+#X text 23 18 Pd offers input and output objects for MIDI:;
+#X text 358 154 ... ad nauseam.;
+#X text 254 417 updated for Pd version 0.34;
+#X obj 39 321 midiout;
+#X obj 244 368 sysexin;
+#X msg 39 291 240 \, 45 \, 93 \, 3 \, 65 \, 1 \, 2 \, 3 \, 4 \, 247
+;
+#X text 32 252 You can format your own SYSEX messages as shown:;
+#X text 28 366 and receive SYSEX via:;
+#X connect 2 0 3 0;
+#X connect 2 1 1 0;
+#X connect 2 2 0 0;
+#X connect 7 0 6 0;
+#X connect 7 1 5 0;
+#X connect 7 2 4 0;
+#X connect 10 0 9 0;
+#X connect 10 1 8 0;
+#X connect 11 0 13 1;
+#X connect 12 0 13 0;
+#X connect 19 0 17 0;
diff --git a/pd/doc/2.control.examples/18.conditional.pd b/pd/doc/2.control.examples/18.conditional.pd
new file mode 100644
index 00000000..6bde3747
--- /dev/null
+++ b/pd/doc/2.control.examples/18.conditional.pd
@@ -0,0 +1,59 @@
+#N canvas 538 239 665 516 12;
+#X text 395 489 updated for Pd version 0.26;
+#X obj 87 148 select 1 2;
+#X floatatom 87 120 0 0 0;
+#X obj 87 214 print select-1;
+#X obj 119 194 print select-2;
+#X obj 152 171 print select-3;
+#X floatatom 313 122 0 0 0;
+#X obj 313 155 pack;
+#X obj 313 182 route 1 2;
+#X obj 353 131 t b f;
+#X floatatom 353 107 0 0 0;
+#X obj 371 210 unpack;
+#X floatatom 313 210 0 0 0;
+#X floatatom 342 210 0 0 0;
+#X floatatom 371 233 0 0 0;
+#X floatatom 409 234 0 0 0;
+#X text 30 20 Pd provides at least four objects for doing conditioonal
+computations. The "select" object tests its input against its argumt(s)
+\, and outputs "bang" when they match. The "route" object works similarly
+but also copies data. In other wors \, "route" takes a list \, tests
+its first element \, and conditionally passes on the rest of the list.
+;
+#X text 56 262 You also get "spigot" which turns a flow of messages
+on and off (like the Gate object in Max \, but with the inputs reversed):
+;
+#X floatatom 125 316 0 0 0;
+#X obj 125 341 spigot;
+#X floatatom 162 316 0 0 0;
+#X floatatom 125 365 0 0 0;
+#X text 192 317 <-- nonzero to open;
+#X text 157 365 if open \, messages coming in at left are sent to output.
+;
+#X text 55 396 And finally \, "moses" sends numbers to the left if
+they're less than the argument \, right otherwise:;
+#X floatatom 125 427 0 0 0;
+#X floatatom 125 476 0 0 0;
+#X obj 125 452 moses 5;
+#X floatatom 169 476 0 0 0;
+#X connect 1 0 3 0;
+#X connect 1 1 4 0;
+#X connect 1 2 5 0;
+#X connect 2 0 1 0;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 8 0 12 0;
+#X connect 8 1 13 0;
+#X connect 8 2 11 0;
+#X connect 9 0 7 0;
+#X connect 9 1 7 1;
+#X connect 10 0 9 0;
+#X connect 11 0 14 0;
+#X connect 11 1 15 0;
+#X connect 18 0 19 0;
+#X connect 19 0 21 0;
+#X connect 20 0 19 1;
+#X connect 25 0 27 0;
+#X connect 27 0 26 0;
+#X connect 27 1 28 0;
diff --git a/pd/doc/2.control.examples/19.random.pd b/pd/doc/2.control.examples/19.random.pd
new file mode 100644
index 00000000..928be29f
--- /dev/null
+++ b/pd/doc/2.control.examples/19.random.pd
@@ -0,0 +1,39 @@
+#N canvas 47 52 722 449 12;
+#X text 460 422 updated for Pd version 0.26;
+#X text 35 28 Use the "random" object to make pseudo-random integers.
+To get continuously variable random numbers \, make a random number
+in a large range and divide:;
+#X obj 103 121 random 5;
+#X msg 103 95 bang;
+#X floatatom 103 147 0 0 0;
+#X text 137 147 outputs from 0 to 4;
+#X msg 337 87 bang;
+#X floatatom 336 165 0 0 0;
+#X obj 337 113 random 1000;
+#X obj 336 141 / 1000;
+#X text 402 166 from 0 to 0.999;
+#X obj 71 324 random 5;
+#X msg 162 255 bang;
+#X floatatom 71 350 0 0 0;
+#X obj 71 244 loadbang;
+#X obj 71 274 timer;
+#X text 204 255 <-- click to seed;
+#X msg 71 299 seed \$1;
+#X msg 163 299 bang;
+#X text 204 300 <-- click to get random numbers;
+#X text 24 382 If you give two randoms the same seed they give the
+same sequence. If you never seed them \, you'll get different sequences
+out of each one.;
+#X text 34 197 If you don't want the same behavior every time you run
+the patch \, use the time from load to first click as a seed:;
+#X connect 2 0 4 0;
+#X connect 3 0 2 0;
+#X connect 6 0 8 0;
+#X connect 8 0 9 0;
+#X connect 9 0 7 0;
+#X connect 11 0 13 0;
+#X connect 12 0 15 1;
+#X connect 14 0 15 0;
+#X connect 15 0 17 0;
+#X connect 17 0 11 0;
+#X connect 18 0 11 0;
diff --git a/pd/doc/2.control.examples/20.weighted-random.pd b/pd/doc/2.control.examples/20.weighted-random.pd
new file mode 100644
index 00000000..ed964a06
--- /dev/null
+++ b/pd/doc/2.control.examples/20.weighted-random.pd
@@ -0,0 +1,44 @@
+#N canvas 161 46 660 441 12;
+#X msg 103 95 bang;
+#X text 389 414 updated for Pd version 0.35;
+#X text 44 19 You can generate weighted random numbers from uniformly
+distributed ones. If you just want two possible outcomes with a varying
+probability for each one \, you can do as shown:;
+#X obj 103 121 random 100;
+#X obj 102 174 bng 20 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 169 174 bng 20 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X floatatom 205 148 3 0 100;
+#X text 250 148 <-- change probablilty;
+#X obj 103 149 moses 80;
+#X text 152 93 <-- click to test;
+#X text 61 219 This outputs a number at left 80% of the time \, otherwise
+at right \, unless you override the "80" using the number box. You
+may extend this to more than two possible outcomes \, for instance
+like this:;
+#X msg 106 305 bang;
+#X obj 106 331 random 100;
+#X obj 105 384 bng 20 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 195 387 bng 20 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 155 303 <-- click to test;
+#X obj 106 359 moses 10;
+#X obj 196 360 moses 30;
+#X obj 263 387 bng 20 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 103 409 10%;
+#X text 193 410 20%;
+#X text 265 409 70%;
+#X connect 0 0 3 0;
+#X connect 3 0 8 0;
+#X connect 6 0 8 1;
+#X connect 8 0 4 0;
+#X connect 8 1 5 0;
+#X connect 11 0 12 0;
+#X connect 12 0 16 0;
+#X connect 16 0 13 0;
+#X connect 16 1 17 0;
+#X connect 17 0 14 0;
+#X connect 17 1 18 0;
diff --git a/pd/doc/2.control.examples/21.markov.chain.pd b/pd/doc/2.control.examples/21.markov.chain.pd
new file mode 100644
index 00000000..36ca0db8
--- /dev/null
+++ b/pd/doc/2.control.examples/21.markov.chain.pd
@@ -0,0 +1,105 @@
+#N canvas 296 90 662 442 12;
+#X obj 84 251 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X obj 81 336 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X obj 162 335 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X obj 199 337 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X msg 81 358 1;
+#X msg 162 360 2;
+#X msg 199 361 3;
+#X obj 81 386 s state;
+#X obj 66 173 bng 20 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X obj 105 164 r state;
+#X obj 83 225 sel 1 2 3;
+#X obj 255 253 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X obj 252 338 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X obj 334 340 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X obj 373 343 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X msg 252 361 1;
+#X msg 329 366 2;
+#X msg 373 367 3;
+#X obj 252 394 s state;
+#X obj 419 254 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X obj 419 339 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X obj 499 338 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X obj 538 341 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
+-1;
+#X msg 419 362 1;
+#X msg 499 363 2;
+#X msg 538 364 3;
+#X obj 418 395 s state;
+#X msg 236 186 \; state 1;
+#X obj 83 199 f 1;
+#X obj 84 279 random 100;
+#X obj 83 308 moses 30;
+#X obj 162 309 moses 60;
+#X obj 255 280 random 100;
+#X obj 255 310 moses 10;
+#X obj 334 311 moses 60;
+#X obj 419 281 random 100;
+#X obj 419 310 moses 70;
+#X obj 499 310 moses 80;
+#X floatatom 134 188 3 0 0;
+#X text 236 166 reset;
+#X text 49 152 STEP;
+#X text 34 20 Here is how to construct a simple \, three-valued Markov
+chain using "random." Each time you click on "step" the previous output
+("state") determines which of three random networks to invoke \, each
+having a different probability distribution for the next value of "state."
+For instance if the state was 3 \, the next state will be 1 70% of
+the time \, state 2 10% \, and state 3 20%.;
+#X text 408 422 updated for Pd version 0.35;
+#X connect 0 0 29 0;
+#X connect 1 0 4 0;
+#X connect 2 0 5 0;
+#X connect 3 0 6 0;
+#X connect 4 0 7 0;
+#X connect 5 0 7 0;
+#X connect 6 0 7 0;
+#X connect 8 0 28 0;
+#X connect 9 0 28 1;
+#X connect 9 0 38 0;
+#X connect 10 0 0 0;
+#X connect 10 1 11 0;
+#X connect 10 2 19 0;
+#X connect 11 0 32 0;
+#X connect 12 0 15 0;
+#X connect 13 0 16 0;
+#X connect 14 0 17 0;
+#X connect 15 0 18 0;
+#X connect 16 0 18 0;
+#X connect 17 0 18 0;
+#X connect 19 0 35 0;
+#X connect 20 0 23 0;
+#X connect 21 0 24 0;
+#X connect 22 0 25 0;
+#X connect 23 0 26 0;
+#X connect 24 0 26 0;
+#X connect 25 0 26 0;
+#X connect 28 0 10 0;
+#X connect 29 0 30 0;
+#X connect 30 0 1 0;
+#X connect 30 1 31 0;
+#X connect 31 0 2 0;
+#X connect 31 1 3 0;
+#X connect 32 0 33 0;
+#X connect 33 0 12 0;
+#X connect 33 1 34 0;
+#X connect 34 0 13 0;
+#X connect 34 1 14 0;
+#X connect 35 0 36 0;
+#X connect 36 0 20 0;
+#X connect 36 1 37 0;
+#X connect 37 0 21 0;
+#X connect 37 1 22 0;
diff --git a/pd/doc/2.control.examples/22.sequencing.pd b/pd/doc/2.control.examples/22.sequencing.pd
new file mode 100644
index 00000000..efddcb21
--- /dev/null
+++ b/pd/doc/2.control.examples/22.sequencing.pd
@@ -0,0 +1,20 @@
+#N canvas 47 52 679 466 12;
+#X text 465 442 updated for Pd version 0.26;
+#X text 35 28 You can use "qlist" or "textfile" objects for sequencing. Qlist is simpler to use than the (more versatile) textfile.;
+#X obj 355 146 r receive1;
+#X obj 441 146 r receive2;
+#X msg 205 88 clear \, add receive1 1 \, add 1000 receive1 0 \, add receive2 2 \, add 1000 receive2 0 \, add receive1 3 \, bang;
+#X obj 205 129 qlist;
+#X floatatom 355 172;
+#X floatatom 441 171;
+#X text 23 210 The "add" messages add lines to the qlist \, so that it contains:;
+#X text 155 238 receive1 1;
+#X text 121 259 1000 receive1 0;
+#X text 155 279 receive2 2;
+#X text 120 299 1000 receive2 0;
+#X text 155 317 receive1 3;
+#X text 17 342 and the "bang" instructs qlist to play the sequence by sending messages to "receive" objects. MEssages starting with numbers request that amount of delay.;
+#X text 16 391 If you have more than 5 lines or so wou will probably want to store them as a separate file and have qlist read it. You can also write files \, set tempo \, and single step... see the help patch for details.;
+#X connect 2 0 6 0;
+#X connect 3 0 7 0;
+#X connect 4 0 5 0;
diff --git a/pd/doc/2.control.examples/dollarsign.pd b/pd/doc/2.control.examples/dollarsign.pd
new file mode 100644
index 00000000..0697a570
--- /dev/null
+++ b/pd/doc/2.control.examples/dollarsign.pd
@@ -0,0 +1,35 @@
+#N canvas 62 73 586 361 12;
+#X obj 207 44 inlet;
+#X obj 207 71 s \$1-a;
+#X obj 302 72 s \$1-b;
+#X text 331 337 updated for Pd version 0.34;
+#X text 63 7 This is an abstraction used in example 12 \, "locality".
+;
+#X obj 302 47 inlet;
+#X obj 62 249 s \$1-c;
+#X obj 62 279 r \$1-c;
+#X floatatom 62 218 5 0 0;
+#X floatatom 62 307 5 0 0;
+#X obj 164 250 s here's-what-happens-if-you-dont;
+#X obj 163 280 r here's-what-happens-if-you-dont;
+#X floatatom 163 308 5 0 0;
+#X floatatom 164 220 5 0 0;
+#X floatatom 487 224 5 0 0;
+#X floatatom 488 307 5 0 0;
+#X obj 487 251 s \$0-d;
+#X obj 488 281 r \$0-d;
+#X text 47 94 The sends above get named "one-a" \, etc. The window
+title bar tells you the creation arguments for this particular instance.
+You can use this to make internal local connections as shown below.
+The "$1-c" boxes act locally whereas the middle boxes get crosstalk
+between the windows. The boxes at right also get unique names but in
+this case you don't have to secify "$0" \, it's just something unique.
+;
+#X connect 0 0 1 0;
+#X connect 5 0 2 0;
+#X connect 7 0 9 0;
+#X connect 8 0 6 0;
+#X connect 11 0 12 0;
+#X connect 13 0 10 0;
+#X connect 14 0 16 0;
+#X connect 17 0 15 0;
diff --git a/pd/doc/2.control.examples/dollarsign2.pd b/pd/doc/2.control.examples/dollarsign2.pd
new file mode 100644
index 00000000..c3d149f6
--- /dev/null
+++ b/pd/doc/2.control.examples/dollarsign2.pd
@@ -0,0 +1,54 @@
+#N canvas 22 54 588 671 12;
+#X text 324 642 updated for Pd version 0.34;
+#X text 34 6 This is an abstraction used in example 13 \, "dollarsigns".
+;
+#X obj 88 107 send \$1;
+#X obj 199 106 + \$2;
+#X floatatom 303 88 0 0 0;
+#X obj 303 139 print;
+#X msg 303 113 blah \$1;
+#X text 36 163 This may sound inconsistant \, but it's not--object
+and message boxes are both actually messages \, but in the case of
+the Object box the message is passed at creation time \, and for the
+Message box \, at message time.;
+#X msg 188 272 bang;
+#X obj 188 300 symbol \$1;
+#X msg 98 272 bang;
+#X obj 98 300 float \$2;
+#X floatatom 98 327 5 0 0;
+#X symbolatom 188 329 10 0 0;
+#X text 36 233 So how do you put creation arguments in messages? Use
+"float" and "symbol" as shown:;
+#X msg 97 383 bang;
+#X obj 97 407 float \$2;
+#X msg 97 434 five \$1;
+#X text 41 357 Then if you wish \, connect to a message box as in:
+;
+#X obj 97 459 print;
+#X msg 143 512 bang;
+#X obj 143 564 symbol \$1;
+#X obj 237 560 f \$2;
+#X obj 143 540 t b b;
+#X obj 142 587 pack symbol float;
+#X msg 142 613 six \$1 \$2;
+#X obj 142 640 print;
+#X text 31 485 For messages combining more than one creation argument
+try:;
+#X text 37 50 In Object boxes \, dollar signs refer to the abstraction's
+creation arguments. In Messages \, they change dynamically:;
+#X connect 4 0 6 0;
+#X connect 6 0 5 0;
+#X connect 8 0 9 0;
+#X connect 9 0 13 0;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 15 0 16 0;
+#X connect 16 0 17 0;
+#X connect 17 0 19 0;
+#X connect 20 0 23 0;
+#X connect 21 0 24 0;
+#X connect 22 0 24 1;
+#X connect 23 0 21 0;
+#X connect 23 1 22 0;
+#X connect 24 0 25 0;
+#X connect 25 0 26 0;
diff --git a/pd/doc/2.control.examples/sendnumber.pd b/pd/doc/2.control.examples/sendnumber.pd
new file mode 100644
index 00000000..00f2eb04
--- /dev/null
+++ b/pd/doc/2.control.examples/sendnumber.pd
@@ -0,0 +1,20 @@
+#N canvas 171 73 718 283 12;
+#X obj 34 60 inlet;
+#X obj 34 88 float \$1;
+#X obj 34 116 send \$2;
+#X text 26 225 For obvious reasons you might not want to call a patch
+as an abstraction from itself.;
+#X text 151 183 In this case \$1 is a number you can specify and \$2
+is a "send" destination.;
+#X text 461 260 updated for Pd version 0.26;
+#X text 154 103 When you call an abstraction by typing \, say \, "sendnumber
+1 x" in an object box. the subpatch can access the values of the creation
+arguments (1 and x) as "$1" and "$2" innside object boxes. Typing \$1
+inside a message box has a different meaning (see the message box help
+window.);
+#X text 155 31 This window is used by 11.subpatch.pd to demonstrate
+the abstraction mechanism in Pd. If you've opened this window directly
+\, you might also want to open the other one to see how it's used.
+;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;