aboutsummaryrefslogtreecommitdiff
path: root/desiredata/doc/4.data.structures
diff options
context:
space:
mode:
Diffstat (limited to 'desiredata/doc/4.data.structures')
-rw-r--r--desiredata/doc/4.data.structures/00.intro.txt113
-rw-r--r--desiredata/doc/4.data.structures/01.scalars.pd63
-rw-r--r--desiredata/doc/4.data.structures/02.getting.data.pd77
-rw-r--r--desiredata/doc/4.data.structures/03.setting.data.pd141
-rw-r--r--desiredata/doc/4.data.structures/04.append.pd36
-rw-r--r--desiredata/doc/4.data.structures/05.array.pd120
-rw-r--r--desiredata/doc/4.data.structures/06.file.pd69
-rw-r--r--desiredata/doc/4.data.structures/07.sequencer.pd148
-rw-r--r--desiredata/doc/4.data.structures/08.selection.pd81
-rw-r--r--desiredata/doc/4.data.structures/09.scaling.pd74
-rw-r--r--desiredata/doc/4.data.structures/10.onoff.pd51
-rw-r--r--desiredata/doc/4.data.structures/11.array.controls.pd49
-rw-r--r--desiredata/doc/4.data.structures/12.beat-patterns.pd455
-rw-r--r--desiredata/doc/4.data.structures/13.sliderule.pd205
-rw-r--r--desiredata/doc/4.data.structures/14.sinedecomposer.pd250
-rw-r--r--desiredata/doc/4.data.structures/15.partialtracer.pd839
-rw-r--r--desiredata/doc/4.data.structures/add-trace.pd152
-rw-r--r--desiredata/doc/4.data.structures/beat-maker.pd44
-rw-r--r--desiredata/doc/4.data.structures/data-array.pd64
-rw-r--r--desiredata/doc/4.data.structures/data-start.pd40
-rw-r--r--desiredata/doc/4.data.structures/file.txt39
-rw-r--r--desiredata/doc/4.data.structures/osc-voice.pd54
-rw-r--r--desiredata/doc/4.data.structures/output~.pd66
-rw-r--r--desiredata/doc/4.data.structures/voice.pd119
-rw-r--r--desiredata/doc/4.data.structures/z.txt64
25 files changed, 3413 insertions, 0 deletions
diff --git a/desiredata/doc/4.data.structures/00.intro.txt b/desiredata/doc/4.data.structures/00.intro.txt
new file mode 100644
index 00000000..a1df9a88
--- /dev/null
+++ b/desiredata/doc/4.data.structures/00.intro.txt
@@ -0,0 +1,113 @@
+Pd release 0.23 and onward include objects for managing lists of data. The
+objects allow you to describe data structures and how they are viewed
+("template objects") and to traverse lists ("traversal objects.")
+
+The rest of this file gives a highly condensed summary of what's there; the
+patches, starting with "1.scalars.pd", act as a tutorial.
+
+1. TEMPLATE OBJECTS.
+
+templates describe data structures. You can add an item to a data structure
+using "field" or ask for a shape to be drawn using a "display command."
+
+1.1. "template" -- data structure.
+
+usage, "template <field1> <field2> ..."
+
+where the fields are either "float <name>", "symbol <name>", "list <name>"
+(don't try that yet); or "array <name> <template-for-elements>.
+
+1.2. DISPLAY COMMANDS.
+
+
+These are objects which ask Pd to draw a shape corresponding to some fields
+of the datum.
+
+1.2.1. POLYGONS and CURVES.
+
+polygons: polygon <outline-color> <line-width> <x, y> ...
+filled polygons: fpolygon <fill-color> <outline-color> <line-width> <x, y> ...
+curves: curve <outline-color> <line-width> <x, y> ...
+filled curves: fcurve <fill-color> <outline-color> <line-width> <x, y> ...
+
+Each argument can either be a number or a symbol. If a symbol, it's the
+name of a field (which must be a "float) which specifies the vaiue.
+So for instance in the "1.scalar.pd" example, in the template "template1",
+the object "fpolygon 244 q 5 0 0 20 z 40 0" draws a filled polygon whose
+interior color is 244 (red 2, green 4, blue 4) but whose outline color
+depends on the value of the field "q". Its coordinates describe a triangle
+whose altitude is given by "z."
+
+1.2.2 PLOT.
+
+The "plot" objects plots an array field as shown in 5_array.pd.
+
+2. TRAVERSAL.
+
+In this release of Pd, you can only traverse lists all of whose elements
+belong to the same template; this restriction will be relaxed in a future
+release. You "traverse" a list either to build it, to get its elements,
+or to change their values.
+
+2.1. POINTER.
+
+The "pointer" object can be used to refer to an element of a list. Its
+methods are:
+
+2.1.1. traverse <symbol>.
+
+Point to the "head" of a list. The symbol should match the name of a Pd
+window holding the list. The pointer is output, but you can't set or get the
+fields of the "head" pointer; you can only get the "next" element or "append"
+to the list.
+
+2.1.2. next. Goes to the next element of the list. Either the pointer
+is output on the left side, or else a "bang" at right tells you that no
+more objects are forthcoming.
+
+2.1.3. bang.
+outputs the current pointer.
+
+2.2. APPEND. Adds an element of the specified template to the list. You
+specify what fields you want to supply and the last inlet takes a pointer to
+the element you want to "append" after.
+
+2.3. GET.
+
+ get <template> <field...>
+
+send it a pointer to an object belonging to the <template> and it outputs
+the (floating-point) fields.
+
+2.4. SET.
+
+ set <template> <field...>
+
+send it a pointer (at the rightmost inlet) and values for the specified
+fields, and their values are changed accordingly.
+
+2.5. GETSIZE.
+
+ getsize <template> <array-field>
+
+outputs the size of the named field, which must be an array, when it receives
+a pointer to the owner as input.
+
+2.6. SETSIZE.
+
+ setsize <template> <array-field>
+
+Send it a pointer to the owner (right inlet) and then the desired size
+(left inlet) and the array is resized. If a template contains an array,
+each scalar belonging to the template can have its own size for the array.
+
+2.7. ELEMENT.
+
+ element <template> <array-field>
+
+Pass it an index and a pointer and it outputs a pointer to an element of the
+array.
+
+
+
+
diff --git a/desiredata/doc/4.data.structures/01.scalars.pd b/desiredata/doc/4.data.structures/01.scalars.pd
new file mode 100644
index 00000000..ec5794cb
--- /dev/null
+++ b/desiredata/doc/4.data.structures/01.scalars.pd
@@ -0,0 +1,63 @@
+#N struct template1 float x float y float z float q;
+#N canvas 363 11 579 461 12;
+#N canvas 13 22 297 180 data 1;
+#X scalar template1 50 100 30 9 \;;
+#X scalar template1 150 100 -20 900 \;;
+#X restore 60 347 pd data;
+#N canvas 10 274 550 324 template1 1;
+#X obj 60 46 filledpolygon 244 q 5 0 0 20 z 40 0;
+#X text 4 164 The filledpolygon's arguments are interior color \, border
+color \, border width \, and then the points of the polygon. Arguments
+which are symbols ("q" and "z" in this case) mean to take the values
+from the data structure. Other values are constant. The position of
+the object is automatically controlled by fields named "x" and "y".
+;
+#X obj 60 21 struct template1 float x float y float z float q;
+#X text 3 67 This subpatch acts as a template which describes the data
+structure. The "struct" specifies four floating point values named
+x \, y \, z \, and q. The "filledpolygon" is a drawing instruction.
+Templates should have only one template object but may have any number
+of drawing instructions.;
+#X restore 60 371 pd template1;
+#N canvas 0 0 440 292 stuff 0;
+#X obj 235 185 pointer;
+#X obj 28 187 append template1 x y z q;
+#X msg 235 127 \; pd-data clear;
+#X msg 235 163 traverse pd-data \, bang;
+#X obj 125 128 t b b b;
+#X msg 125 87 bang;
+#X obj 125 56 loadbang;
+#X text 159 87 click here to re-initialize;
+#X text 25 243 This subpatch sets up the "data" window with two objects.
+How this works will get explained later.;
+#X msg 28 164 50 100 30 9 \, 150 100 -20 900;
+#X connect 0 0 1 4;
+#X connect 3 0 0 0;
+#X connect 4 0 9 0;
+#X connect 4 1 3 0;
+#X connect 4 2 2 0;
+#X connect 5 0 4 0;
+#X connect 6 0 5 0;
+#X connect 9 0 1 0;
+#X restore 59 397 pd stuff;
+#X text 37 72 The positions \, border color \, and altitude of each
+triangle are numeric values which can control \, or be controlled by
+\, other elements of the patch.;
+#X text 37 124 When the data window is locked (not in edit mode) you
+can drag the apex of either triangle up or down to change the altitude
+(you should see the cursor change with dragging is meaningful.) In
+edit (unlocked) mode \, you can move teh entire triangles around \,
+or cut \, copy \, and paste them.;
+#X text 47 325 subpatches:;
+#X text 37 281 Data is not persistent. If you save a Pd patch and reopen
+it \, the "data" isn't preserved.;
+#X text 37 5 This patch shows a simple data window with two objects
+in it. The objects' data structures and appearances are defined by
+the "template1" subpatch. This kind of object is called a "scalar."
+;
+#X text 37 207 Scalars are described by "templates" \, which are subwindows.
+The subwindows are found by their name \, in this case "template1."
+The template describes what form the data take and how it is shown.
+It's possible to mix data of many different templates in the same collection.
+;
+#X text 294 398 updated for Pd version 0.35.;
diff --git a/desiredata/doc/4.data.structures/02.getting.data.pd b/desiredata/doc/4.data.structures/02.getting.data.pd
new file mode 100644
index 00000000..4b200052
--- /dev/null
+++ b/desiredata/doc/4.data.structures/02.getting.data.pd
@@ -0,0 +1,77 @@
+#N struct template2 float x float y float z float q float zz;
+#N canvas 138 2 630 580 12;
+#X text 345 543 updated for Pd version 0.32.;
+#N canvas 42 312 598 266 stuff 0;
+#X obj 353 159 pointer;
+#X obj 117 103 t b b b;
+#X msg 117 62 bang;
+#X obj 117 31 loadbang;
+#X text 163 62 click here to re-initialize;
+#X text 127 242 Explained later...;
+#X obj 28 208 append template2 x y z q;
+#X msg 353 101 \; pd-data2 clear;
+#X msg 353 137 traverse pd-data2 \, bang;
+#X msg 28 185 50 150 30 9 \, 200 100 -20 900 \, 100 100 -50 30;
+#X connect 0 0 6 4;
+#X connect 1 0 9 0;
+#X connect 1 1 8 0;
+#X connect 1 2 7 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 0;
+#X connect 8 0 0 0;
+#X connect 9 0 6 0;
+#X restore 506 310 pd stuff;
+#X text 506 242 subpatches:;
+#X obj 15 303 pointer;
+#X msg 27 271 next;
+#X text 75 301 <- object that outputs pointers to scalars;
+#N canvas 13 22 307 198 data2 1;
+#X scalar template2 50 150 30 9 0 \;;
+#X scalar template2 200 100 -20 900 0 \;;
+#X scalar template2 100 100 -50 30 0 \;;
+#X restore 506 265 pd data2;
+#N canvas 315 125 554 155 template2 1;
+#X text 13 79 The template for the two scalars \, as in the last patch
+;
+#X obj 15 46 filledpolygon 244 q 5 0 0 20 z 40 0;
+#X obj 14 21 struct template2 float x float y float z float q;
+#X restore 506 288 pd template2;
+#X obj 15 355 get template2 x y z q;
+#X floatatom 15 384 5 0 0 0 - - -;
+#X floatatom 76 384 5 0 0 0 - - -;
+#X floatatom 137 384 5 0 0 0 - - -;
+#X floatatom 199 385 5 0 0 0 - - -;
+#X msg 15 246 traverse pd-data2;
+#X obj 59 330 print;
+#X text 111 331 <- this gets a bang when we reach the end;
+#X text 211 353 <- this takes incoming pointers;
+#X text 214 367 and outputs the values of x \, y \, z \, and q.;
+#X text 172 245 <- go to head of list (click first);
+#X text 68 273 <- output next item (click 4 times);
+#X text 14 5 The simplest thing you can do with a collection of scalars
+(a list) is to traverse it \, getting the numbers back out. This is
+done using two objects \, "pointer" which does the traversal \, and
+"get" which \, given a pointer to a scalar \, extracts numeric quantities
+from it.;
+#X text 14 85 You can send the "pointer" object a "traverse" message
+to point it to the head of the list. The argument "pd-data2" indicates
+the Pd window named "data2." The head of the list means \, not the
+first scalar in the list \, but the position before the first scalar
+\, which is a valid pointer in Pd but has no data or template.;
+#X text 14 180 The "next" message tells the "pointer" object to go
+to the next scalar in the list and output it. If there are no more
+\, "pointer" outputs a bang at right.;
+#X text 19 424 The "get" object takes a pointer \, checks that its
+template agrees with what "get" is expecting \, i.e. \, "template2"
+\, and if so outputs the values of x \, y \, z \, and q in the usual
+reverse order.;
+#X text 18 492 The pointer sent from "pointer" to "get" is an elementary
+Pd type on a level with "float" and "symbol".;
+#X connect 3 0 8 0;
+#X connect 3 1 14 0;
+#X connect 4 0 3 0;
+#X connect 8 0 9 0;
+#X connect 8 1 10 0;
+#X connect 8 2 11 0;
+#X connect 8 3 12 0;
+#X connect 13 0 3 0;
diff --git a/desiredata/doc/4.data.structures/03.setting.data.pd b/desiredata/doc/4.data.structures/03.setting.data.pd
new file mode 100644
index 00000000..1f300ca3
--- /dev/null
+++ b/desiredata/doc/4.data.structures/03.setting.data.pd
@@ -0,0 +1,141 @@
+#N struct template3 float x float y float w float h float q;
+#N canvas 401 39 621 469 12;
+#X floatatom 60 371 0 0 0 0 - - -;
+#X floatatom 60 323 0 0 0 0 - - -;
+#X floatatom 60 275 0 0 0 0 - - -;
+#X floatatom 60 227 0 0 0 0 - - -;
+#X floatatom 324 322 0 0 0 0 - - -;
+#X floatatom 283 322 0 0 0 0 - - -;
+#X floatatom 240 322 0 0 0 0 - - -;
+#X obj 197 274 pointer;
+#X msg 205 249 next;
+#X floatatom 197 322 0 0 0 0 - - -;
+#N canvas 19 29 363 341 data3 1;
+#X scalar template3 18 25 43 18 741 \;;
+#X scalar template3 111 109 75 25 72 \;;
+#X scalar template3 111 32 4 15 163 \;;
+#X scalar template3 59 1 13 34 563 \;;
+#X scalar template3 148 26 37 20 566 \;;
+#X scalar template3 173 221 76 48 763 \;;
+#X scalar template3 250 127 18 36 543 \;;
+#X scalar template3 124 210 78 21 107 \;;
+#X scalar template3 264 183 32 32 178 \;;
+#X scalar template3 26 28 56 60 132 \;;
+#X scalar template3 2 202 66 2 808 \;;
+#X scalar template3 246 33 74 51 642 \;;
+#X scalar template3 214 226 8 43 180 \;;
+#X scalar template3 57 145 51 58 939 \;;
+#X scalar template3 216 102 36 43 505 \;;
+#X scalar template3 166 86 68 9 614 \;;
+#X scalar template3 144 191 56 28 886 \;;
+#X scalar template3 228 2 62 1 758 \;;
+#X scalar template3 168 169 48 22 644 \;;
+#X scalar template3 223 248 73 50 727 \;;
+#X restore 269 425 pd data3;
+#N canvas 100 436 466 223 template3 1;
+#X obj 25 68 filledpolygon q 0 1 0 0 w 0 w h 0 h;
+#X obj 26 163 drawnumber q 0 0 0;
+#X text 22 39 five numeric ("float") fields;
+#X text 25 88 drawing a rectangle \, interior color q \, border black
+and one unit thick \, through the points (0 \, 0) \, (w \, 0) \, (w
+\, h) \, and (0 \, h). Note that the three points containing variables
+become hot spots for mouse dragging.;
+#X text 26 184 Draw the value of q as an Araboc numeral \, at (0 \,
+0) \, in black.;
+#X obj 24 19 struct template3 float x float y float w float h float
+q;
+#X restore 269 446 pd template3;
+#N canvas 313 223 587 367 stuff 0;
+#X obj 352 180 pointer;
+#X obj 352 204 t b b p;
+#X obj 222 333 append template3 x y w h q;
+#X obj 288 9 loadbang;
+#X obj 288 62 t b b b;
+#X msg 331 138 traverse pd-data3;
+#X msg 477 136 \; pd-data3 clear;
+#X msg 240 110 0;
+#X obj 187 136 f;
+#X obj 220 136 + 1;
+#X obj 189 112 until;
+#X obj 201 159 sel 20;
+#X obj 251 159 t b;
+#X msg 290 32 bang;
+#X obj 25 237 random 300;
+#X obj 100 237 random 300;
+#X obj 323 236 random 1000;
+#X obj 177 237 random 80;
+#X obj 252 237 random 80;
+#X obj 101 263 - 30;
+#X obj 354 11 inlet;
+#X connect 0 0 1 0;
+#X connect 1 0 14 0;
+#X connect 1 1 15 0;
+#X connect 1 1 16 0;
+#X connect 1 1 17 0;
+#X connect 1 1 18 0;
+#X connect 1 2 2 5;
+#X connect 3 0 13 0;
+#X connect 4 0 10 0;
+#X connect 4 1 5 0;
+#X connect 4 1 7 0;
+#X connect 4 2 6 0;
+#X connect 5 0 0 0;
+#X connect 7 0 8 1;
+#X connect 8 0 11 0;
+#X connect 8 0 9 0;
+#X connect 9 0 8 1;
+#X connect 10 0 8 0;
+#X connect 11 0 10 1;
+#X connect 11 1 12 0;
+#X connect 12 0 0 0;
+#X connect 13 0 4 0;
+#X connect 14 0 2 0;
+#X connect 15 0 19 0;
+#X connect 16 0 2 4;
+#X connect 17 0 2 2;
+#X connect 18 0 2 3;
+#X connect 19 0 2 1;
+#X connect 20 0 13 0;
+#X restore 269 404 pd stuff;
+#X msg 269 379 remake;
+#X obj 197 298 get template3 x y w h q;
+#X floatatom 356 322 0 0 0 0 - - -;
+#X obj 60 251 set template3 x;
+#X obj 60 299 set template3 y;
+#X obj 60 347 set template3 w;
+#X obj 60 394 set template3 h;
+#X floatatom 60 418 0 0 0 0 - - -;
+#X obj 60 441 set template3 q;
+#X msg 197 226 traverse pd-data3;
+#X text 46 5 The "set" object allows you to change numeric values.
+In this example \, the template specifies five fields describing the
+(x \, y) location \, width \, height \, and color. A new feature is
+that the color is also getting printed out under the rectangles. This
+is done using the "drawnumber" object in the template.;
+#X text 323 378 <- click to randomize;
+#X text 45 99 Getting parameter values is as in the previous patch
+\; however \, as you traverse the list with "next" messages the new
+pointers are also sent to the five "set" objects. These have as arguments
+the template name and the name of the field they will set. You can
+drag on the five number boxes (after selecting an object with "traverse"
+and "next" messages) to change its location \, shape \, and color.
+;
+#X connect 0 0 19 0;
+#X connect 1 0 18 0;
+#X connect 2 0 17 0;
+#X connect 3 0 16 0;
+#X connect 7 0 14 0;
+#X connect 7 0 16 1;
+#X connect 7 0 17 1;
+#X connect 7 0 18 1;
+#X connect 7 0 19 1;
+#X connect 7 0 21 1;
+#X connect 8 0 7 0;
+#X connect 13 0 12 0;
+#X connect 14 0 9 0;
+#X connect 14 1 6 0;
+#X connect 14 2 5 0;
+#X connect 14 3 4 0;
+#X connect 14 4 15 0;
+#X connect 20 0 21 0;
+#X connect 22 0 7 0;
diff --git a/desiredata/doc/4.data.structures/04.append.pd b/desiredata/doc/4.data.structures/04.append.pd
new file mode 100644
index 00000000..b5c2492b
--- /dev/null
+++ b/desiredata/doc/4.data.structures/04.append.pd
@@ -0,0 +1,36 @@
+#N canvas 308 71 688 415 12;
+#X obj 421 332 pointer;
+#X obj 108 277 t b b b;
+#X msg 120 241 bang;
+#X text 161 240 click here to re-initialize;
+#X msg 11 313 50 250 30 9 \, 200 200 -20 900 \, 100 200 -50 30;
+#X text 56 27 The objects below put three items in the data window.
+First the window is cleared. Then a "pointer" object is instructed
+to point to the beginning of the data window ("traverse pd-data") \,
+and to output its value ("bang") to the "append" object. This object
+is then given numeric values to create three items.;
+#X obj 11 336 append template4 x y z q;
+#X msg 421 269 \; pd-data4 clear;
+#N canvas 0 0 315 341 data4 1;
+#X restore 430 219 pd data4;
+#N canvas 15 278 519 148 template4 0;
+#X obj 17 44 filledpolygon 244 q 5 0 0 20 z 40 0;
+#X text 13 79 The template for the two scalars \, as in the last patch
+;
+#X obj 17 19 struct template4 float x float y float z float q;
+#X restore 428 243 pd template4;
+#X msg 421 309 traverse pd-data4 \, bang;
+#X text 57 165 The outlet of "append" is a pointer to the newly created
+scalar. You can pass that on to other append objects if you want to
+build heterogenous lists.;
+#X text 363 375 Updated for Pd version 0.32;
+#X text 57 121 The "append" object is given the argument "template4"
+to specify what kind of data structure to append. The other arguments
+are the names of variables we'll set.;
+#X connect 0 0 6 4;
+#X connect 1 0 4 0;
+#X connect 1 1 10 0;
+#X connect 1 2 7 0;
+#X connect 2 0 1 0;
+#X connect 4 0 6 0;
+#X connect 10 0 0 0;
diff --git a/desiredata/doc/4.data.structures/05.array.pd b/desiredata/doc/4.data.structures/05.array.pd
new file mode 100644
index 00000000..15e43d22
--- /dev/null
+++ b/desiredata/doc/4.data.structures/05.array.pd
@@ -0,0 +1,120 @@
+#N struct template5 float x float y float z float q array bazoo template5-element
+;
+#N struct template5-element float y;
+#N canvas 67 294 709 456 12;
+#X obj 235 323 pointer;
+#X floatatom 232 183 0 0 0 0 - - -;
+#X msg 235 300 bang;
+#X floatatom 15 200 0 0 0 0 - - -;
+#X floatatom 17 350 0 0 0 0 - - -;
+#X floatatom 235 369 0 0 0 0 - - -;
+#X floatatom 451 276 0 0 0 0 - - -;
+#X obj 451 229 pointer;
+#X obj 318 163 pointer;
+#X msg 449 194 bang;
+#N canvas 0 0 384 196 data5 1;
+#X scalar template5 60 109 30 9 \; 0 \; 0 \; 0 \; 0 \; 0 \; 3 \; 0
+\; 0 \; 0 \; 7 \; -60 \; -66 \; -68 \; -70 \; -88 \; -100 \; -100 \;
+14 \; 12 \; 8 \; 6 \; 2 \; -4 \; -26 \; -34 \; -58 \; -60 \; -66 \;
+-66 \; -66 \; -66 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0
+\; 0 \; 0 \; 0 \; 0 \; 43 \; 0 \; 0 \; 0 \; 0 \; \;;
+#X restore 508 314 pd data5;
+#N canvas 470 534 646 260 template5 1;
+#X obj 8 91 filledpolygon 244 q 3 0 0 20 z 40 0;
+#X text 6 44 this declares an array named "bazoo" whose elements are
+described by "template5-element." Array declarations take three arguments
+while "float" declarations take only two.;
+#X text 6 136 Here we ask to plot the array \, color 700 \, line width
+3 \, starting location (30 \, 10) relative to the scalar \, points
+spaced 4 apart.;
+#X text 7 186 You can also do (x \, y) plots and/or make the line thickness
+variable---see the help window for "plot".;
+#X obj 6 8 struct template5 float x float y float z float q array bazoo
+template5-element;
+#X obj 8 113 plot bazoo 700 3 30 40 4;
+#X restore 508 337 pd template5;
+#N canvas 65 248 568 128 template5-element 0;
+#X text 12 36 This says that array elements will have a single floating-point
+number named "y". The variable name "y" is automatically assumed to
+control screen height \; if you don't have at least that variable you
+can't plot the array..;
+#X obj 35 11 struct template5-element float y;
+#X restore 508 360 pd template5-element;
+#N canvas 515 84 589 429 stuff 0;
+#X obj 354 163 pointer;
+#X obj 136 102 t b b b;
+#X msg 136 61 bang;
+#X text 170 61 click here to re-initialize;
+#X obj 134 163 append template5 x y z q;
+#X msg 354 100 \; pd-data5 clear;
+#X msg 354 140 traverse pd-data5 \, bang;
+#X msg 283 280 50;
+#X obj 284 307 setsize template5 bazoo;
+#X obj 137 23 loadbang;
+#X msg 134 140 50 150 30 9;
+#X obj 134 191 t b b p;
+#X floatatom 68 327 0 0 0 0 - - -;
+#X floatatom 14 332 0 0 0 0 - - -;
+#X obj 14 376 set template5-element y;
+#X obj 68 350 element template5 bazoo;
+#X obj 20 303 unpack;
+#X msg 12 258 3 5 \, 7 9 \, -30 10 \, 43 45;
+#X connect 0 0 4 4;
+#X connect 1 0 10 0;
+#X connect 1 1 6 0;
+#X connect 1 2 5 0;
+#X connect 2 0 1 0;
+#X connect 4 0 11 0;
+#X connect 6 0 0 0;
+#X connect 7 0 8 0;
+#X connect 9 0 2 0;
+#X connect 10 0 4 0;
+#X connect 11 0 17 0;
+#X connect 11 1 7 0;
+#X connect 11 2 8 1;
+#X connect 11 2 15 1;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 15 0 14 1;
+#X connect 16 0 13 0;
+#X connect 16 1 12 0;
+#X connect 17 0 16 0;
+#X restore 508 383 pd stuff;
+#X msg 318 140 traverse pd-data5 \, next;
+#X obj 451 252 getsize template5 bazoo;
+#X obj 232 229 setsize template5 bazoo;
+#X obj 17 373 set template5-element y;
+#X obj 235 346 get template5-element y;
+#X obj 15 223 element template5 bazoo;
+#X text 38 15 Scalars may contain arrays \, and moreover the elements
+of an array can be of any scalar type (and can have sub-arrays recursively.)
+The type of the element of an array is fixed in the template. In this
+case \, "template5" contains the definition of the top-level scalar
+and "template5-element" is the template of each array element (see
+the template subpatch.);
+#X text 328 121 click to get pointer;
+#X text 449 173 get size;
+#X text 221 158 set size;
+#X text 16 133 select an individual;
+#X text 16 153 element \, which is a;
+#X text 14 169 scalar with template;
+#X text 104 189 template5;
+#X text 12 413 work as before \, but on;
+#X text 12 433 array elements...;
+#X text 433 424 Updated for Pd version 0.35;
+#X text 17 395 normal "set" amd "get";
+#X connect 0 0 18 0;
+#X connect 1 0 16 0;
+#X connect 2 0 0 0;
+#X connect 3 0 19 0;
+#X connect 4 0 17 0;
+#X connect 7 0 15 0;
+#X connect 8 0 16 1;
+#X connect 8 0 19 1;
+#X connect 8 0 7 0;
+#X connect 9 0 7 0;
+#X connect 14 0 8 0;
+#X connect 15 0 6 0;
+#X connect 18 0 5 0;
+#X connect 19 0 0 0;
+#X connect 19 0 17 1;
diff --git a/desiredata/doc/4.data.structures/06.file.pd b/desiredata/doc/4.data.structures/06.file.pd
new file mode 100644
index 00000000..30c902dc
--- /dev/null
+++ b/desiredata/doc/4.data.structures/06.file.pd
@@ -0,0 +1,69 @@
+#N canvas 405 27 291 318 12;
+#N canvas 0 0 377 383 data 1;
+#X restore 40 153 pd data;
+#N canvas 50 470 557 157 template-toplevel 0;
+#X obj 21 94 plot bazoo 700 3 10 20 20;
+#X obj 21 68 drawpolygon q 4 0 0 20 z z -5 10 20;
+#X obj 21 30 struct template-toplevel float x float y float z float
+q array bazoo template-element;
+#X restore 40 174 pd template-toplevel;
+#N canvas 199 231 600 239 template-element 0;
+#X obj 58 83 drawpolygon 10 2 5 0 0 -5 -5 0 0 5 5 0;
+#X obj 59 48 struct template-element float x float y float w;
+#X restore 40 197 pd template-element;
+#X msg 45 16 \; pd-data clear;
+#N canvas 125 240 709 410 traversal 0;
+#X floatatom 212 353 0 0 0 0 - - -;
+#X obj 212 376 set template-toplevel q;
+#X floatatom 212 307 0 0 0 0 - - -;
+#X floatatom 210 255 0 0 0 0 - - -;
+#X floatatom 96 62 0 0 0 0 - - -;
+#X floatatom 97 114 0 0 0 0 - - -;
+#X floatatom 23 144 0 0 0 0 - - -;
+#X floatatom 210 209 0 0 0 0 - - -;
+#X floatatom 617 194 0 0 0 0 - - -;
+#X floatatom 550 192 0 0 0 0 - - -;
+#X floatatom 486 191 0 0 0 0 - - -;
+#X obj 419 116 pointer;
+#X obj 419 168 get template-toplevel x y z q;
+#X msg 450 90 next;
+#X floatatom 419 191 0 0 0 0 - - -;
+#X obj 23 169 set template-element y;
+#X obj 97 137 element template-toplevel bazoo;
+#X obj 96 85 setsize template-toplevel bazoo;
+#X obj 210 232 set template-toplevel x;
+#X obj 210 278 set template-toplevel y;
+#X obj 212 330 set template-toplevel z;
+#X floatatom 22 200 0 0 0 0 - - -;
+#X obj 22 225 set template-element x;
+#X msg 419 67 traverse pd-data \, next;
+#X floatatom 26 258 0 0 0 0 - - -;
+#X obj 26 283 set template-element w;
+#X connect 0 0 1 0;
+#X connect 2 0 20 0;
+#X connect 3 0 19 0;
+#X connect 4 0 17 0;
+#X connect 5 0 16 0;
+#X connect 6 0 15 0;
+#X connect 7 0 18 0;
+#X connect 11 0 12 0;
+#X connect 11 0 17 1;
+#X connect 11 0 18 1;
+#X connect 11 0 19 1;
+#X connect 11 0 20 1;
+#X connect 11 0 1 1;
+#X connect 11 0 16 1;
+#X connect 12 0 14 0;
+#X connect 12 1 10 0;
+#X connect 12 2 9 0;
+#X connect 12 3 8 0;
+#X connect 13 0 11 0;
+#X connect 16 0 15 1;
+#X connect 16 0 22 1;
+#X connect 16 0 25 1;
+#X connect 21 0 22 0;
+#X connect 23 0 11 0;
+#X connect 24 0 25 0;
+#X restore 41 218 pd traversal;
+#X msg 43 55 \; pd-data write xx.txt;
+#X msg 41 102 \; pd-data read file.txt;
diff --git a/desiredata/doc/4.data.structures/07.sequencer.pd b/desiredata/doc/4.data.structures/07.sequencer.pd
new file mode 100644
index 00000000..7bf97b39
--- /dev/null
+++ b/desiredata/doc/4.data.structures/07.sequencer.pd
@@ -0,0 +1,148 @@
+#N struct template-toplevel float x float y float voiceno array pitch
+template-pitch array amp template-amp;
+#N struct template-pitch float x float y float w;
+#N struct template-amp float x float y float w;
+#N canvas 124 61 556 609 12;
+#N canvas 565 104 524 166 template-toplevel 0;
+#X obj 25 86 plot pitch voiceno 3 10 0;
+#X obj 25 113 plot amp 0 3 10 0;
+#X obj 25 21 struct template-toplevel float x float y float voiceno
+array pitch template-pitch array amp template-amp;
+#X obj 27 61 filledpolygon 9 9 0 0 -2 0 2 5 2 5 -2;
+#X restore 55 385 pd template-toplevel;
+#N canvas 0 0 419 102 template-amp 0;
+#X obj 15 41 struct template-amp float x float y float w;
+#X restore 55 407 pd template-amp;
+#N canvas 42 221 452 87 template-pitch 0;
+#X obj 21 29 struct template-pitch float x float y float w;
+#X restore 57 430 pd template-pitch;
+#N canvas 323 50 551 562 synthesis 0;
+#X msg 125 220 next;
+#X msg 108 172 traverse pd-data \, next;
+#X obj 108 250 pointer template-toplevel;
+#X obj 108 273 t p p;
+#X obj 108 296 get template-toplevel voiceno;
+#X obj 108 325 pack 0 p;
+#X obj 108 4 inlet;
+#X obj 108 33 route start stop;
+#X msg 161 54 \; reset bang;
+#X obj 298 30 r reset;
+#X obj 152 112 s reset;
+#X obj 125 194 r next-evt;
+#X obj 108 354 route 0 9 90 900 99 909 990;
+#X obj 55 372 voice;
+#X obj 55 536 outlet~;
+#X msg 298 58 \; reset-stop stop \; time-of-last-evt 0 \; pd-data sort
+;
+#X obj 372 351 s delay-multiplier;
+#X obj 375 276 t b f;
+#X msg 372 303 1000;
+#X obj 389 327 /;
+#X obj 375 250 r tempo;
+#X obj 108 90 t b b b;
+#X msg 130 136 \; pd-data sort;
+#X obj 55 395 voice;
+#X obj 55 418 voice;
+#X obj 55 441 voice;
+#X obj 55 465 voice;
+#X obj 55 488 voice;
+#X obj 55 511 voice;
+#X connect 0 0 2 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 1 5 1;
+#X connect 4 0 5 0;
+#X connect 5 0 12 0;
+#X connect 6 0 7 0;
+#X connect 7 0 21 0;
+#X connect 7 1 8 0;
+#X connect 9 0 15 0;
+#X connect 11 0 0 0;
+#X connect 12 0 13 1;
+#X connect 12 1 23 1;
+#X connect 12 2 24 1;
+#X connect 12 3 25 1;
+#X connect 12 4 26 1;
+#X connect 12 5 27 1;
+#X connect 12 6 28 1;
+#X connect 13 0 23 0;
+#X connect 17 0 18 0;
+#X connect 17 1 19 1;
+#X connect 18 0 19 0;
+#X connect 19 0 16 0;
+#X connect 20 0 17 0;
+#X connect 21 0 1 0;
+#X connect 21 1 22 0;
+#X connect 21 2 10 0;
+#X connect 23 0 24 0;
+#X connect 24 0 25 0;
+#X connect 25 0 26 0;
+#X connect 26 0 27 0;
+#X connect 27 0 28 0;
+#X connect 28 0 14 0;
+#X restore 55 511 pd synthesis;
+#X floatatom 269 464 0 0 0 0 - - -;
+#X msg 55 484 start;
+#X msg 106 484 stop;
+#N canvas 137 388 559 411 data 0;
+#X scalar template-toplevel 3 86 900 \; 0 0 12 \; 10 0 12 \; \; 0 0
+0 \; 10 0 2.5 \; 11 0 0 \; \;;
+#X scalar template-toplevel 14 80 990 \; 0 0 12 \; 10 0 12 \; \; 0
+0 2.5 \; 10 0 2.5 \; 11 0 0 \; \;;
+#X scalar template-toplevel 38 43.25 90 \; 0 65 12 \; 100 10 0 \; 100
+10 12 \; 230 50 0 \; 230 10 3 \; 240 60 0 \; 240 25 10 \; 250 60 0
+\; 250 37 10 \; 260 65 0.5 \; 285 65 0.5 \; \; 1 0 2 \; 103 0 1 \;
+195 0 2 \; 220 0 0.75 \; 225 0 1.25 \; 248 0 2.5 \; 251 0 2.25 \; 255
+0 0 \; 256 0 1.5 \; 260 0 0 \; 261 0 2 \; 265 0 0 \; 266 0 2.5 \; 270
+0 0 \; 271 0 3 \; 275 0 0 \; \;;
+#X scalar template-toplevel 64 80 900 \; 0 5 0.25 \; 60 5 0.25 \; \;
+0 0 0 \; 28 -0.25 3.5 \; 58 -0.25 0 \; \;;
+#X scalar template-toplevel 142 105 900 \; 0 0 12 \; 70 -20 12 \; \;
+0 0 0 \; 10 0 2.5 \; 20 0 0 \; 30 0 0 \; 40 0 2.5 \; 50 0 0 \; 60 0
+2.5 \; 70 0 0 \; \;;
+#X scalar template-toplevel 319 63.5 909 \; 0 0 12 \; 50 0 12 \; \;
+0 0 4 \; 10 0 2.5 \; 50 0 0 \; \;;
+#X coords 0 102.75 1 102.5 0 0 0;
+#X restore 55 364 pd data;
+#N canvas 82 467 332 145 stuff 0;
+#X msg 1 101 \; pd-data write xx.txt;
+#X msg -3 39 \; pd-data read score.txt;
+#X obj 208 7 loadbang;
+#X msg 208 34 \; tempo 60;
+#X msg 198 101 \; pd-data sort;
+#X connect 2 0 3 0;
+#X restore 56 452 pd stuff;
+#X obj 269 417 r tempo;
+#X msg 269 440 set \$1;
+#X obj 269 488 s tempo;
+#X text 13 4 This patch shows an example of how to use data collections
+as musical sequences (with apologies to Yuasa and Stockhausen). Here
+the black traces show dynamics and the colored ones show pitch. The
+fatness of the pitch traces give bandwidth. Any of the three can change
+over the life of the event.;
+#X text 11 97 To hear the result \, turn the volume up to 70 or so
+(higher if it's not loud enough the first time) and hit "start". You
+can set the tempo lower if that helps you follow the "score" the first
+couple of times.;
+#X text 302 464 <--- tempo;
+#X obj 55 539 output~;
+#X text 304 574 Updated for Pd version 0.39;
+#X text 10 259 This confuses Tk's scroll bars \, by the way \, and
+when you resize the window the image still sticks to the top and not
+the bottom of the window as it should. When you resize a canvas with
+y having positive units (growing upward) \, just hit 'save' and Pd
+will check the scrolling and correct if necessary.;
+#X text 10 161 Note the screen units in the "data" window (open it
+and get "properties" to see them.) Normally \, there are -1 y units
+per pixel - that is \, adding 1 to y moves down one pixel. This is
+the "natural" y unit for most drawing programs. In the data window
+\, each pixel is 0.25 units \, meaning that adding one to a 'y' value
+moves it up four pixels.;
+#X connect 3 0 15 0;
+#X connect 3 0 15 1;
+#X connect 4 0 11 0;
+#X connect 5 0 3 0;
+#X connect 6 0 3 0;
+#X connect 9 0 10 0;
+#X connect 10 0 4 0;
diff --git a/desiredata/doc/4.data.structures/08.selection.pd b/desiredata/doc/4.data.structures/08.selection.pd
new file mode 100644
index 00000000..6733ee4d
--- /dev/null
+++ b/desiredata/doc/4.data.structures/08.selection.pd
@@ -0,0 +1,81 @@
+#N struct template8 float x float y float w float h float q;
+#N canvas 60 446 586 452 12;
+#X floatatom 53 347 0 0 0 0 - - -;
+#X floatatom 53 299 0 0 0 0 - - -;
+#X floatatom 53 251 0 0 0 0 - - -;
+#X floatatom 53 203 0 0 0 0 - - -;
+#X floatatom 342 283 0 0 0 0 - - -;
+#X floatatom 301 283 0 0 0 0 - - -;
+#X floatatom 258 283 0 0 0 0 - - -;
+#X floatatom 215 283 0 0 0 0 - - -;
+#X floatatom 374 283 0 0 0 0 - - -;
+#X floatatom 53 394 0 0 0 0 - - -;
+#N canvas 19 29 363 341 data8 1;
+#X scalar template8 28 123 0 16 917 \;;
+#X scalar template8 289 213 0 32 66 \;;
+#X scalar template8 185 -30 46 71 78 \;;
+#X scalar template8 20 259 49 42 220 \;;
+#X scalar template8 111 142 28 72 634 \;;
+#X scalar template8 249 66 46 11 48 \;;
+#X scalar template8 25 3 70 11 903 \;;
+#X scalar template8 259 -23 10 4 169 \;;
+#X scalar template8 229 116 25 27 710 \;;
+#X scalar template8 281 207 50 25 612 \;;
+#X scalar template8 54 124 62 51 421 \;;
+#X scalar template8 176 182 39 66 866 \;;
+#X scalar template8 144 37 27 27 125 \;;
+#X scalar template8 115 26 66 32 319 \;;
+#X scalar template8 134 2 50 25 454 \;;
+#X scalar template8 274 58 21 45 583 \;;
+#X scalar template8 269 171 25 38 548 \;;
+#X scalar template8 216 190 24 73 214 \;;
+#X scalar template8 215 256 50 78 652 \;;
+#X scalar template8 287 32 72 19 325 \;;
+#X restore 410 359 pd data8;
+#N canvas 280 471 688 314 template8 0;
+#X obj 25 177 filledpolygon q 0 1 0 0 w 0 w h 0 h;
+#X obj 26 200 drawnumber q 0 0 0;
+#X obj 24 19 struct template8 float x float y float w float h float
+q;
+#X obj 24 74 route select;
+#X obj 24 103 outlet;
+#X obj 32 46 print struct-template8;
+#X text 151 72 "struct" outputs messages notifying you when objects
+of this structure are selected or deselected. Here we only catch selection.
+;
+#X connect 2 0 3 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X restore 215 208 pd template8;
+#X text 46 5 This patch demonstrates catching the selection so you
+can make control panels to edit parameters. The "struct" object outputs
+a pointer to any selected object of type struct8.;
+#X obj 53 227 set template8 x;
+#X obj 53 275 set template8 y;
+#X obj 53 323 set template8 w;
+#X obj 53 370 set template8 h;
+#X obj 53 417 set template8 q;
+#X obj 215 259 get template8 x y w h q;
+#X text 46 68 To try it \, unlock the subpatch (data8) and select something.
+The 5 paramters should show up under the "get" object in this window
+\, and you should be able to change them with the "set" object.;
+#X text 332 405 updated for Pd version 0.39;
+#X text 47 136 The blue "selection" rectangle ought to notice when
+the object that got selected gets moved or resized \, but this isn't
+done yet (as of Pd version 0.39).;
+#X connect 0 0 16 0;
+#X connect 1 0 15 0;
+#X connect 2 0 14 0;
+#X connect 3 0 13 0;
+#X connect 9 0 17 0;
+#X connect 11 0 13 1;
+#X connect 11 0 14 1;
+#X connect 11 0 15 1;
+#X connect 11 0 16 1;
+#X connect 11 0 17 1;
+#X connect 11 0 18 0;
+#X connect 18 0 7 0;
+#X connect 18 1 6 0;
+#X connect 18 2 5 0;
+#X connect 18 3 4 0;
+#X connect 18 4 8 0;
diff --git a/desiredata/doc/4.data.structures/09.scaling.pd b/desiredata/doc/4.data.structures/09.scaling.pd
new file mode 100644
index 00000000..8af7d6ff
--- /dev/null
+++ b/desiredata/doc/4.data.structures/09.scaling.pd
@@ -0,0 +1,74 @@
+#N struct template9b float x float y float w symbol s;
+#N struct template9a float x float y float a float b float c;
+#N canvas 387 17 573 330 12;
+#X text 319 276 updated for Pd version 0.39;
+#N canvas 1 11 363 341 data9 1;
+#X scalar template9b 222 157 26.3158 why? \;;
+#X scalar template9a 149 243 23 57.1429 32 \;;
+#X scalar template9a 84 80 100 20 32 \;;
+#X coords 0 341 1 340 0 0 0;
+#X restore 22 274 pd data9;
+#N canvas 48 362 604 524 template9a 0;
+#X obj 24 19 struct template9a float x float y float a float b float
+c;
+#X obj 31 380 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 31 402 t b b;
+#X obj 210 461 pointer;
+#X msg 60 430 traverse pd-data9 \, bang;
+#X obj 31 486 append template9a x y a b c;
+#X msg 31 462 50 50 30 20 40;
+#X obj 23 115 drawpolygon 0 1 0 10 0 a(0:100)(10:110) -5 a(0:100)(5:105)
+0 a(0:100)(10:110) 5 a(0:100)(5:105);
+#X obj 25 287 drawcurve 0 1 0 -2 0 3 5 3 5 -8 -13 -8 -13 21;
+#X obj 25 247 drawpolygon 0 1 10 0 c(0:100)(10:110) 0 c(0:100)(5:105)
+-5 c(0:100)(10:110) 0 c(0:100)(5:105) 5;
+#X obj 25 193 drawpolygon 0 1 7 7 b(0:100)(7:77) b(0:100)(7:77) b(0:100)(0:70)
+b(0:100)(7:77) b(0:100)(7:77) b(0:100)(7:77) b(0:100)(7:77) b(0:100)(0:70)
+;
+#X text 23 50 'a' controls an arrow pointing upward. The main segment
+goes from (0.10) to (0 \, a+10). Then we hike 5 units down and left
+\, back to the point \, and then 5 units down and right.;
+#X text 28 154 Slightly more complicated construction to make an arrow
+at 45 degrees:;
+#X text 25 330 It's a good practice to put a small patch like this
+one in each template that you can use to make the first one (and will
+often find yourself wanting to use again later):;
+#X connect 1 0 2 0;
+#X connect 2 0 6 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 5;
+#X connect 4 0 3 0;
+#X connect 6 0 5 0;
+#X restore 21 224 pd template9a;
+#N canvas 353 371 688 314 template9b 0;
+#X obj 351 176 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 351 196 t b b;
+#X obj 567 254 pointer;
+#X msg 360 227 traverse pd-data9 \, bang;
+#X obj 24 19 struct template9b float x float y float w symbol s;
+#X obj 37 54 filledpolygon 900 0 1 w(0:100)(0:38) w(0:100)(0:92) w(0:100)(0:92)
+w(0:100)(0:38) w(0:100)(0:92) w(0:100)(0:-38) w(0:100)(0:38) w(0:100)(0:-92)
+w(0:100)(0:-38) w(0:100)(0:-92) w(0:100)(0:-92) w(0:100)(0:-38) w(0:100)(0:-92)
+w(0:100)(0:38) w(0:100)(0:-38) w(0:100)(0:92);
+#X msg 351 257 50 50 30;
+#X obj 352 281 append template9b x y w;
+#X obj 36 171 drawsymbol s w(0:100)(10:-90) 10 0;
+#X connect 0 0 1 0;
+#X connect 1 0 6 0;
+#X connect 1 1 3 0;
+#X connect 2 0 7 3;
+#X connect 3 0 2 0;
+#X connect 6 0 7 0;
+#X restore 21 248 pd template9b;
+#X text 35 7 Screen dimensions can be tailored to specific ranges by
+adding suffixes in the drawing instructions. For example \, in "template9a"
+\, a coordinate such as "b(0:100)(7:77)" instructs the drawpolygon
+object to rescale b from the range 0-100 to the range 7-77.;
+#X text 39 93 The application is to introduce an offset to a coordinate.
+For example \, the construction "a(0:100)(10:110)" just gives a+10.
+;
+#X text 35 147 Each of the three arrows of template9a is controlled
+by a single parameter (a \, b \, or c) and the entire red octagon in
+template9b likewise.;
diff --git a/desiredata/doc/4.data.structures/10.onoff.pd b/desiredata/doc/4.data.structures/10.onoff.pd
new file mode 100644
index 00000000..2b535b7c
--- /dev/null
+++ b/desiredata/doc/4.data.structures/10.onoff.pd
@@ -0,0 +1,51 @@
+#N struct template10 float x float y float a float b float c float
+w;
+#N canvas 322 90 571 381 12;
+#X text 315 344 updated for Pd version 0.39;
+#N canvas 36 348 577 459 template10 1;
+#X obj 63 327 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 63 349 t b b;
+#X obj 242 408 pointer;
+#X msg 92 377 traverse pd-data10 \, bang;
+#X obj 33 203 drawpolygon 0 1 20 20 20 -20 -20 -20 -20 20 20 20;
+#X obj 33 111 drawcurve -v b 900 2 a(0:100)(0:100) 0 a(0:100)(0:71)
+a(0:100)(0:71) 0 a(0:100)(0:100) a(0:100)(0:-71) a(0:100)(0:71) a(0:100)(0:-100)
+0 a(0:100)(0:-71) a(0:100)(0:-71) 0 a(0:100)(0:-100) a(0:100)(0:71)
+a(0:100)(0:-71) a(0:100)(0:100) 0;
+#X obj 33 274 drawnumber b -10 -30 0;
+#X text 71 86 "circle" of radius a \, visible when b != 0;
+#X obj 63 433 append template10 x y a b;
+#X msg 61 409 50 50 10 1;
+#X obj 24 19 struct template10 float x float y float a float b;
+#X text 23 50 Template demonstrating turning a drawing instruction
+on and off.;
+#X obj 33 231 loadbang;
+#X obj 33 254 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
+;
+#X text 63 252 <- show/hide this drawing instruction;
+#X connect 0 0 1 0;
+#X connect 1 0 9 0;
+#X connect 1 1 3 0;
+#X connect 2 0 8 4;
+#X connect 3 0 2 0;
+#X connect 9 0 8 0;
+#X connect 12 0 13 0;
+#X connect 13 0 6 0;
+#X restore 22 236 pd template10;
+#N canvas 210 14 324 294 data10 1;
+#X scalar template10 92 193 15 1 40 0 \;;
+#X scalar template10 180 161 15 0 40 0 \;;
+#X coords 0 294 1 293 0 0 0;
+#X restore 23 269 pd data10;
+#X text 25 13 Drawing instructions can be dynamically turned on and
+off \, either globally for all data of a given template \, or locally
+according to a data field. In this example the "drawcurve" instruction's
+arguments contain the leading flag "-v b" meaning that its visibility
+is turned on and off by the field b.;
+#X text 25 111 To turn a drawing instruction on and off globally \,
+send a number to its inlet. By default drawing instructions are initially
+visible \, unless given the "-n" flag.;
+#X text 21 169 Arrays have the additional possibility of turning on
+and off drawing instructions for their individual points as scalars.
+Use "-vs z" to make the variable z control this.;
diff --git a/desiredata/doc/4.data.structures/11.array.controls.pd b/desiredata/doc/4.data.structures/11.array.controls.pd
new file mode 100644
index 00000000..8e04662f
--- /dev/null
+++ b/desiredata/doc/4.data.structures/11.array.controls.pd
@@ -0,0 +1,49 @@
+#N struct template11 float x float y array a template11a;
+#N struct template11a float x float amp float w1 float w2;
+#N canvas 14 266 568 347 12;
+#X text 300 287 updated for Pd version 0.39;
+#N canvas 587 7 540 455 template11 1;
+#X obj 41 303 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 41 325 t b b;
+#X obj 222 384 pointer;
+#X msg 72 353 traverse pd-data11 \, bang;
+#X obj 43 409 append template11 x y;
+#X msg 41 385 50 50;
+#X obj 23 19 struct template11 float x float y array a template11a
+;
+#X obj 31 254 filledpolygon 0 0 0 0 0 3 0 3 30 0 30 0 0;
+#X obj 31 134 plot -w w1 a 0 2 5 0;
+#X obj 33 190 plot -w w2 a 0 2 5 15;
+#X obj 40 83 plot -y amp(0:100)(0:100) a 500 2 5 30;
+#X text 41 61 Graph (x \, amp) pairs (using "amp" as the "y" field"):
+;
+#X text 33 108 Graph "w1" as width ("y" is zero);
+#X text 30 168 also "w2" \, at (5 \, 15) to disambiguate the one at
+(5 \, 0);
+#X text 28 231 Mark the scalar itself;
+#X connect 0 0 1 0;
+#X connect 1 0 5 0;
+#X connect 1 1 3 0;
+#X connect 2 0 4 2;
+#X connect 3 0 2 0;
+#X connect 5 0 4 0;
+#X restore 40 233 pd template11;
+#N canvas 25 458 313 196 data11 1;
+#X scalar template11 41 87 \; 2 0 0 0 \; 18 51 7 0 \; 98 41 0 5 \;
+109 0 0 0 \; \;;
+#X coords 0 196 1 195 0 0 0;
+#X restore 51 299 pd data11;
+#N canvas 336 497 561 109 template11a 0;
+#X obj 23 19 struct template11a float x float amp float w1 float w2
+;
+#X restore 47 271 pd template11a;
+#X text 25 13 You can control which variable is used as "x" \, "y"
+\, and "width" when plotting an array. In this example a single array
+"a" is plotted three times \, to show the values of the "amp" \, "w1"
+and "w2" fields. This is convenient when you want to have several variables
+in each point of the array and need several traces of the same array
+to visualize it all.;
+#X text 24 127 In this example the array points have no "y" field at
+all \, so if no variable is supplied to use instead of "y" \, the array
+is flat along its "x" axis.;
diff --git a/desiredata/doc/4.data.structures/12.beat-patterns.pd b/desiredata/doc/4.data.structures/12.beat-patterns.pd
new file mode 100644
index 00000000..1bcb8694
--- /dev/null
+++ b/desiredata/doc/4.data.structures/12.beat-patterns.pd
@@ -0,0 +1,455 @@
+#N struct rect float x float y float w float h;
+#N canvas 193 140 549 265 10;
+#N canvas 457 224 643 316 rect 0;
+#X obj 134 219 pointer;
+#X msg 134 188 traverse pd-test \, bang;
+#X obj 69 99 filledpolygon 0 0 0 0 0 0 h w h w 0 0 0;
+#X obj 46 252 append rect x y w h;
+#X obj 68 76 struct rect float x float y float w float h;
+#X msg 46 219 50 50 50 2;
+#X obj 432 201 r this-ptr;
+#X obj 347 257 s this-ptr;
+#X obj 344 202 r add-rect;
+#X obj 346 232 append rect x y w h;
+#X connect 0 0 3 4;
+#X connect 1 0 0 0;
+#X connect 5 0 3 0;
+#X connect 6 0 9 4;
+#X connect 8 0 9 0;
+#X connect 9 0 7 0;
+#X restore 27 186 pd rect;
+#N canvas 34 58 616 659 output 1;
+#X scalar rect 57 179 2 10 \;;
+#X scalar rect 82 179 1 10 \;;
+#X scalar rect 107 179 1 10 \;;
+#X scalar rect 132 179 1 10 \;;
+#X scalar rect 157 179 1 10 \;;
+#X scalar rect 182 179 2 10 \;;
+#X scalar rect 207 179 1 10 \;;
+#X scalar rect 232 179 1 10 \;;
+#X scalar rect 257 179 1 10 \;;
+#X scalar rect 282 179 1 10 \;;
+#X scalar rect 307 179 2 10 \;;
+#X scalar rect 332 179 1 10 \;;
+#X scalar rect 357 179 1 10 \;;
+#X scalar rect 382 179 1 10 \;;
+#X scalar rect 407 179 1 10 \;;
+#X scalar rect 432 179 2 10 \;;
+#X scalar rect 457 179 1 10 \;;
+#X scalar rect 482 179 1 10 \;;
+#X scalar rect 507 179 1 10 \;;
+#X scalar rect 532 179 1 10 \;;
+#X scalar rect 557 179 2 10 \;;
+#X scalar rect 57 149 2 10 \;;
+#X scalar rect 73.6667 149 1 10 \;;
+#X scalar rect 90.3333 149 1 10 \;;
+#X scalar rect 107 149 1 10 \;;
+#X scalar rect 123.667 149 1 10 \;;
+#X scalar rect 140.333 149 2 10 \;;
+#X scalar rect 157 149 1 10 \;;
+#X scalar rect 173.667 149 1 10 \;;
+#X scalar rect 190.333 149 1 10 \;;
+#X scalar rect 207 149 1 10 \;;
+#X scalar rect 223.667 149 2 10 \;;
+#X scalar rect 240.333 149 1 10 \;;
+#X scalar rect 257 149 1 10 \;;
+#X scalar rect 273.667 149 1 10 \;;
+#X scalar rect 290.333 149 1 10 \;;
+#X scalar rect 307 149 2 10 \;;
+#X scalar rect 323.667 149 1 10 \;;
+#X scalar rect 340.333 149 1 10 \;;
+#X scalar rect 357 149 1 10 \;;
+#X scalar rect 373.667 149 1 10 \;;
+#X scalar rect 390.333 149 2 10 \;;
+#X scalar rect 407 149 1 10 \;;
+#X scalar rect 423.667 149 1 10 \;;
+#X scalar rect 440.333 149 1 10 \;;
+#X scalar rect 457 149 1 10 \;;
+#X scalar rect 473.667 149 2 10 \;;
+#X scalar rect 490.333 149 1 10 \;;
+#X scalar rect 507 149 1 10 \;;
+#X scalar rect 523.667 149 1 10 \;;
+#X scalar rect 540.333 149 1 10 \;;
+#X scalar rect 557 149 2 10 \;;
+#X scalar rect 57 119 2 10 \;;
+#X scalar rect 71.2857 119 1 10 \;;
+#X scalar rect 85.5714 119 1 10 \;;
+#X scalar rect 99.8571 119 1 10 \;;
+#X scalar rect 114.143 119 1 10 \;;
+#X scalar rect 128.429 119 2 10 \;;
+#X scalar rect 142.714 119 1 10 \;;
+#X scalar rect 157 119 1 10 \;;
+#X scalar rect 171.286 119 1 10 \;;
+#X scalar rect 185.571 119 1 10 \;;
+#X scalar rect 199.857 119 2 10 \;;
+#X scalar rect 214.143 119 1 10 \;;
+#X scalar rect 228.429 119 1 10 \;;
+#X scalar rect 242.714 119 1 10 \;;
+#X scalar rect 257 119 1 10 \;;
+#X scalar rect 271.286 119 2 10 \;;
+#X scalar rect 285.571 119 1 10 \;;
+#X scalar rect 299.857 119 1 10 \;;
+#X scalar rect 314.143 119 1 10 \;;
+#X scalar rect 328.429 119 1 10 \;;
+#X scalar rect 342.714 119 2 10 \;;
+#X scalar rect 357 119 1 10 \;;
+#X scalar rect 371.286 119 1 10 \;;
+#X scalar rect 385.571 119 1 10 \;;
+#X scalar rect 399.857 119 1 10 \;;
+#X scalar rect 414.143 119 2 10 \;;
+#X scalar rect 428.429 119 1 10 \;;
+#X scalar rect 442.714 119 1 10 \;;
+#X scalar rect 457 119 1 10 \;;
+#X scalar rect 471.286 119 1 10 \;;
+#X scalar rect 485.571 119 2 10 \;;
+#X scalar rect 499.857 119 1 10 \;;
+#X scalar rect 514.143 119 1 10 \;;
+#X scalar rect 528.429 119 1 10 \;;
+#X scalar rect 542.714 119 1 10 \;;
+#X scalar rect 557 119 2 10 \;;
+#X scalar rect 57 89 2 10 \;;
+#X scalar rect 69.5 89 1 10 \;;
+#X scalar rect 82 89 1 10 \;;
+#X scalar rect 94.5 89 1 10 \;;
+#X scalar rect 107 89 1 10 \;;
+#X scalar rect 119.5 89 2 10 \;;
+#X scalar rect 132 89 1 10 \;;
+#X scalar rect 144.5 89 1 10 \;;
+#X scalar rect 157 89 1 10 \;;
+#X scalar rect 169.5 89 1 10 \;;
+#X scalar rect 182 89 2 10 \;;
+#X scalar rect 194.5 89 1 10 \;;
+#X scalar rect 207 89 1 10 \;;
+#X scalar rect 219.5 89 1 10 \;;
+#X scalar rect 232 89 1 10 \;;
+#X scalar rect 244.5 89 2 10 \;;
+#X scalar rect 257 89 1 10 \;;
+#X scalar rect 269.5 89 1 10 \;;
+#X scalar rect 282 89 1 10 \;;
+#X scalar rect 294.5 89 1 10 \;;
+#X scalar rect 307 89 2 10 \;;
+#X scalar rect 319.5 89 1 10 \;;
+#X scalar rect 332 89 1 10 \;;
+#X scalar rect 344.5 89 1 10 \;;
+#X scalar rect 357 89 1 10 \;;
+#X scalar rect 369.5 89 2 10 \;;
+#X scalar rect 382 89 1 10 \;;
+#X scalar rect 394.5 89 1 10 \;;
+#X scalar rect 407 89 1 10 \;;
+#X scalar rect 419.5 89 1 10 \;;
+#X scalar rect 432 89 2 10 \;;
+#X scalar rect 444.5 89 1 10 \;;
+#X scalar rect 457 89 1 10 \;;
+#X scalar rect 469.5 89 1 10 \;;
+#X scalar rect 482 89 1 10 \;;
+#X scalar rect 494.5 89 2 10 \;;
+#X scalar rect 507 89 1 10 \;;
+#X scalar rect 519.5 89 1 10 \;;
+#X scalar rect 532 89 1 10 \;;
+#X scalar rect 544.5 89 1 10 \;;
+#X scalar rect 557 89 2 10 \;;
+#X scalar rect 57 299 2 10 \;;
+#X scalar rect 90.3333 299 1 10 \;;
+#X scalar rect 123.667 299 1 10 \;;
+#X scalar rect 157 299 1 10 \;;
+#X scalar rect 190.333 299 2 10 \;;
+#X scalar rect 223.667 299 1 10 \;;
+#X scalar rect 257 299 1 10 \;;
+#X scalar rect 290.333 299 1 10 \;;
+#X scalar rect 323.667 299 2 10 \;;
+#X scalar rect 357 299 1 10 \;;
+#X scalar rect 390.333 299 1 10 \;;
+#X scalar rect 423.667 299 1 10 \;;
+#X scalar rect 457 299 2 10 \;;
+#X scalar rect 57 269 2 10 \;;
+#X scalar rect 77 269 1 10 \;;
+#X scalar rect 97 269 1 10 \;;
+#X scalar rect 117 269 1 10 \;;
+#X scalar rect 137 269 2 10 \;;
+#X scalar rect 157 269 1 10 \;;
+#X scalar rect 177 269 1 10 \;;
+#X scalar rect 197 269 1 10 \;;
+#X scalar rect 217 269 2 10 \;;
+#X scalar rect 237 269 1 10 \;;
+#X scalar rect 257 269 1 10 \;;
+#X scalar rect 277 269 1 10 \;;
+#X scalar rect 297 269 2 10 \;;
+#X scalar rect 317 269 1 10 \;;
+#X scalar rect 337 269 1 10 \;;
+#X scalar rect 357 269 1 10 \;;
+#X scalar rect 377 269 2 10 \;;
+#X scalar rect 397 269 1 10 \;;
+#X scalar rect 417 269 1 10 \;;
+#X scalar rect 437 269 1 10 \;;
+#X scalar rect 457 269 2 10 \;;
+#X scalar rect 57 239 2 10 \;;
+#X scalar rect 71.2857 239 1 10 \;;
+#X scalar rect 85.5714 239 1 10 \;;
+#X scalar rect 99.8571 239 1 10 \;;
+#X scalar rect 114.143 239 2 10 \;;
+#X scalar rect 128.429 239 1 10 \;;
+#X scalar rect 142.714 239 1 10 \;;
+#X scalar rect 157 239 1 10 \;;
+#X scalar rect 171.286 239 2 10 \;;
+#X scalar rect 185.571 239 1 10 \;;
+#X scalar rect 199.857 239 1 10 \;;
+#X scalar rect 214.143 239 1 10 \;;
+#X scalar rect 228.429 239 2 10 \;;
+#X scalar rect 242.714 239 1 10 \;;
+#X scalar rect 257 239 1 10 \;;
+#X scalar rect 271.286 239 1 10 \;;
+#X scalar rect 285.571 239 2 10 \;;
+#X scalar rect 299.857 239 1 10 \;;
+#X scalar rect 314.143 239 1 10 \;;
+#X scalar rect 328.429 239 1 10 \;;
+#X scalar rect 342.714 239 2 10 \;;
+#X scalar rect 357 239 1 10 \;;
+#X scalar rect 371.286 239 1 10 \;;
+#X scalar rect 385.571 239 1 10 \;;
+#X scalar rect 399.857 239 2 10 \;;
+#X scalar rect 414.143 239 1 10 \;;
+#X scalar rect 428.429 239 1 10 \;;
+#X scalar rect 442.714 239 1 10 \;;
+#X scalar rect 457 239 2 10 \;;
+#X scalar rect 57 479 2 10 \;;
+#X scalar rect 107 479 1 10 \;;
+#X scalar rect 157 479 1 10 \;;
+#X scalar rect 207 479 2 10 \;;
+#X scalar rect 257 479 1 10 \;;
+#X scalar rect 307 479 1 10 \;;
+#X scalar rect 357 479 2 10 \;;
+#X scalar rect 57 449 2 10 \;;
+#X scalar rect 82 449 1 10 \;;
+#X scalar rect 107 449 1 10 \;;
+#X scalar rect 132 449 2 10 \;;
+#X scalar rect 157 449 1 10 \;;
+#X scalar rect 182 449 1 10 \;;
+#X scalar rect 207 449 2 10 \;;
+#X scalar rect 232 449 1 10 \;;
+#X scalar rect 257 449 1 10 \;;
+#X scalar rect 282 449 2 10 \;;
+#X scalar rect 307 449 1 10 \;;
+#X scalar rect 332 449 1 10 \;;
+#X scalar rect 357 449 2 10 \;;
+#X scalar rect 57 419 2 10 \;;
+#X scalar rect 77 419 1 10 \;;
+#X scalar rect 97 419 1 10 \;;
+#X scalar rect 117 419 2 10 \;;
+#X scalar rect 137 419 1 10 \;;
+#X scalar rect 157 419 1 10 \;;
+#X scalar rect 177 419 2 10 \;;
+#X scalar rect 197 419 1 10 \;;
+#X scalar rect 217 419 1 10 \;;
+#X scalar rect 237 419 2 10 \;;
+#X scalar rect 257 419 1 10 \;;
+#X scalar rect 277 419 1 10 \;;
+#X scalar rect 297 419 2 10 \;;
+#X scalar rect 317 419 1 10 \;;
+#X scalar rect 337 419 1 10 \;;
+#X scalar rect 357 419 2 10 \;;
+#X scalar rect 57 389 2 10 \;;
+#X scalar rect 71.2857 389 1 10 \;;
+#X scalar rect 85.5714 389 1 10 \;;
+#X scalar rect 99.8571 389 2 10 \;;
+#X scalar rect 114.143 389 1 10 \;;
+#X scalar rect 128.429 389 1 10 \;;
+#X scalar rect 142.714 389 2 10 \;;
+#X scalar rect 157 389 1 10 \;;
+#X scalar rect 171.286 389 1 10 \;;
+#X scalar rect 185.571 389 2 10 \;;
+#X scalar rect 199.857 389 1 10 \;;
+#X scalar rect 214.143 389 1 10 \;;
+#X scalar rect 228.429 389 2 10 \;;
+#X scalar rect 242.714 389 1 10 \;;
+#X scalar rect 257 389 1 10 \;;
+#X scalar rect 271.286 389 2 10 \;;
+#X scalar rect 285.571 389 1 10 \;;
+#X scalar rect 299.857 389 1 10 \;;
+#X scalar rect 314.143 389 2 10 \;;
+#X scalar rect 328.429 389 1 10 \;;
+#X scalar rect 342.714 389 1 10 \;;
+#X scalar rect 357 389 2 10 \;;
+#X scalar rect 57 359 2 10 \;;
+#X scalar rect 69.5 359 1 10 \;;
+#X scalar rect 82 359 1 10 \;;
+#X scalar rect 94.5 359 2 10 \;;
+#X scalar rect 107 359 1 10 \;;
+#X scalar rect 119.5 359 1 10 \;;
+#X scalar rect 132 359 2 10 \;;
+#X scalar rect 144.5 359 1 10 \;;
+#X scalar rect 157 359 1 10 \;;
+#X scalar rect 169.5 359 2 10 \;;
+#X scalar rect 182 359 1 10 \;;
+#X scalar rect 194.5 359 1 10 \;;
+#X scalar rect 207 359 2 10 \;;
+#X scalar rect 219.5 359 1 10 \;;
+#X scalar rect 232 359 1 10 \;;
+#X scalar rect 244.5 359 2 10 \;;
+#X scalar rect 257 359 1 10 \;;
+#X scalar rect 269.5 359 1 10 \;;
+#X scalar rect 282 359 2 10 \;;
+#X scalar rect 294.5 359 1 10 \;;
+#X scalar rect 307 359 1 10 \;;
+#X scalar rect 319.5 359 2 10 \;;
+#X scalar rect 332 359 1 10 \;;
+#X scalar rect 344.5 359 1 10 \;;
+#X scalar rect 357 359 2 10 \;;
+#X scalar rect 57 599 2 10 \;;
+#X scalar rect 90.3333 599 1 10 \;;
+#X scalar rect 123.667 599 2 10 \;;
+#X scalar rect 157 599 1 10 \;;
+#X scalar rect 190.333 599 2 10 \;;
+#X scalar rect 223.667 599 1 10 \;;
+#X scalar rect 257 599 2 10 \;;
+#X scalar rect 57 569 2 10 \;;
+#X scalar rect 77 569 1 10 \;;
+#X scalar rect 97 569 2 10 \;;
+#X scalar rect 117 569 1 10 \;;
+#X scalar rect 137 569 2 10 \;;
+#X scalar rect 157 569 1 10 \;;
+#X scalar rect 177 569 2 10 \;;
+#X scalar rect 197 569 1 10 \;;
+#X scalar rect 217 569 2 10 \;;
+#X scalar rect 237 569 1 10 \;;
+#X scalar rect 257 569 2 10 \;;
+#X scalar rect 57 539 2 10 \;;
+#X scalar rect 71.2857 539 1 10 \;;
+#X scalar rect 85.5714 539 2 10 \;;
+#X scalar rect 99.8571 539 1 10 \;;
+#X scalar rect 114.143 539 2 10 \;;
+#X scalar rect 128.429 539 1 10 \;;
+#X scalar rect 142.714 539 2 10 \;;
+#X scalar rect 157 539 1 10 \;;
+#X scalar rect 171.286 539 2 10 \;;
+#X scalar rect 185.571 539 1 10 \;;
+#X scalar rect 199.857 539 2 10 \;;
+#X scalar rect 214.143 539 1 10 \;;
+#X scalar rect 228.429 539 2 10 \;;
+#X scalar rect 242.714 539 1 10 \;;
+#X scalar rect 257 539 2 10 \;;
+#X scalar rect 57 29 2 580 \;;
+#X scalar rect 157 29 2 580 \;;
+#X scalar rect 257 29 2 580 \;;
+#X scalar rect 357 29 2 450 \;;
+#X scalar rect 457 29 2 280 \;;
+#X scalar rect 557 29 2 150 \;;
+#X text 21 50 3:2;
+#X text 21 78 5:2;
+#X text 21 107 7:2;
+#X text 18 170 2:3;
+#X text 19 200 4:3;
+#X text 20 231 5:3;
+#X text 19 260 7:3;
+#X text 20 287 8:3;
+#X text 20 349 3:4;
+#X text 21 378 5:4;
+#X text 21 408 7:4;
+#X text 19 467 4:5;
+#X text 19 499 6:5;
+#X text 21 528 7:5;
+#X text 21 558 8:5;
+#X text 303 93 Inspired by Ed Harkins's rhythm seminar.;
+#X text 307 32 Dual rhythmic patterns: the dark marks are;
+#X text 305 53 the beats and the lighter ones help;
+#X text 304 73 show the proportions.;
+#X coords 0 659 1 658 0 0 0;
+#X restore 26 208 pd output;
+#N canvas 386 64 781 519 generator 0;
+#X obj 646 4 r start;
+#X obj 645 71 pointer;
+#X obj 646 27 symbol;
+#X obj 645 92 s this-ptr;
+#X msg 645 49 traverse \$1 \, bang;
+#X msg 69 16 \; pd-output clear;
+#X msg 187 18 \; start pd-output;
+#X obj 57 170 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 208 170 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 362 171 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 57 138 r add-pts1;
+#X obj 52 258 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 187 259 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 322 260 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 53 230 r add-pts1;
+#X obj 57 190 beat-maker 3 2 600;
+#X obj 208 189 beat-maker 5 2 570;
+#X obj 362 190 beat-maker 7 2 540;
+#X obj 454 259 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 593 257 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 56 343 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 191 344 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 326 345 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 57 315 r add-pts1;
+#X obj 52 445 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 187 446 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 322 447 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 53 417 r add-pts1;
+#X obj 460 448 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 53 278 beat-maker 2 3 480;
+#X obj 323 278 beat-maker 5 3 420;
+#X obj 455 278 beat-maker 7 3 390;
+#X obj 594 276 beat-maker 8 3 360;
+#X obj 55 363 beat-maker 3 4 300;
+#X obj 189 364 beat-maker 5 4 270;
+#X obj 328 364 beat-maker 7 4 240;
+#X obj 52 465 beat-maker 4 5 180;
+#X obj 186 466 beat-maker 6 5 150;
+#X obj 324 466 beat-maker 7 5 120;
+#X obj 462 467 beat-maker 8 5 90;
+#X obj 187 279 beat-maker 4 3 450;
+#X msg 450 14 \; add-rect 40 30 2 580 \; add-rect 140 30 2 580 \; add-rect
+240 30 2 580 \; add-rect 340 30 2 450 \; add-rect 440 30 2 280 \; add-rect
+540 30 2 150 \;;
+#X msg 305 19 \; add-pts1 bang \;;
+#X connect 0 0 2 0;
+#X connect 1 0 3 0;
+#X connect 2 0 4 0;
+#X connect 4 0 1 0;
+#X connect 7 0 15 0;
+#X connect 8 0 16 0;
+#X connect 9 0 17 0;
+#X connect 10 0 7 0;
+#X connect 10 0 8 0;
+#X connect 10 0 9 0;
+#X connect 11 0 29 0;
+#X connect 12 0 40 0;
+#X connect 13 0 30 0;
+#X connect 14 0 11 0;
+#X connect 14 0 12 0;
+#X connect 14 0 13 0;
+#X connect 14 0 18 0;
+#X connect 14 0 19 0;
+#X connect 18 0 31 0;
+#X connect 19 0 32 0;
+#X connect 20 0 33 0;
+#X connect 21 0 34 0;
+#X connect 22 0 35 0;
+#X connect 23 0 20 0;
+#X connect 23 0 21 0;
+#X connect 23 0 22 0;
+#X connect 24 0 36 0;
+#X connect 25 0 37 0;
+#X connect 26 0 38 0;
+#X connect 27 0 24 0;
+#X connect 27 0 25 0;
+#X connect 27 0 26 0;
+#X connect 27 0 28 0;
+#X connect 28 0 39 0;
+#X restore 27 166 pd generator;
+#X text 27 21 Example: computing and graphing beat patterns. I made
+this to make it easier to practice performing a-in-the-time-of-b time
+divisions.;
diff --git a/desiredata/doc/4.data.structures/13.sliderule.pd b/desiredata/doc/4.data.structures/13.sliderule.pd
new file mode 100644
index 00000000..d149cfa3
--- /dev/null
+++ b/desiredata/doc/4.data.structures/13.sliderule.pd
@@ -0,0 +1,205 @@
+#N struct label float x float y float n;
+#N struct line float x float y float w;
+#N canvas 552 6 487 277 10;
+#N canvas 15 -5 504 847 data 1;
+#X scalar label 55 190.999 43 \;;
+#X scalar label 175 196.826 44 \;;
+#X scalar label 175 203 45 \;;
+#X scalar label 175 209.541 46 \;;
+#X scalar label 55 216.471 47 \;;
+#X scalar label 175 223.813 48 \;;
+#X scalar label 175 231.591 49 \;;
+#X scalar label 55 239.832 50 \;;
+#X scalar label 175 248.563 51 \;;
+#X scalar label 175 257.814 52 \;;
+#X scalar label 55 267.614 53 \;;
+#X scalar label 175 277.997 54 \;;
+#X scalar label 175 288.998 55 \;;
+#X scalar label 175 300.652 56 \;;
+#X scalar label 55 313 57 \;;
+#X scalar label 175 326.082 58 \;;
+#X scalar label 175 339.942 59 \;;
+#X scalar label 155 354.626 60 \;;
+#X scalar label 175 370.183 61 \;;
+#X scalar label 175 386.665 62 \;;
+#X scalar label 175 404.127 63 \;;
+#X scalar label 55 422.628 64 \;;
+#X scalar label 175 442.228 65 \;;
+#X scalar label 175 462.994 66 \;;
+#X scalar label 55 484.995 67 \;;
+#X scalar label 175 508.305 68 \;;
+#X scalar label 175 533 69 \;;
+#X scalar label 175 559.164 70 \;;
+#X scalar label 55 586.883 71 \;;
+#X scalar label 175 616.251 72 \;;
+#X scalar label 175 647.365 73 \;;
+#X scalar label 55 680.33 74 \;;
+#X scalar label 175 715.254 75 \;;
+#X scalar label 175 752.255 76 \;;
+#X scalar label 55 791.456 77 \;;
+#X scalar line 175 87 100 \;;
+#X scalar line 195 135.999 60 \;;
+#X scalar line 195 138.913 60 \;;
+#X scalar line 195 142 60 \;;
+#X scalar line 195 145.271 60 \;;
+#X scalar line 195 148.735 60 \;;
+#X scalar line 175 152.406 100 \;;
+#X scalar line 195 156.296 60 \;;
+#X scalar line 195 160.416 60 \;;
+#X scalar line 195 164.782 60 \;;
+#X scalar line 195 169.407 60 \;;
+#X scalar line 195 174.307 60 \;;
+#X scalar line 195 179.499 60 \;;
+#X scalar line 75 184.999 300 \;;
+#X scalar line 195 190.826 60 \;;
+#X scalar line 195 197 60 \;;
+#X scalar line 195 203.541 60 \;;
+#X scalar line 75 210.471 300 \;;
+#X scalar line 195 217.813 60 \;;
+#X scalar line 195 225.591 60 \;;
+#X scalar line 75 233.832 300 \;;
+#X scalar line 195 242.563 60 \;;
+#X scalar line 195 251.814 60 \;;
+#X scalar line 75 261.614 300 \;;
+#X scalar line 195 271.997 60 \;;
+#X scalar line 195 282.998 60 \;;
+#X scalar line 195 294.652 60 \;;
+#X scalar line 75 307 300 \;;
+#X scalar line 195 320.082 60 \;;
+#X scalar line 195 333.942 60 \;;
+#X scalar line 175 348.626 100 \;;
+#X scalar line 195 364.183 60 \;;
+#X scalar line 195 380.665 60 \;;
+#X scalar line 195 398.127 60 \;;
+#X scalar line 75 416.628 300 \;;
+#X scalar line 195 436.228 60 \;;
+#X scalar line 195 456.994 60 \;;
+#X scalar line 75 478.995 300 \;;
+#X scalar line 195 502.305 60 \;;
+#X scalar line 195 527 60 \;;
+#X scalar line 195 553.164 60 \;;
+#X scalar line 75 580.883 300 \;;
+#X scalar line 195 610.251 60 \;;
+#X scalar line 195 641.365 60 \;;
+#X scalar line 75 674.33 300 \;;
+#X scalar line 195 709.254 60 \;;
+#X scalar line 195 746.255 60 \;;
+#X scalar line 75 785.456 300 \;;
+#X text 50 -32 Linear frequency chart -- cut this down the middle and
+use as a slide rule to compute frequency shifts. The longer lines are
+staves with the bass and treble clef. The numbers are the MIDI pitches.
+;
+#X text 148 686 36;
+#X text 109 751 zero Hz.;
+#X coords 0 847 1 846 0 0 0;
+#X restore 25 174 pd data;
+#N canvas 308 63 600 392 line 0;
+#X obj 140 114 drawpolygon 0 1 0 0 w 0;
+#X obj 145 63 struct line float x float y float w;
+#X restore 25 195 pd line;
+#N canvas 567 89 600 392 label 0;
+#X obj 140 114 drawnumber n 0 0 0;
+#X obj 145 63 struct label float x float y float n;
+#X restore 25 216 pd label;
+#N canvas 468 99 775 518 generator 0;
+#X obj 353 173 sel 36 60;
+#X obj 457 171 pointer;
+#X msg 457 149 traverse pd-data \, bang;
+#X msg 28 11 \; pd-data clear;
+#X obj 146 52 until;
+#X obj 146 76 float;
+#X obj 193 77 + 1;
+#X obj 146 100 moses 77;
+#X obj 245 76 t b;
+#X obj 146 31 t b b;
+#X msg 146 10 bang;
+#X obj 83 116 t f f f;
+#X obj 137 196 t b b;
+#X obj 135 150 sel 43 47 50 53 57 64 67 71 74 77;
+#X msg 219 46 30;
+#X obj 49 89 sel 30;
+#X obj 52 149 mtof;
+#X obj 11 191 t b b;
+#X obj 12 231 0;
+#X msg 248 221 100;
+#X msg 322 222 60;
+#X msg 216 222 150;
+#X msg 293 222 170;
+#X obj 195 377 append line y x w;
+#X obj 52 257 + 20;
+#X msg 132 220 50;
+#X msg 161 219 300;
+#X obj 144 409 - 20;
+#X obj 105 437 append label y x n;
+#X obj 58 375 + 6;
+#X obj 52 170 * 1;
+#X obj 59 407 moses 120;
+#X connect 0 0 21 0;
+#X connect 0 0 19 0;
+#X connect 0 1 19 0;
+#X connect 0 1 21 0;
+#X connect 0 2 22 0;
+#X connect 0 2 20 0;
+#X connect 1 0 23 3;
+#X connect 1 0 28 3;
+#X connect 2 0 1 0;
+#X connect 4 0 5 0;
+#X connect 5 0 6 0;
+#X connect 5 0 7 0;
+#X connect 5 0 15 0;
+#X connect 6 0 5 1;
+#X connect 7 1 8 0;
+#X connect 8 0 4 1;
+#X connect 9 0 4 0;
+#X connect 9 1 14 0;
+#X connect 9 1 2 0;
+#X connect 10 0 9 0;
+#X connect 11 0 16 0;
+#X connect 11 1 28 2;
+#X connect 11 2 13 0;
+#X connect 12 0 25 0;
+#X connect 12 1 26 0;
+#X connect 13 0 12 0;
+#X connect 13 1 12 0;
+#X connect 13 2 12 0;
+#X connect 13 3 12 0;
+#X connect 13 4 12 0;
+#X connect 13 5 12 0;
+#X connect 13 6 12 0;
+#X connect 13 7 12 0;
+#X connect 13 8 12 0;
+#X connect 13 9 12 0;
+#X connect 13 10 0 0;
+#X connect 14 0 5 1;
+#X connect 15 0 17 0;
+#X connect 15 1 11 0;
+#X connect 16 0 30 0;
+#X connect 17 0 18 0;
+#X connect 17 1 21 0;
+#X connect 17 1 19 0;
+#X connect 18 0 24 0;
+#X connect 19 0 23 2;
+#X connect 20 0 23 2;
+#X connect 21 0 23 1;
+#X connect 21 0 27 0;
+#X connect 22 0 23 1;
+#X connect 22 0 27 0;
+#X connect 24 0 23 0;
+#X connect 24 0 29 0;
+#X connect 25 0 23 1;
+#X connect 25 0 27 0;
+#X connect 26 0 23 2;
+#X connect 27 0 28 1;
+#X connect 29 0 31 0;
+#X connect 30 0 24 0;
+#X connect 31 1 28 0;
+#X restore 25 238 pd generator;
+#X text 53 5 FREQUENCY SHIFTER SLIDE RULE.;
+#X text 23 32 This might help you if you need to compute products of
+frequency shifting and/or FM spectra. Print and cut in half down the
+middle. If you know the pitches associated with two frequencies a and
+b \, align the pitch of a on the left side against the zero-frequency
+marker on the right side. Then find the pitch of b on the right \,
+and the matching pitch on the left corresponds to the frequency a+b.
+To get a-b \, find b on the left and look up the corresponding pitch
+on the right.;
diff --git a/desiredata/doc/4.data.structures/14.sinedecomposer.pd b/desiredata/doc/4.data.structures/14.sinedecomposer.pd
new file mode 100644
index 00000000..1d240ce7
--- /dev/null
+++ b/desiredata/doc/4.data.structures/14.sinedecomposer.pd
@@ -0,0 +1,250 @@
+#N struct peak-template float x float y float amp float ampreal float
+ampimag;
+#N canvas 303 216 854 536 12;
+#X msg 501 258 bang;
+#X obj 30 360 pack 0 100;
+#X obj 30 384 line~;
+#X obj 30 336 dbtorms;
+#N canvas 95 102 724 400 fft 0;
+#X obj 64 67 inlet~;
+#X obj 134 107 print~;
+#X msg 137 71 bang;
+#X obj 64 104 rfft~;
+#N canvas 0 0 450 300 graph3 0;
+#X array array3 4096 float 0;
+#X coords 0 100 4096 -100 400 150 1;
+#X restore 254 14 graph;
+#N canvas 0 0 450 300 graph4 0;
+#X array array4 4096 float 0;
+#X coords 0 100 4096 -100 400 150 1;
+#X restore 256 165 graph;
+#X obj 9 185 tabsend~ array3;
+#X obj 50 158 tabsend~ array4;
+#X msg 37 246 \; array3 resize 4096 \; array4 resize 4096;
+#X obj 62 38 block~ 4096 1;
+#X connect 0 0 1 0;
+#X connect 0 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 6 0;
+#X connect 3 1 7 0;
+#X restore 135 412 pd fft;
+#X obj 30 408 *~;
+#X obj 476 231 adc~;
+#N canvas 204 36 521 368 analysis 0;
+#X obj 206 37 inlet;
+#X msg 207 68 bang;
+#X obj 275 52 r snapshot;
+#X msg 220 169 4096 array3 array4 50;
+#X obj 127 252 print;
+#X obj 206 103 t b b b;
+#X obj 122 140 s done-analysis;
+#X obj 248 133 s start-analysis;
+#X obj 220 219 s found-peak;
+#X obj 154 194 r loud;
+#X obj 128 226 spigot;
+#X obj 220 193 pique;
+#X connect 0 0 1 0;
+#X connect 1 0 5 0;
+#X connect 2 0 1 0;
+#X connect 3 0 11 0;
+#X connect 5 0 6 0;
+#X connect 5 1 3 0;
+#X connect 5 2 7 0;
+#X connect 9 0 10 1;
+#X connect 10 0 4 0;
+#X connect 11 0 8 0;
+#X connect 11 0 10 0;
+#X restore 613 295 pd analysis;
+#X obj 30 313 r loop-amp;
+#X msg 613 271 snapshot;
+#X text 23 167 click here first;
+#X text 613 247 analysis;
+#N canvas 36 255 884 389 peak-saver 0;
+#X floatatom 710 310 0 0 0 0 - - -;
+#X floatatom 633 309 0 0 0 0 - - -;
+#X floatatom 560 305 0 0 0 0 - - -;
+#X floatatom 484 303 0 0 0 0 - - -;
+#X obj 406 251 pointer;
+#X obj 354 150 pointer;
+#X msg 374 60 bang;
+#X obj 142 243 rmstodb;
+#X obj 10 244 * 0.1;
+#X obj 141 268 * -3;
+#X floatatom 416 300 0 0 0 0 - - -;
+#X obj 353 36 r start-analysis;
+#X obj 354 89 t b b;
+#X msg 29 89 50 60 70;
+#X obj 28 120 append peak-template x y amp;
+#X msg 426 225 next;
+#X obj 402 276 get peak-template x y amp ampreal ampimag;
+#X obj 9 293 append peak-template x y amp ampreal ampimag;
+#X obj 116 167 r found-peak;
+#X obj 117 196 unpack 0 0 0 0 0;
+#X msg 76 244 330;
+#X msg 400 87 \; pd-peak-list clear;
+#X msg 354 125 traverse pd-peak-list \, bang;
+#X msg 408 201 traverse pd-peak-list \, next;
+#X connect 4 0 16 0;
+#X connect 5 0 14 3;
+#X connect 5 0 17 5;
+#X connect 6 0 12 0;
+#X connect 7 0 9 0;
+#X connect 8 0 17 0;
+#X connect 9 0 17 2;
+#X connect 11 0 12 0;
+#X connect 12 0 22 0;
+#X connect 12 1 21 0;
+#X connect 13 0 14 0;
+#X connect 15 0 4 0;
+#X connect 16 0 10 0;
+#X connect 16 1 3 0;
+#X connect 16 2 2 0;
+#X connect 16 3 1 0;
+#X connect 16 4 0 0;
+#X connect 18 0 19 0;
+#X connect 19 1 8 0;
+#X connect 19 2 20 0;
+#X connect 19 2 7 0;
+#X connect 19 3 17 3;
+#X connect 19 4 17 4;
+#X connect 20 0 17 1;
+#X connect 22 0 5 0;
+#X connect 23 0 4 0;
+#X restore 339 378 pd peak-saver;
+#N canvas 231 169 656 237 peak-template 0;
+#X obj 45 90 filledpolygon 3 3 3 0 0 0 amp 0 0;
+#X obj 37 16 struct peak-template float x float y float amp float ampreal
+float ampimag;
+#X restore 339 402 pd peak-template;
+#N canvas 0 0 600 382 peak-list 1;
+#X scalar peak-template 6.52298 330 -195.561 0.0125191 -0.0131689 \;
+;
+#X scalar peak-template 13.0656 330 -262.841 0.222392 0.0909196 \;
+;
+#X scalar peak-template 26.2816 330 -188.229 0.0133818 0.00299871 \;
+;
+#X scalar peak-template 34.1579 330 -182.784 -0.0111106 0.000616574
+\;;
+#X scalar peak-template 39.2398 330 -192.587 0.00649353 -0.0148522
+\;;
+#X scalar peak-template 54.2567 330 -169.462 -0.00637704 0.00196744
+\;;
+#X scalar peak-template 64.6374 330 -153.343 -0.00231745 -0.00274854
+\;;
+#X scalar peak-template 70.731 330 -228.984 -0.0391646 -0.0525299 \;
+;
+#X scalar peak-template 83.4018 330 -157.354 0.00213705 0.00360794
+\;;
+#X scalar peak-template 89.0428 330 -164.547 0.00509053 0.00215158
+\;;
+#X scalar peak-template 96.8527 330 -127.029 0.00018868 -0.00129597
+\;;
+#X scalar peak-template 108.145 330 -206.524 -0.0244265 0.0130057 \;
+;
+#X scalar peak-template 119.672 330 -139.871 0.000310867 0.00212115
+\;;
+#X scalar peak-template 129.195 330 -154.988 0.00101519 -0.00369247
+\;;
+#X scalar peak-template 148.144 330 -131.59 -0.000488336 0.00148172
+\;;
+#X scalar peak-template 156.394 330 -157.846 0.00107442 -0.00413614
+\;;
+#X scalar peak-template 168.637 330 -126.924 0.0001938 -0.00128991
+\;;
+#X scalar peak-template 189.884 330 -119.499 0.000252664 -0.000947853
+\;;
+#X scalar peak-template 211.047 330 -130.949 0.000525129 0.0014288
+\;;
+#X restore 339 426 pd peak-list;
+#X msg 38 192 \; pd dsp 1;
+#X obj 720 296 s loud;
+#X text 539 189 live sample;
+#X text 719 234 print out;
+#X text 720 249 peak list;
+#X text 168 7 SPECTRAL SNAPSHOTS.;
+#X text 15 18 This patch reads a soundfile or records a live sound.
+When you click on "snapshot" the peak-list window shows a list of the
+sinusoidal peaks that were found at that instant in the sound. You
+can also ask for the peak lists to be printed out.;
+#N canvas 132 255 634 331 insample 0;
+#N canvas 0 0 450 300 graph1 0;
+#X array sample 155948 float 0;
+#X coords 0 1 155947 -1 400 150 1;
+#X restore 199 18 graph;
+#X obj 19 70 r read-sample;
+#X obj 19 95 unpack s f;
+#X obj 53 121 s insamprate;
+#X obj 19 171 soundfiler;
+#X msg 19 147 read -resize \$1 sample;
+#X obj 19 201 s insamplength;
+#X msg 357 197 \; sample resize 220500 \; insamplength 220500;
+#X connect 1 0 2 0;
+#X connect 2 0 5 0;
+#X connect 2 1 3 0;
+#X connect 4 0 6 0;
+#X connect 5 0 4 0;
+#X restore 336 350 pd insample;
+#N canvas 186 103 405 461 test-signal 0;
+#X obj 135 296 tabread4~ sample;
+#X obj 135 271 line~;
+#X obj 95 146 f;
+#X obj 254 46 r insamprate;
+#X obj 135 415 outlet~;
+#X obj 146 33 r insamplength;
+#X msg 134 247 0 \, \$1 \$2;
+#X obj 134 221 pack 0 0;
+#X obj 209 190 /;
+#X obj 299 99 * 0.001;
+#X obj 135 388 hip~ 5;
+#X obj 33 5 loadbang;
+#X text 242 13 sample playback;
+#X msg 33 25 1;
+#X obj 33 69 metro 1000;
+#X floatatom 33 48 0 0 0 0 - - -;
+#X obj 255 75 t b b f;
+#X obj 161 84 t b f;
+#X connect 0 0 10 0;
+#X connect 1 0 0 0;
+#X connect 2 0 7 0;
+#X connect 3 0 16 0;
+#X connect 5 0 17 0;
+#X connect 6 0 1 0;
+#X connect 7 0 6 0;
+#X connect 8 0 7 1;
+#X connect 8 0 14 1;
+#X connect 9 0 8 1;
+#X connect 10 0 4 0;
+#X connect 11 0 13 0;
+#X connect 13 0 15 0;
+#X connect 14 0 2 0;
+#X connect 15 0 14 0;
+#X connect 16 0 13 0;
+#X connect 16 1 8 0;
+#X connect 16 2 9 0;
+#X connect 17 0 13 0;
+#X connect 17 1 8 0;
+#X connect 17 1 2 1;
+#X restore 135 389 pd test-signal;
+#X text 136 317 amplitude;
+#X text 212 174 read a sample;
+#X msg 136 193 \; read-sample ../sound/bell.aiff 44100;
+#X text 12 97 The active ingredient is "pique" in the "analysis" subwindow
+\, which is in the "extras" directory in the Pd release.;
+#X msg 136 230 \; read-sample ../sound/voice.wav 32000;
+#X obj 458 295 tabwrite~ sample;
+#X obj 720 274 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X msg 136 268 \; read-sample ../sound/voice2.wav;
+#X obj 29 435 output~;
+#X connect 0 0 29 0;
+#X connect 1 0 2 0;
+#X connect 2 0 5 0;
+#X connect 3 0 1 0;
+#X connect 5 0 32 0;
+#X connect 5 0 32 1;
+#X connect 6 0 29 0;
+#X connect 8 0 3 0;
+#X connect 9 0 7 0;
+#X connect 23 0 4 0;
+#X connect 23 0 5 1;
+#X connect 30 0 16 0;
diff --git a/desiredata/doc/4.data.structures/15.partialtracer.pd b/desiredata/doc/4.data.structures/15.partialtracer.pd
new file mode 100644
index 00000000..5fb1323f
--- /dev/null
+++ b/desiredata/doc/4.data.structures/15.partialtracer.pd
@@ -0,0 +1,839 @@
+#N struct peak-template float x float y float amp float ampreal float
+ampimag float used;
+#N struct trace-template float x float y float voiceno array bazoo
+point-template;
+#N struct point-template float y float amp;
+#N canvas 163 180 926 633 12;
+#X floatatom 777 72 0 0 0 0 - - -;
+#N canvas 516 98 663 557 boo 0;
+#X obj 103 108 outlet;
+#X msg 101 80 set \$1;
+#X obj 103 57 r osc-amp;
+#X connect 1 0 0 0;
+#X connect 2 0 1 0;
+#X restore 777 52 pd;
+#X obj 781 99 s osc-amp;
+#X obj 121 513 pack 0 100;
+#X obj 122 533 line~;
+#X obj 121 493 dbtorms;
+#X obj 122 573 *~;
+#X floatatom 811 225 0 0 0 0 - - -;
+#X msg 668 269 0;
+#X floatatom 737 225 0 0 0 0 - - -;
+#X floatatom 838 290 0 0 0 0 - - -;
+#X floatatom 647 71 0 0 0 0 - - -;
+#N canvas 516 98 663 555 boo 0;
+#X obj 103 108 outlet;
+#X msg 101 80 set \$1;
+#X obj 103 57 r grain-amp;
+#X connect 1 0 0 0;
+#X connect 2 0 1 0;
+#X restore 647 51 pd;
+#N canvas 201 90 556 354 analysis 0;
+#X obj 286 45 r snapshot;
+#X obj 81 283 print;
+#X obj 138 154 t b b b;
+#X obj 26 189 s done-analysis;
+#X obj 272 149 s start-analysis;
+#X obj 209 261 s found-peak;
+#X obj 139 263 r loud;
+#X obj 82 262 spigot;
+#X msg 179 101 1;
+#X obj 40 99 r fft-done;
+#X obj 40 129 spigot;
+#X msg 143 101 0;
+#X obj 289 84 del 0.01;
+#X msg 287 66 bang;
+#X text 238 103 Wait for the next FFT to come by before doing the peak
+search.;
+#X obj 443 176 r errthresh;
+#X msg 446 219 errthresh \$1;
+#X floatatom 443 199 0 0 0 0 - - -;
+#X obj 276 173 r window-size;
+#X obj 220 190 f;
+#X msg 211 211 \$1 fft-real fft-imag 10;
+#X obj 211 231 pique;
+#X connect 0 0 13 0;
+#X connect 2 0 3 0;
+#X connect 2 1 19 0;
+#X connect 2 2 4 0;
+#X connect 2 2 11 0;
+#X connect 6 0 7 1;
+#X connect 7 0 1 0;
+#X connect 8 0 10 1;
+#X connect 9 0 10 0;
+#X connect 10 0 2 0;
+#X connect 11 0 10 1;
+#X connect 12 0 8 0;
+#X connect 13 0 12 0;
+#X connect 15 0 17 0;
+#X connect 16 0 21 0;
+#X connect 17 0 16 0;
+#X connect 18 0 19 1;
+#X connect 19 0 20 0;
+#X connect 20 0 21 0;
+#X connect 21 0 5 0;
+#X connect 21 0 7 0;
+#X restore 351 411 pd analysis;
+#N canvas 168 244 589 236 peak-template 0;
+#X obj 81 52 filledpolygon 3 3 3 0 0 0 amp 0 0;
+#X obj 74 10 struct peak-template float x float y float amp float ampreal
+float ampimag float used;
+#X restore 351 516 pd peak-template;
+#N canvas 0 0 600 386 peak-list 0;
+#X scalar peak-template 14.6015 330 -247.288 0.111508 -0.0711486 0
+\;;
+#X scalar peak-template 27.1653 330 -217.279 0.0258328 0.0328795 0
+\;;
+#X scalar peak-template 38.6569 330 -224.35 -0.0509761 0.0202439 0
+\;;
+#X scalar peak-template 59.9432 330 -204.752 0.0256193 0.00348008 0
+\;;
+#X scalar peak-template 70.7537 330 -220.483 -0.0080783 0.0465889 0
+\;;
+#X scalar peak-template 82.8075 330 -172.145 -0.007237 -0.00153184
+0 \;;
+#X scalar peak-template 94.3779 330 -170.655 0.00668927 -0.00201552
+0 \;;
+#X scalar peak-template 109.018 330 -196.083 0.015492 -0.0101804 0
+\;;
+#X scalar peak-template 118.207 330 -151.073 -0.00325508 -0.000512459
+0 \;;
+#X scalar peak-template 131.204 330 -166.747 -0.00591408 0.00108779
+0 \;;
+#X restore 351 454 pd peak-list;
+#N canvas 20 23 472 426 trace-list 1;
+#X scalar trace-template 0 0 10 \; -199.613 82.4286 \; \;;
+#X scalar trace-template 0 0 9 \; -242.604 72.4257 \; \;;
+#X scalar trace-template 0 0 8 \; -267.035 74.7826 \; \;;
+#X scalar trace-template 0 0 7 \; -297.412 68.2501 \; \;;
+#X scalar trace-template 0 0 6 \; -308.895 73.4936 \; \;;
+#X scalar trace-template 0 0 5 \; -319.788 57.3809 \; \;;
+#X scalar trace-template 0 0 4 \; -328.845 56.8844 \; \;;
+#X scalar trace-template 0 0 3 \; -338.831 65.3604 \; \;;
+#X scalar trace-template 0 0 2 \; -344.435 50.3571 \; \;;
+#X scalar trace-template 0 0 1 \; -351.66 55.5817 \; \;;
+#X restore 351 494 pd trace-list;
+#N canvas 56 84 527 179 trace-template 0;
+#X obj 121 72 plot bazoo 0 1 0 500 5;
+#X text 121 93 This template describes a pitch/amplitude trace. The
+array "bazoo" holds the actual points. In this template \, y is always
+0 and x is the starting location in pixels. There are 5 pixels per
+point.;
+#X obj 125 36 struct trace-template float x float y float voiceno array
+bazoo point-template;
+#X restore 351 537 pd trace-template;
+#N canvas 96 258 494 158 point-template 0;
+#X text 127 56 This template describes a single point on a pitch trace
+(cf. trace-template w describes the trace itself.);
+#X text 127 89 "y" is the field that is shown on the graph \; it's
+- 4 * pitch. You also get an "amp" field in dB \, which you can't see
+as a plot (yet).;
+#X obj 212 14 struct point-template float y float amp;
+#X restore 351 557 pd point-template;
+#X msg 746 506 bang;
+#X obj 8 425 pack 0 100;
+#X obj 8 449 line~;
+#X obj 8 405 dbtorms;
+#X floatatom 545 70 0 0 0 0 - - -;
+#N canvas 194 37 730 722 output 0;
+#X obj 295 76 t b f;
+#X obj 286 100 +;
+#X obj 515 207 f;
+#X obj 532 165 f;
+#X obj 359 210 f;
+#X obj 83 179 t b;
+#X obj 82 127 f;
+#X obj 71 58 inlet;
+#X text 78 37 mute;
+#X obj 83 201 f;
+#X msg 235 153 0;
+#X msg 74 84 bang;
+#X obj 83 155 moses 1;
+#X obj 231 69 t b f;
+#X obj 222 93 +;
+#X obj 181 27 r loop-amp;
+#X obj 395 26 r osc-amp;
+#X obj 83 236 s loop-amp;
+#X obj 359 235 s osc-amp;
+#X obj 591 125 print;
+#X obj 186 148 f;
+#X obj 374 168 f;
+#X obj 225 120 t b b;
+#X obj 552 23 r grain-amp;
+#X obj 516 232 s grain-amp;
+#X connect 0 0 1 0;
+#X connect 0 1 1 1;
+#X connect 1 0 6 1;
+#X connect 2 0 24 0;
+#X connect 3 0 2 1;
+#X connect 4 0 18 0;
+#X connect 5 0 9 0;
+#X connect 5 0 4 0;
+#X connect 5 0 2 0;
+#X connect 6 0 12 0;
+#X connect 7 0 11 0;
+#X connect 9 0 17 0;
+#X connect 10 0 17 0;
+#X connect 10 0 18 0;
+#X connect 10 0 24 0;
+#X connect 11 0 6 0;
+#X connect 12 0 5 0;
+#X connect 12 1 22 0;
+#X connect 13 0 14 0;
+#X connect 13 1 14 1;
+#X connect 14 0 1 0;
+#X connect 15 0 14 0;
+#X connect 15 0 20 1;
+#X connect 16 0 13 0;
+#X connect 16 0 21 1;
+#X connect 20 0 9 1;
+#X connect 21 0 4 1;
+#X connect 22 0 10 0;
+#X connect 22 1 20 0;
+#X connect 22 1 21 0;
+#X connect 22 1 3 0;
+#X connect 23 0 3 1;
+#X connect 23 0 0 0;
+#X restore 820 69 pd output;
+#N canvas 516 98 663 559 /SUBPATCH/ 0;
+#X obj 103 108 outlet;
+#X msg 101 80 set \$1;
+#X obj 103 57 r loop-amp;
+#X connect 1 0 0 0;
+#X connect 2 0 1 0;
+#X restore 545 50 pd;
+#N canvas 209 96 518 375 fft 0;
+#X floatatom 305 194 0 0 0 0 - - -;
+#X obj 454 160 r sample-rate;
+#X obj 454 180 t b f;
+#X obj 304 169 r window-size;
+#X obj 264 38 r sample-rate;
+#X obj 238 16 r window-size;
+#X obj 264 58 t b f;
+#X obj 238 83 /;
+#X obj 170 103 bang~;
+#X obj 169 175 line~;
+#X obj 238 104 * 1000;
+#X text 298 104 window size (msec);
+#X obj 168 281 rfft~;
+#X obj 170 337 tabsend~ fft-real;
+#X obj 207 307 tabsend~ fft-imag;
+#X obj 429 140 r location;
+#X obj 429 205 *;
+#X obj 429 228 * 0.001;
+#X text 498 228 location (samples);
+#X obj 169 129 f;
+#X msg 169 152 0 \, 1 \$1;
+#X obj 113 201 *~;
+#X obj 113 224 -~;
+#X obj 81 301 *~;
+#X obj 81 324 outlet~;
+#X floatatom 429 252 0 0 0 0 - - -;
+#X obj 53 127 s fft-done;
+#X obj 66 31 block~ 2048 1;
+#X obj 168 255 tabread4~ sample;
+#X obj 169 211 *~ 0;
+#X obj 168 232 +~ 0;
+#X connect 1 0 2 0;
+#X connect 2 0 16 0;
+#X connect 2 1 16 1;
+#X connect 3 0 0 0;
+#X connect 3 0 29 1;
+#X connect 4 0 6 0;
+#X connect 5 0 7 0;
+#X connect 6 0 7 0;
+#X connect 6 1 7 1;
+#X connect 7 0 10 0;
+#X connect 8 0 19 0;
+#X connect 8 0 26 0;
+#X connect 9 0 21 0;
+#X connect 9 0 21 1;
+#X connect 9 0 22 1;
+#X connect 9 0 29 0;
+#X connect 10 0 19 1;
+#X connect 12 0 13 0;
+#X connect 12 1 14 0;
+#X connect 15 0 16 0;
+#X connect 16 0 17 0;
+#X connect 17 0 25 0;
+#X connect 17 0 30 1;
+#X connect 19 0 20 0;
+#X connect 20 0 9 0;
+#X connect 21 0 22 0;
+#X connect 22 0 23 0;
+#X connect 23 0 24 0;
+#X connect 28 0 12 0;
+#X connect 28 0 23 1;
+#X connect 29 0 30 0;
+#X connect 30 0 28 0;
+#X restore 22 470 pd fft;
+#X obj 8 493 *~;
+#X obj 9 544 hip~ 5;
+#X obj 9 571 dac~;
+#X obj 754 529 adc~;
+#X obj 545 91 s loop-amp;
+#X msg 820 48 mute;
+#X text 18 97 click here first;
+#X text 741 489 live sample;
+#X text 677 25 AMPLITUDES;
+#N canvas 5 1 864 622 make-trace 0;
+#X obj 186 220 * -0.33333;
+#X obj 91 216 * 10;
+#X obj 118 136 pointer;
+#X msg 118 115 next;
+#X obj 118 97 until;
+#X obj 387 134 pointer;
+#X msg 389 108 next;
+#X obj 200 330 unpack;
+#X obj 255 332 s amp;
+#X obj 283 378 s frequency;
+#X obj 300 361 s pitch;
+#X obj 251 375 f 0;
+#X obj 200 348 t b b b b f;
+#X obj 781 133 pointer;
+#X obj 744 602 setsize trace-template bazoo;
+#X obj 744 514 random 200;
+#X obj 744 532 + 100;
+#X obj 857 526 pointer;
+#X obj 218 532 pointer;
+#X floatatom 356 524 0 0 0 0 - - -;
+#X floatatom 296 550 0 0 0 0 - - -;
+#X msg 205 509 bang;
+#X floatatom 108 461 0 0 0 0 - - -;
+#X floatatom 40 509 0 0 0 0 - - -;
+#X floatatom 153 590 0 0 0 0 - - -;
+#X floatatom 516 556 0 0 0 0 - - -;
+#X floatatom 356 489 0 0 0 0 - - -;
+#X floatatom 667 511 0 0 0 0 - - -;
+#X obj 481 464 pointer;
+#X msg 508 447 next;
+#X floatatom 532 512 0 0 0 0 - - -;
+#X obj 516 539 getsize trace-template bazoo;
+#X obj 127 563 get point-template y;
+#X obj 40 533 set point-template y;
+#X obj 101 486 element trace-template bazoo;
+#X obj 296 580 setsize trace-template bazoo;
+#X obj 356 507 set trace-template x;
+#X obj 356 542 set trace-template y;
+#X msg 744 497 bang;
+#X obj 744 549 append trace-template x;
+#X obj 519 489 get trace-template x y;
+#X obj 744 567 t b p;
+#X msg 744 584 5;
+#X obj 816 93 s clear-traces;
+#X obj 783 155 s last-in-list;
+#X msg 780 43 bang;
+#X obj 780 60 t b b;
+#X obj 745 156 f 0;
+#X obj 744 176 s nframe;
+#X obj 445 337 r nframe;
+#X obj 429 356 f;
+#X obj 429 373 + 1;
+#X obj 429 391 s nframe;
+#X obj 429 296 r done-frame;
+#X obj 437 315 s done-adding-traces;
+#X obj 19 309 r component;
+#X obj 19 326 unpack;
+#X obj 73 331 s amp;
+#X obj 104 370 s frequency;
+#X obj 120 354 s pitch;
+#X obj 70 388 s added-to-trace;
+#X obj 70 370 f 0;
+#X obj 62 408 s add-to-trace;
+#X obj 19 344 t b b b b f;
+#X obj 780 25 r clear-all;
+#X obj 200 311 r component2;
+#X obj 251 393 s started-new-trace;
+#X obj 240 414 s start-new-trace;
+#X obj 355 41 r done-analysis;
+#X obj 355 62 t b b b b;
+#X obj 292 176 r added-to-trace;
+#X obj 389 89 until;
+#X obj 456 172 get peak-template x amp;
+#X obj 552 195 * -0.33333;
+#X obj 456 190 * 10;
+#X obj 456 210 pack;
+#X obj 456 226 s component;
+#X obj 120 337 ftom;
+#X obj 387 155 t b p p;
+#X obj 256 196 set peak-template used;
+#X obj 259 176 f;
+#X obj 302 344 ftom;
+#X msg 175 31 \; done-frame bang;
+#X obj 21 178 get peak-template used x amp;
+#X obj 35 236 pack 0 0 0;
+#X obj 35 255 route 0;
+#X obj 35 272 s component2;
+#X obj 549 260 print x1;
+#X obj 226 276 print x2;
+#X obj 727 255 add-trace 1;
+#X obj 728 274 add-trace 2;
+#X obj 728 291 add-trace 3;
+#X obj 727 309 add-trace 4;
+#X obj 728 328 add-trace 5;
+#X obj 728 345 add-trace 6;
+#X obj 728 363 add-trace 7;
+#X obj 729 381 add-trace 8;
+#X obj 729 399 add-trace 9;
+#X obj 729 417 add-trace 10;
+#X msg 484 111 traverse pd-peak-list;
+#X msg 781 115 traverse pd-trace-list \, bang;
+#X msg 833 59 \; pd-trace-list clear;
+#X msg 481 430 traverse pd-trace-list \, next;
+#X msg 857 509 traverse pd-trace-list \, bang;
+#X connect 0 0 84 2;
+#X connect 1 0 84 1;
+#X connect 2 0 83 0;
+#X connect 2 1 4 1;
+#X connect 3 0 2 0;
+#X connect 4 0 3 0;
+#X connect 5 0 78 0;
+#X connect 5 1 71 1;
+#X connect 6 0 5 0;
+#X connect 7 0 12 0;
+#X connect 7 1 8 0;
+#X connect 11 0 66 0;
+#X connect 12 2 67 0;
+#X connect 12 3 11 0;
+#X connect 12 4 81 0;
+#X connect 12 4 9 0;
+#X connect 13 0 44 0;
+#X connect 15 0 16 0;
+#X connect 16 0 39 0;
+#X connect 17 0 39 1;
+#X connect 18 0 32 0;
+#X connect 19 0 37 0;
+#X connect 20 0 35 0;
+#X connect 21 0 18 0;
+#X connect 22 0 34 0;
+#X connect 23 0 33 0;
+#X connect 26 0 36 0;
+#X connect 28 0 35 1;
+#X connect 28 0 36 1;
+#X connect 28 0 37 1;
+#X connect 28 0 34 1;
+#X connect 28 0 40 0;
+#X connect 28 0 31 0;
+#X connect 29 0 28 0;
+#X connect 31 0 25 0;
+#X connect 32 0 24 0;
+#X connect 34 0 18 0;
+#X connect 34 0 33 1;
+#X connect 38 0 15 0;
+#X connect 39 0 41 0;
+#X connect 40 0 30 0;
+#X connect 40 1 27 0;
+#X connect 41 0 42 0;
+#X connect 41 1 14 1;
+#X connect 42 0 14 0;
+#X connect 45 0 46 0;
+#X connect 46 0 100 0;
+#X connect 46 0 47 0;
+#X connect 46 1 101 0;
+#X connect 46 1 43 0;
+#X connect 47 0 48 0;
+#X connect 49 0 50 1;
+#X connect 50 0 51 0;
+#X connect 51 0 52 0;
+#X connect 53 0 50 0;
+#X connect 53 0 54 0;
+#X connect 55 0 56 0;
+#X connect 56 0 63 0;
+#X connect 56 1 57 0;
+#X connect 61 0 60 0;
+#X connect 63 2 62 0;
+#X connect 63 3 61 0;
+#X connect 63 4 77 0;
+#X connect 63 4 58 0;
+#X connect 64 0 45 0;
+#X connect 65 0 7 0;
+#X connect 68 0 69 0;
+#X connect 69 0 82 0;
+#X connect 69 1 4 0;
+#X connect 69 2 71 0;
+#X connect 69 3 99 0;
+#X connect 70 0 80 1;
+#X connect 71 0 6 0;
+#X connect 72 0 74 0;
+#X connect 72 1 73 0;
+#X connect 73 0 75 1;
+#X connect 74 0 75 0;
+#X connect 75 0 76 0;
+#X connect 77 0 59 0;
+#X connect 78 0 80 0;
+#X connect 78 1 79 1;
+#X connect 78 2 72 0;
+#X connect 80 0 79 0;
+#X connect 81 0 10 0;
+#X connect 83 0 84 0;
+#X connect 83 1 1 0;
+#X connect 83 2 0 0;
+#X connect 84 0 85 0;
+#X connect 85 0 86 0;
+#X connect 99 0 5 0;
+#X connect 99 0 2 0;
+#X connect 100 0 13 0;
+#X connect 102 0 28 0;
+#X connect 103 0 17 0;
+#X restore 351 474 pd make-trace;
+#X floatatom 5 289 0 0 0 0 - - -;
+#N canvas 0 0 955 721 arrays 0;
+#X msg 39 202 \; fft-real resize 4096 \; fft-imag resize 4096;
+#N canvas 0 0 450 300 graph1 0;
+#X array fft-real 4096 float 0;
+#X coords 0 1 4096 -1 400 300 1;
+#X restore 432 41 graph;
+#N canvas 0 0 450 300 graph2 0;
+#X array fft-imag 4096 float 0;
+#X coords 0 1 4096 -1 400 300 1;
+#X restore 419 265 graph;
+#X restore 571 515 pd arrays;
+#X obj 5 309 s location;
+#X obj 123 412 r loop-amp;
+#X obj 737 288 f;
+#X obj 5 248 r location;
+#X msg 5 268 set \$1;
+#X obj 777 288 +;
+#X obj 737 309 moses 900;
+#X msg 695 329 0;
+#X msg 694 247 1;
+#X msg 736 335 \; location \$1 \; snapshot bang;
+#X msg 655 170 bang \; location 0 \; clear-all bang;
+#X floatatom 655 305 0 0 0 0 - - -;
+#X obj 655 225 t b b;
+#X obj 838 270 r incr;
+#X obj 8 385 r grain-amp;
+#X obj 121 473 r osc-amp;
+#X obj 143 553 catch~ osc-sum;
+#N canvas 102 67 751 619 osc-bank 0;
+#X obj 311 433 osc-voice;
+#X obj 290 451 osc-voice;
+#X obj 269 471 osc-voice;
+#X obj 248 490 osc-voice;
+#X obj 227 510 osc-voice;
+#X obj 207 528 osc-voice;
+#X obj 186 547 osc-voice;
+#X obj 165 566 osc-voice;
+#X obj 144 586 osc-voice;
+#X obj 123 410 route 1 2 3 4 5 6 7 8 9 10;
+#X msg 377 269 0;
+#X obj 728 489 pointer;
+#X floatatom 848 417 0 0 0 0 - - -;
+#X obj 623 351 pointer;
+#X msg 549 491 next;
+#X floatatom 623 419 0 0 0 0 - - -;
+#X obj 231 111 pointer;
+#X floatatom 368 104 0 0 0 0 - - -;
+#X floatatom 309 129 0 0 0 0 - - -;
+#X msg 218 88 bang;
+#X floatatom 120 40 0 0 0 0 - - -;
+#X floatatom 53 88 0 0 0 0 - - -;
+#X floatatom 165 169 0 0 0 0 - - -;
+#X floatatom 546 137 0 0 0 0 - - -;
+#X floatatom 368 69 0 0 0 0 - - -;
+#X floatatom 680 90 0 0 0 0 - - -;
+#X obj 552 43 pointer;
+#X msg 581 27 next;
+#X floatatom 545 92 0 0 0 0 - - -;
+#X obj 546 120 getsize trace-template bazoo;
+#X obj 140 142 get point-template y;
+#X obj 53 113 set point-template y;
+#X obj 113 66 element trace-template bazoo;
+#X obj 309 159 setsize trace-template bazoo;
+#X obj 368 86 set trace-template x;
+#X obj 368 121 set trace-template y;
+#X obj 532 68 get trace-template x y;
+#X floatatom 524 312 0 0 0 0 - - -;
+#X msg 524 288 1;
+#X msg 564 288 0;
+#X obj 623 451 <;
+#X obj 623 398 get trace-template x voiceno;
+#X obj 623 374 t p p;
+#X obj 393 337 until;
+#X obj 620 233 r start-resynth;
+#X obj 625 255 t b b;
+#X obj 504 353 f;
+#X obj 504 372 sel 0 1;
+#X obj 668 436 r synth-index;
+#X obj 621 555 pack f p;
+#X obj 623 470 sel 0 1;
+#X obj 305 230 r step-resynth;
+#X obj 378 288 f;
+#X obj 378 308 s synth-index;
+#X obj 636 523 f;
+#X obj 419 289 + 5;
+#X obj 621 490 t b b b;
+#X obj 305 252 t b b b;
+#X obj 281 301 s osc-tick;
+#X obj 123 604 osc-voice;
+#X msg 552 10 traverse pd-trace-list \, next;
+#X msg 621 288 traverse pd-trace-list \, next;
+#X connect 9 0 59 0;
+#X connect 9 1 8 0;
+#X connect 9 2 7 0;
+#X connect 9 3 6 0;
+#X connect 9 4 5 0;
+#X connect 9 5 4 0;
+#X connect 9 6 3 0;
+#X connect 9 7 2 0;
+#X connect 9 8 1 0;
+#X connect 9 9 0 0;
+#X connect 10 0 52 0;
+#X connect 11 0 49 1;
+#X connect 13 0 42 0;
+#X connect 13 1 39 0;
+#X connect 13 1 43 1;
+#X connect 14 0 13 0;
+#X connect 15 0 40 0;
+#X connect 16 0 30 0;
+#X connect 17 0 35 0;
+#X connect 18 0 33 0;
+#X connect 19 0 16 0;
+#X connect 20 0 32 0;
+#X connect 21 0 31 0;
+#X connect 24 0 34 0;
+#X connect 26 0 33 1;
+#X connect 26 0 34 1;
+#X connect 26 0 35 1;
+#X connect 26 0 32 1;
+#X connect 26 0 36 0;
+#X connect 26 0 29 0;
+#X connect 27 0 26 0;
+#X connect 29 0 23 0;
+#X connect 30 0 22 0;
+#X connect 32 0 16 0;
+#X connect 32 0 31 1;
+#X connect 36 0 28 0;
+#X connect 36 1 25 0;
+#X connect 37 0 46 1;
+#X connect 38 0 37 0;
+#X connect 39 0 37 0;
+#X connect 40 0 50 0;
+#X connect 41 0 15 0;
+#X connect 41 1 54 1;
+#X connect 42 0 41 0;
+#X connect 42 1 11 1;
+#X connect 43 0 46 0;
+#X connect 44 0 45 0;
+#X connect 45 0 61 0;
+#X connect 45 1 38 0;
+#X connect 45 1 10 0;
+#X connect 46 0 47 0;
+#X connect 47 0 43 1;
+#X connect 47 1 15 0;
+#X connect 48 0 40 1;
+#X connect 49 0 9 0;
+#X connect 50 0 43 1;
+#X connect 50 1 56 0;
+#X connect 51 0 57 0;
+#X connect 52 0 53 0;
+#X connect 52 0 55 0;
+#X connect 54 0 49 0;
+#X connect 55 0 52 1;
+#X connect 56 0 14 0;
+#X connect 56 1 54 0;
+#X connect 56 2 11 0;
+#X connect 57 0 58 0;
+#X connect 57 1 43 0;
+#X connect 57 2 52 0;
+#X connect 60 0 26 0;
+#X connect 61 0 13 0;
+#X restore 571 494 pd osc-bank;
+#X obj 646 95 s grain-amp;
+#N canvas 31 70 662 326 save-list 0;
+#X floatatom 759 255 0 0 0 0 - - -;
+#X floatatom 677 254 0 0 0 0 - - -;
+#X floatatom 599 251 0 0 0 0 - - -;
+#X floatatom 517 250 0 0 0 0 - - -;
+#X obj 435 206 pointer;
+#X obj 307 121 pointer;
+#X msg 328 47 bang;
+#X obj 152 200 rmstodb;
+#X obj 10 201 * 0.1;
+#X obj 151 220 * -3;
+#X floatatom 445 247 0 0 0 0 - - -;
+#X obj 304 27 r start-analysis;
+#X obj 305 71 t b b;
+#X msg 456 185 next;
+#X obj 430 227 get peak-template x y amp ampreal ampimag;
+#X obj 9 241 append peak-template x y amp ampreal ampimag;
+#X obj 125 138 r found-peak;
+#X obj 126 161 unpack 0 0 0 0 0;
+#X msg 81 201 330;
+#X msg 356 69 \; pd-peak-list clear;
+#X msg 305 100 traverse pd-peak-list \, bang;
+#X msg 437 166 traverse pd-peak-list \, next;
+#X connect 4 0 14 0;
+#X connect 5 0 15 5;
+#X connect 6 0 12 0;
+#X connect 7 0 9 0;
+#X connect 8 0 15 0;
+#X connect 9 0 15 2;
+#X connect 11 0 12 0;
+#X connect 12 0 20 0;
+#X connect 12 1 19 0;
+#X connect 13 0 4 0;
+#X connect 14 0 10 0;
+#X connect 14 1 3 0;
+#X connect 14 2 2 0;
+#X connect 14 3 1 0;
+#X connect 14 4 0 0;
+#X connect 16 0 17 0;
+#X connect 17 1 8 0;
+#X connect 17 2 18 0;
+#X connect 17 2 7 0;
+#X connect 17 3 15 3;
+#X connect 17 4 15 4;
+#X connect 18 0 15 1;
+#X connect 20 0 5 0;
+#X connect 21 0 4 0;
+#X restore 351 431 pd save-list;
+#X msg 9 114 \; pd dsp 1 \; window-size 2048 \; sample-rate 44100 \;
+f-threshold 40 \; incr 10 \; clear-all bang;
+#X obj 737 245 metro 150;
+#X floatatom 315 309 0 0 0 0 - - -;
+#X floatatom 377 309 0 0 0 0 - - -;
+#X msg 139 349 \; start-resynth bang;
+#X msg 315 350 \; step-resynth bang;
+#X obj 315 329 metro 100;
+#X msg 478 350 \; osc-stop bang;
+#X text 790 113 resynth;
+#X text 642 112 analyzed grains;
+#X text 554 112 original;
+#X text 653 151 ... and here third to analyze;
+#N canvas 0 0 276 216 test 0;
+#X floatatom 56 120 0 0 0 0 - - -;
+#X obj 56 141 s loud;
+#X msg 49 84 \; clear-all bang;
+#X msg 51 52 \; snapshot bang;
+#X connect 0 0 1 0;
+#X restore 569 538 pd test;
+#X text 317 140 read a sample;
+#X msg 214 163 \; read-sample ../sound/bell.aiff 44100;
+#N canvas 190 43 405 461 test-signal 0;
+#X obj 174 293 tabread4~ sample;
+#X obj 174 268 line~;
+#X obj 123 146 f;
+#X obj 330 46 r insamprate;
+#X obj 177 350 *~;
+#X obj 213 351 dbtorms;
+#X obj 213 328 inlet;
+#X obj 175 415 outlet~;
+#X obj 190 33 r insamplength;
+#X msg 174 247 0 \, \$1 \$2;
+#X obj 174 221 pack 0 0;
+#X obj 272 190 /;
+#X obj 389 99 * 0.001;
+#X obj 175 388 hip~ 5;
+#X obj 43 5 loadbang;
+#X text 315 13 sample playback;
+#X msg 43 25 1;
+#X obj 43 69 metro 1000;
+#X floatatom 43 48 0 0 0 0 - - -;
+#X obj 331 75 t b b f;
+#X obj 209 84 t b f;
+#X connect 0 0 4 0;
+#X connect 1 0 0 0;
+#X connect 2 0 10 0;
+#X connect 3 0 19 0;
+#X connect 4 0 13 0;
+#X connect 5 0 4 1;
+#X connect 6 0 5 0;
+#X connect 8 0 20 0;
+#X connect 9 0 1 0;
+#X connect 10 0 9 0;
+#X connect 11 0 10 1;
+#X connect 11 0 17 1;
+#X connect 12 0 11 1;
+#X connect 13 0 7 0;
+#X connect 14 0 16 0;
+#X connect 16 0 18 0;
+#X connect 17 0 2 0;
+#X connect 18 0 17 0;
+#X connect 19 0 16 0;
+#X connect 19 1 11 0;
+#X connect 19 2 12 0;
+#X connect 20 0 16 0;
+#X connect 20 1 11 0;
+#X connect 20 1 2 1;
+#X restore 125 436 pd test-signal;
+#N canvas 132 255 634 331 insample 0;
+#N canvas 0 0 450 300 graph1 0;
+#X array sample 155948 float 0;
+#X coords 0 1 155947 -1 400 150 1;
+#X restore 259 18 graph;
+#X obj 25 70 r read-sample;
+#X obj 25 95 unpack s f;
+#X obj 69 121 s insamprate;
+#X obj 25 171 soundfiler;
+#X msg 25 147 read -resize \$1 sample;
+#X obj 25 201 s insamplength;
+#X msg 464 197 \; sample resize 220500 \; insamplength 220500;
+#X connect 1 0 2 0;
+#X connect 2 0 5 0;
+#X connect 2 1 3 0;
+#X connect 4 0 6 0;
+#X connect 5 0 4 0;
+#X restore 569 559 pd insample;
+#X obj 744 553 tabwrite~ sample;
+#X text 152 0 SINUSOID TRACKING;
+#X text 129 259 to resynthesize \, "start" once and "step" ad lib.
+To stop \, stop stepping and hit osc-stop. Note resynth ampliture control
+above.;
+#X text 4 17 This patch tries to reconstruct sinusoidal "tracks" from
+a sampled sound using pique~ and the data structure facilities. It
+turns out to be quite hard \, not least because pique~ 0.1 puts out
+all sorts of spurious peaks.;
+#X msg 213 200 \; read-sample ../sound/voice.wav 44100;
+#X obj 847 194 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X connect 0 0 2 0;
+#X connect 1 0 0 0;
+#X connect 3 0 4 0;
+#X connect 4 0 6 0;
+#X connect 5 0 3 0;
+#X connect 6 0 28 0;
+#X connect 7 0 60 1;
+#X connect 8 0 41 1;
+#X connect 9 0 60 0;
+#X connect 10 0 44 1;
+#X connect 11 0 57 0;
+#X connect 12 0 11 0;
+#X connect 19 0 76 0;
+#X connect 20 0 21 0;
+#X connect 21 0 27 0;
+#X connect 22 0 20 0;
+#X connect 23 0 31 0;
+#X connect 25 0 23 0;
+#X connect 26 0 27 1;
+#X connect 27 0 28 0;
+#X connect 28 0 29 0;
+#X connect 28 0 29 1;
+#X connect 30 0 76 0;
+#X connect 32 0 24 0;
+#X connect 37 0 39 0;
+#X connect 40 0 74 0;
+#X connect 41 0 44 0;
+#X connect 41 0 45 0;
+#X connect 41 0 50 0;
+#X connect 42 0 43 0;
+#X connect 43 0 37 0;
+#X connect 44 0 41 1;
+#X connect 45 0 48 0;
+#X connect 45 1 46 0;
+#X connect 46 0 9 0;
+#X connect 47 0 9 0;
+#X connect 49 0 51 0;
+#X connect 51 0 47 0;
+#X connect 51 1 8 0;
+#X connect 52 0 10 0;
+#X connect 53 0 22 0;
+#X connect 54 0 5 0;
+#X connect 55 0 6 1;
+#X connect 60 0 41 0;
+#X connect 61 0 65 0;
+#X connect 62 0 65 1;
+#X connect 65 0 64 0;
+#X connect 74 0 28 0;
+#X connect 81 0 41 0;
diff --git a/desiredata/doc/4.data.structures/add-trace.pd b/desiredata/doc/4.data.structures/add-trace.pd
new file mode 100644
index 00000000..c04c855a
--- /dev/null
+++ b/desiredata/doc/4.data.structures/add-trace.pd
@@ -0,0 +1,152 @@
+#N canvas 222 113 821 785 10;
+#X obj 405 551 r amp;
+#X obj 466 531 element trace-template bazoo;
+#X obj 365 578 set point-template y amp;
+#X obj 382 454 r pitch;
+#X obj 366 496 f;
+#X obj 366 520 * -4;
+#X obj 442 417 pointer;
+#X obj 443 608 f 1;
+#X obj 326 252 f;
+#X obj 326 191 f;
+#X obj 326 215 sel 0;
+#X floatatom 201 220 0;
+#X obj 24 72 r add-to-trace;
+#X obj 326 143 r start-new-trace;
+#X obj 341 305 r nframe;
+#X floatatom 203 100 0;
+#X obj 22 419 r pitch;
+#X obj 75 245 r frequency;
+#X obj 68 561 r amp;
+#X text 141 200 current pitch;
+#X obj 24 262 mtof;
+#X obj 24 190 sel 1;
+#X obj 24 214 t b b;
+#X obj 24 286 -;
+#X obj 24 310 abs;
+#X obj 24 334 <;
+#X obj 79 314 r f-threshold;
+#X obj 24 358 sel 1;
+#X obj 21 461 f;
+#X obj 59 268 f;
+#X obj 24 238 f;
+#X text 34 374 if this happens \, add to the trace;
+#X obj 533 114 r done-adding-traces;
+#X obj 533 165 sel 0;
+#X obj 583 89 - 1;
+#X obj 14 45 f 2;
+#X obj 13 385 t b b;
+#X obj 203 34 r clear-traces;
+#X obj 203 58 f 0;
+#X obj 24 166 f;
+#X obj 533 141 f;
+#X obj 93 403 pointer;
+#X text 160 397 current trace;
+#X obj 115 454 getsize trace-template bazoo;
+#X obj 155 504 + 1;
+#X obj 155 528 setsize trace-template bazoo;
+#X obj 126 557 element trace-template bazoo;
+#X obj 115 478 t f f;
+#X obj 21 586 set point-template y amp;
+#X obj 93 427 t b p p;
+#X obj 21 485 * -4;
+#X obj 13 633 s added-to-trace;
+#X obj 13 609 f 1;
+#X obj 40 97 r added-to-trace;
+#X obj 24 118 f;
+#X obj 24 142 sel 0;
+#X obj 342 170 r started-new-trace;
+#X obj 326 276 sel 0;
+#X obj 443 633 s started-new-trace;
+#X text 535 482 last trace in list;
+#X text 514 411 reentrancy protection \; should go away;
+#X obj 541 464 s last-in-list;
+#X obj 615 350 r last-in-list;
+#X obj 443 474 t b b p;
+#X obj 465 507 f 0;
+#X obj 326 357 * 5;
+#X obj 326 332 f;
+#X obj 292 300 f 2;
+#X text 238 52 "state" -- 0 if free \, 1 if making a trace \, and 2 if we've added a point for the current frame;
+#X obj 546 307 f \$1;
+#X text 585 306 voice number;
+#X obj 442 391 append trace-template x voiceno;
+#X obj 516 278 t f b;
+#X connect 0 0 2 1;
+#X connect 1 0 2 2;
+#X connect 3 0 4 1;
+#X connect 4 0 5 0;
+#X connect 4 0 11 0;
+#X connect 5 0 2 0;
+#X connect 6 0 63 0;
+#X connect 6 0 41 1;
+#X connect 7 0 58 0;
+#X connect 8 0 57 0;
+#X connect 9 0 10 0;
+#X connect 10 0 8 0;
+#X connect 11 0 30 1;
+#X connect 12 0 54 0;
+#X connect 13 0 9 0;
+#X connect 14 0 66 1;
+#X connect 15 0 39 1;
+#X connect 15 0 40 1;
+#X connect 15 0 8 1;
+#X connect 16 0 28 1;
+#X connect 17 0 29 1;
+#X connect 18 0 48 1;
+#X connect 20 0 23 0;
+#X connect 21 0 22 0;
+#X connect 22 0 30 0;
+#X connect 22 1 29 0;
+#X connect 23 0 24 0;
+#X connect 24 0 25 0;
+#X connect 25 0 27 0;
+#X connect 26 0 25 1;
+#X connect 27 0 36 0;
+#X connect 28 0 50 0;
+#X connect 28 0 11 0;
+#X connect 29 0 23 1;
+#X connect 30 0 20 0;
+#X connect 32 0 40 0;
+#X connect 33 1 34 0;
+#X connect 34 0 15 0;
+#X connect 35 0 15 0;
+#X connect 36 0 35 0;
+#X connect 36 0 52 0;
+#X connect 36 1 41 0;
+#X connect 37 0 38 0;
+#X connect 38 0 15 0;
+#X connect 39 0 21 0;
+#X connect 40 0 33 0;
+#X connect 41 0 49 0;
+#X connect 43 0 47 0;
+#X connect 44 0 45 0;
+#X connect 46 0 48 2;
+#X connect 47 0 46 0;
+#X connect 47 1 44 0;
+#X connect 49 0 28 0;
+#X connect 49 1 43 0;
+#X connect 49 2 45 1;
+#X connect 49 2 46 1;
+#X connect 50 0 48 0;
+#X connect 52 0 51 0;
+#X connect 53 0 54 1;
+#X connect 54 0 55 0;
+#X connect 55 0 39 0;
+#X connect 56 0 9 1;
+#X connect 57 0 66 0;
+#X connect 57 0 67 0;
+#X connect 62 0 71 2;
+#X connect 63 0 4 0;
+#X connect 63 0 7 0;
+#X connect 63 1 64 0;
+#X connect 63 2 1 1;
+#X connect 63 2 61 0;
+#X connect 64 0 1 0;
+#X connect 65 0 72 0;
+#X connect 66 0 65 0;
+#X connect 67 0 15 0;
+#X connect 69 0 71 1;
+#X connect 71 0 6 0;
+#X connect 72 0 71 0;
+#X connect 72 1 69 0;
diff --git a/desiredata/doc/4.data.structures/beat-maker.pd b/desiredata/doc/4.data.structures/beat-maker.pd
new file mode 100644
index 00000000..014ae0ac
--- /dev/null
+++ b/desiredata/doc/4.data.structures/beat-maker.pd
@@ -0,0 +1,44 @@
+#N canvas 432 246 737 444 10;
+#X obj 114 109 until;
+#X obj 116 84 t b b;
+#X obj 116 147 f;
+#X msg 160 85 0;
+#X obj 179 137 + 1;
+#X obj 115 63 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 118 180 t f f;
+#X obj 115 38 inlet;
+#X obj 232 214 pack 0 \$2;
+#X obj 191 289 expr 1 + (($f1 % $f2) == 0);
+#X obj 115 314 pack 0 \$3 0;
+#X msg 115 337 \; add-rect \$1 \$2 \$3 10;
+#X obj 117 216 pack 0 \$1 \$2;
+#X obj 294 43 loadbang;
+#X obj 295 67 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 179 164 sel;
+#X floatatom 295 117 5 0 0 0 - - -;
+#X obj 296 89 expr \$1 * \$2 + 1;
+#X obj 117 259 expr 40 + 100 * $f1/$f2;
+#X connect 0 0 2 0;
+#X connect 1 0 0 0;
+#X connect 1 1 3 0;
+#X connect 2 0 4 0;
+#X connect 2 0 6 0;
+#X connect 3 0 2 1;
+#X connect 4 0 2 1;
+#X connect 4 0 15 0;
+#X connect 5 0 1 0;
+#X connect 6 0 12 0;
+#X connect 6 1 8 0;
+#X connect 7 0 5 0;
+#X connect 8 0 9 0;
+#X connect 9 0 10 2;
+#X connect 10 0 11 0;
+#X connect 12 0 18 0;
+#X connect 13 0 14 0;
+#X connect 14 0 17 0;
+#X connect 15 0 0 1;
+#X connect 17 0 15 1;
+#X connect 17 0 16 0;
+#X connect 18 0 10 0;
diff --git a/desiredata/doc/4.data.structures/data-array.pd b/desiredata/doc/4.data.structures/data-array.pd
new file mode 100644
index 00000000..25cb1ec8
--- /dev/null
+++ b/desiredata/doc/4.data.structures/data-array.pd
@@ -0,0 +1,64 @@
+#N canvas 230 71 587 465 12;
+#X floatatom 179 207 0 0 0;
+#X obj 53 199 f;
+#X obj 89 194 + 1;
+#X obj 53 232 sel;
+#X msg 69 165 1;
+#X msg 285 213 0;
+#X obj 418 342 *;
+#X obj 418 392 del;
+#X obj 414 292 t f f;
+#X obj 418 322 -;
+#X msg 469 304 0;
+#X obj 449 346 r delay-multiplier;
+#X obj 432 369 r reset-stop;
+#X obj 238 110 inlet;
+#X obj 179 184 getsize \$1 \$2;
+#X obj 285 233 element \$1 \$2;
+#X obj 187 234 element \$1 \$2;
+#X obj 208 408 outlet;
+#X obj 349 408 outlet;
+#X obj 187 254 get \$3 y w x;
+#X obj 285 253 get \$3 y w;
+#X obj 265 408 outlet;
+#X obj 342 302 t f b;
+#X obj 372 326 0;
+#X obj 238 130 t b b p b;
+#X text 229 93 pointer in;
+#X text 20 12 This is an abstraction used in the sequencer example. Here we take a pointer and sequence an array belonging to it \, either the amplitude or the frequency \, depending on the value of argument 2 The template of the scalar is given by argument 1 and that of the array elements by argument 3;
+#X text 90 431 Outlets: new y value \, new w value \, time to ramp to new values.;
+#X connect 1 0 2 0;
+#X connect 1 0 3 0;
+#X connect 2 0 1 1;
+#X connect 3 1 16 0;
+#X connect 4 0 1 1;
+#X connect 5 0 15 0;
+#X connect 6 0 7 0;
+#X connect 6 0 18 0;
+#X connect 7 0 1 0;
+#X connect 8 0 9 1;
+#X connect 8 1 9 0;
+#X connect 9 0 6 0;
+#X connect 10 0 9 1;
+#X connect 11 0 6 1;
+#X connect 12 0 7 0;
+#X connect 13 0 24 0;
+#X connect 14 0 0 0;
+#X connect 14 0 3 1;
+#X connect 15 0 20 0;
+#X connect 16 0 19 0;
+#X connect 19 0 17 0;
+#X connect 19 1 21 0;
+#X connect 19 2 8 0;
+#X connect 20 0 17 0;
+#X connect 20 1 22 0;
+#X connect 22 0 21 0;
+#X connect 22 1 23 0;
+#X connect 23 0 18 0;
+#X connect 24 0 1 0;
+#X connect 24 1 5 0;
+#X connect 24 2 15 1;
+#X connect 24 2 14 0;
+#X connect 24 2 16 1;
+#X connect 24 3 4 0;
+#X connect 24 3 10 0;
diff --git a/desiredata/doc/4.data.structures/data-start.pd b/desiredata/doc/4.data.structures/data-start.pd
new file mode 100644
index 00000000..b0522fbf
--- /dev/null
+++ b/desiredata/doc/4.data.structures/data-start.pd
@@ -0,0 +1,40 @@
+#N canvas 404 0 597 385 12;
+#X obj 248 142 inlet;
+#X obj 295 250 *;
+#X obj 165 262 del;
+#X obj 130 141 r reset-stop;
+#X obj 195 339 outlet;
+#X obj 375 172 outlet;
+#X obj 310 145 get \$1 x y;
+#X obj 195 312 pointer;
+#X text 46 101 outlets: pointer (delayed) \, y-value.;
+#X obj 248 167 t b p;
+#X obj 165 288 t b b;
+#X obj 335 224 r time-of-last-evt;
+#X obj 295 223 -;
+#X obj 310 167 t f f;
+#X obj 97 339 s next-evt;
+#X obj 335 201 s time-of-last-evt;
+#X obj 329 251 r delay-multiplier;
+#X text 49 10 This is an abstraction used by the sequencer example.
+;
+#X text 46 45 Here we carry out the actual sequencing. Argument is
+template of the scalar. Note the sends and receives which must agree
+with the rest of the patch.;
+#X connect 0 0 9 0;
+#X connect 1 0 2 1;
+#X connect 2 0 10 0;
+#X connect 3 0 2 0;
+#X connect 6 0 13 0;
+#X connect 6 1 5 0;
+#X connect 7 0 4 0;
+#X connect 9 0 2 0;
+#X connect 9 1 7 1;
+#X connect 9 1 6 0;
+#X connect 10 0 14 0;
+#X connect 10 1 7 0;
+#X connect 11 0 12 1;
+#X connect 12 0 1 0;
+#X connect 13 0 15 0;
+#X connect 13 1 12 0;
+#X connect 16 0 1 1;
diff --git a/desiredata/doc/4.data.structures/file.txt b/desiredata/doc/4.data.structures/file.txt
new file mode 100644
index 00000000..62b6a167
--- /dev/null
+++ b/desiredata/doc/4.data.structures/file.txt
@@ -0,0 +1,39 @@
+data;
+template template-toplevel;
+float x;
+float y;
+float z;
+float q;
+array bazoo template-element;
+;
+template template-element;
+float x;
+float y;
+float w;
+;
+;
+template-toplevel 76 177 -66 85;
+0 0 0;
+30 0 0;
+0 111 8;
+-47 22 0;
+0 0 0;
+0 70 0;
+0 70 70;
+70 70 0;
+0 70 0;
+;
+template-toplevel 196 109 77 802;
+-20 77 0;
+0 0 4;
+67 59 0;
+0 76 12;
+-45 -68 0;
+;
+template-toplevel 150 250 20 80;
+0 0 0;
+40 0 4;
+60 50 0;
+100 30 3;
+200 0 0;
+;
diff --git a/desiredata/doc/4.data.structures/osc-voice.pd b/desiredata/doc/4.data.structures/osc-voice.pd
new file mode 100644
index 00000000..02a8bde5
--- /dev/null
+++ b/desiredata/doc/4.data.structures/osc-voice.pd
@@ -0,0 +1,54 @@
+#N canvas 230 103 972 643 10;
+#X obj 261 279 element trace-template bazoo;
+#X floatatom 320 207 0;
+#X obj 297 163 getsize trace-template bazoo;
+#X obj 429 466 line~;
+#X obj 276 49 inlet;
+#X obj 424 357 dbtorms;
+#X obj 264 396 mtof;
+#X obj 264 476 phasor~;
+#X obj 258 513 cos~;
+#X obj 265 547 *~;
+#X obj 265 587 throw~ osc-sum;
+#X obj 185 163 f;
+#X obj 245 167 + 1;
+#X obj 262 240 moses;
+#X obj 261 319 get point-template y amp;
+#X obj 426 401 pack 0 30;
+#X msg 356 432 0 30;
+#X obj 276 89 t b p;
+#X msg 225 120 0;
+#X obj 96 60 r osc-tick;
+#X obj 264 356 * -0.25;
+#X obj 81 307 print no;
+#X obj 264 436 sig~;
+#X msg 609 357 0;
+#X obj 616 326 r osc-stop;
+#X connect 0 0 14 0;
+#X connect 1 0 13 1;
+#X connect 2 0 1 0;
+#X connect 3 0 9 1;
+#X connect 4 0 17 0;
+#X connect 5 0 15 0;
+#X connect 6 0 22 0;
+#X connect 7 0 8 0;
+#X connect 8 0 9 0;
+#X connect 9 0 10 0;
+#X connect 11 0 12 0;
+#X connect 11 0 13 0;
+#X connect 12 0 11 1;
+#X connect 13 0 0 0;
+#X connect 13 1 16 0;
+#X connect 14 0 20 0;
+#X connect 14 1 5 0;
+#X connect 15 0 3 0;
+#X connect 16 0 3 0;
+#X connect 17 0 18 0;
+#X connect 17 1 0 1;
+#X connect 17 1 2 0;
+#X connect 18 0 11 1;
+#X connect 19 0 11 0;
+#X connect 20 0 6 0;
+#X connect 22 0 7 0;
+#X connect 23 0 15 0;
+#X connect 24 0 23 0;
diff --git a/desiredata/doc/4.data.structures/output~.pd b/desiredata/doc/4.data.structures/output~.pd
new file mode 100644
index 00000000..07fb59f8
--- /dev/null
+++ b/desiredata/doc/4.data.structures/output~.pd
@@ -0,0 +1,66 @@
+#N canvas 0 0 757 616 12;
+#X obj 516 522 t b;
+#X obj 516 469 f;
+#X obj 516 547 f;
+#X msg 630 546 0;
+#X obj 516 499 moses 1;
+#X obj 630 518 t b f;
+#X obj 596 479 moses 1;
+#X obj 29 97 dbtorms;
+#X obj 85 170 inlet~;
+#X msg 278 300 \; pd dsp 1;
+#X obj 29 170 line~;
+#X obj 64 242 *~;
+#X obj 64 272 dac~;
+#X obj 29 127 pack 0 50;
+#X text 121 146 audio in;
+#X text 301 496 test if less than 1 -->;
+#X text 267 523 if true convert to bang -->;
+#X text 100 96 <-- convert from dB to linear units;
+#X floatatom 278 221 3 0 100 0 dB - -;
+#X obj 516 449 bng 15 250 50 0 empty empty mute -38 7 0 12 -262144
+-1 -1;
+#X text 118 126 <-- make a ramp to avoid clicks or zipper noise;
+#X obj 148 170 inlet~;
+#X obj 154 241 *~;
+#X text 502 399 MUTE logic:;
+#X obj 278 193 r \$0-master-lvl;
+#X obj 516 573 s \$0-master-lvl;
+#X obj 293 247 s \$0-master-out;
+#X obj 29 71 r \$0-master-out;
+#X obj 596 450 r \$0-master-out;
+#X text 60 10 Level control abstraction \, used in many of the Pd example
+patches. The "level" and "mute" controls show up on the parent \, calling
+patch.;
+#X text 229 549 previous nonzero master-lvl -->;
+#X text 301 453 recall previous;
+#X text 301 471 value of master-lvl -->;
+#X text 16 310 automatically start DSP -->;
+#X obj 85 192 hip~ 3;
+#X obj 147 192 hip~ 3;
+#X connect 0 0 2 0;
+#X connect 1 0 4 0;
+#X connect 2 0 25 0;
+#X connect 3 0 25 0;
+#X connect 4 0 0 0;
+#X connect 4 1 5 0;
+#X connect 5 0 3 0;
+#X connect 6 1 2 1;
+#X connect 7 0 13 0;
+#X connect 8 0 34 0;
+#X connect 10 0 22 0;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 13 0 10 0;
+#X connect 18 0 9 0;
+#X connect 18 0 26 0;
+#X connect 19 0 1 0;
+#X connect 21 0 35 0;
+#X connect 22 0 12 1;
+#X connect 24 0 18 0;
+#X connect 27 0 7 0;
+#X connect 28 0 1 1;
+#X connect 28 0 6 0;
+#X connect 34 0 11 1;
+#X connect 35 0 22 1;
+#X coords 0 0 1 1 65 55 1;
diff --git a/desiredata/doc/4.data.structures/voice.pd b/desiredata/doc/4.data.structures/voice.pd
new file mode 100644
index 00000000..20f2856d
--- /dev/null
+++ b/desiredata/doc/4.data.structures/voice.pd
@@ -0,0 +1,119 @@
+#N canvas 0 34 918 591 12;
+#X obj 180 96 inlet;
+#X obj 169 288 pack;
+#X obj 169 395 line~;
+#X obj 169 262 sqrt;
+#X obj 169 480 *~;
+#X obj 169 419 *~;
+#X obj 169 443 *~;
+#X obj 92 478 inlet~;
+#X obj 92 526 outlet~;
+#X obj 92 502 +~;
+#X obj 434 411 line~;
+#X obj 434 435 *~;
+#X obj 434 459 *~;
+#X obj 434 283 mtof;
+#X obj 405 187 +;
+#X obj 434 307 sqrt;
+#X obj 434 331 sqrt;
+#X obj 434 387 pack;
+#X obj 189 343 r reset;
+#X msg 189 367 0 20;
+#X obj 180 120 data-start template-toplevel;
+#X obj 6 150 data-array template-toplevel amp template-amp;
+#X obj 433 148 data-array template-toplevel pitch template-pitch;
+#X obj 308 437 noise~;
+#X obj 485 259 +;
+#X obj 485 282 mtof;
+#X obj 485 306 sqrt;
+#X obj 485 330 sqrt;
+#X obj 485 411 line~;
+#X obj 485 435 *~;
+#X obj 485 459 *~;
+#X obj 485 387 pack;
+#X obj 384 411 line~;
+#X obj 384 435 *~;
+#X obj 384 459 *~;
+#X obj 384 387 pack;
+#X obj 384 284 mtof;
+#X obj 384 308 sqrt;
+#X obj 384 332 sqrt;
+#X obj 384 262 -;
+#X obj 240 520 vcf~ 10;
+#X obj 315 520 vcf~ 10;
+#X obj 390 516 vcf~ 10;
+#X text 13 7 This is an abstraction used in the sequencer example.
+Here we take care of the audio synthesis \, according to timed controls
+from the the "data-start" and "data-array" subpatches.;
+#X text 521 459 calculate time-varying center frequencies;
+#X text 470 512 ... for three VCFs acting on a noise source.;
+#X text 85 394 Amplitude;
+#X text 86 410 envelope;
+#X text 94 549 summing bus;
+#X text 346 62 Pitch is in eighth-tones (because 4 pixels per half
+tone looks reasonable on the screen.) Hence the * 0.25 objects below.
+;
+#X obj 169 235 / 2;
+#X connect 0 0 20 0;
+#X connect 1 0 2 0;
+#X connect 2 0 5 0;
+#X connect 2 0 5 1;
+#X connect 3 0 1 0;
+#X connect 4 0 9 1;
+#X connect 5 0 6 0;
+#X connect 5 0 6 1;
+#X connect 6 0 4 0;
+#X connect 7 0 9 0;
+#X connect 9 0 8 0;
+#X connect 10 0 11 0;
+#X connect 10 0 11 1;
+#X connect 11 0 12 0;
+#X connect 11 0 12 1;
+#X connect 12 0 41 1;
+#X connect 13 0 15 0;
+#X connect 14 0 39 0;
+#X connect 14 0 13 0;
+#X connect 14 0 24 0;
+#X connect 15 0 16 0;
+#X connect 16 0 17 0;
+#X connect 17 0 10 0;
+#X connect 18 0 19 0;
+#X connect 19 0 2 0;
+#X connect 20 0 21 0;
+#X connect 20 0 22 0;
+#X connect 20 1 14 1;
+#X connect 21 1 50 0;
+#X connect 21 2 1 1;
+#X connect 22 0 14 0;
+#X connect 22 1 39 1;
+#X connect 22 1 24 1;
+#X connect 22 2 17 1;
+#X connect 22 2 35 1;
+#X connect 22 2 31 1;
+#X connect 23 0 40 0;
+#X connect 23 0 41 0;
+#X connect 23 0 42 0;
+#X connect 24 0 25 0;
+#X connect 25 0 26 0;
+#X connect 26 0 27 0;
+#X connect 27 0 31 0;
+#X connect 28 0 29 0;
+#X connect 28 0 29 1;
+#X connect 29 0 30 0;
+#X connect 29 0 30 1;
+#X connect 30 0 42 1;
+#X connect 31 0 28 0;
+#X connect 32 0 33 0;
+#X connect 32 0 33 1;
+#X connect 33 0 34 0;
+#X connect 33 0 34 1;
+#X connect 34 0 40 1;
+#X connect 35 0 32 0;
+#X connect 36 0 37 0;
+#X connect 37 0 38 0;
+#X connect 38 0 35 0;
+#X connect 39 0 36 0;
+#X connect 40 0 4 1;
+#X connect 41 0 4 1;
+#X connect 42 0 4 1;
+#X connect 50 0 3 0;
diff --git a/desiredata/doc/4.data.structures/z.txt b/desiredata/doc/4.data.structures/z.txt
new file mode 100644
index 00000000..6cdd0a4a
--- /dev/null
+++ b/desiredata/doc/4.data.structures/z.txt
@@ -0,0 +1,64 @@
+data;
+template template5;
+float x;
+float y;
+float z;
+float q;
+array bazoo template5-element;
+;
+template template5-element;
+float y;
+;
+;
+template5 50 150 30 9;
+0;
+0;
+0;
+0;
+0;
+3;
+0;
+0;
+0;
+7;
+-30;
+0;
+0;
+0;
+0;
+0;
+-4;
+-18;
+-26;
+-36;
+-46;
+-62;
+-74;
+-78;
+-70;
+-62;
+-52;
+-40;
+-30;
+-20;
+-4;
+1;
+7;
+11;
+13;
+0;
+0;
+0;
+0;
+0;
+0;
+0;
+0;
+0;
+0;
+43;
+0;
+0;
+0;
+0;
+;