aboutsummaryrefslogtreecommitdiff
path: root/pd/doc/2.control.examples
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2004-02-02 11:28:02 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2004-02-02 11:28:02 +0000
commitae6b5d89ea93b95c2990895077cf5e8f0bba9ad9 (patch)
tree1e7570f11ac688e94342968e90301c4684e61193 /pd/doc/2.control.examples
parentf26399eba6ee6ce9eb7bae9a4b60a90dc2ebca94 (diff)
This commit was generated by cvs2svn to compensate for changes in r1301,
which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=1302
Diffstat (limited to 'pd/doc/2.control.examples')
-rw-r--r--pd/doc/2.control.examples/22.random-walk.pd64
-rw-r--r--pd/doc/2.control.examples/23.sequencing.pd28
2 files changed, 92 insertions, 0 deletions
diff --git a/pd/doc/2.control.examples/22.random-walk.pd b/pd/doc/2.control.examples/22.random-walk.pd
new file mode 100644
index 00000000..21483bdb
--- /dev/null
+++ b/pd/doc/2.control.examples/22.random-walk.pd
@@ -0,0 +1,64 @@
+#N canvas 0 0 604 511 12;
+#X floatatom 113 218 5 0 0 0 - - -;
+#X obj 123 113 f;
+#X obj 104 198 random 4;
+#X obj 26 197 random 2;
+#X floatatom 35 219 5 0 0 0 - - -;
+#X obj 123 138 t b b f;
+#X obj 26 253 sel 0 1;
+#X obj 159 328 +;
+#X obj 123 87 metro 100;
+#X obj 123 65 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
+;
+#X obj 104 252 + 1;
+#X floatatom 242 153 5 0 0 0 - - -;
+#X obj 82 309 *;
+#X msg 26 282 -1;
+#X obj 242 83 moses 0;
+#X obj 316 83 moses 100;
+#X obj 242 107 * -1;
+#X obj 407 86 * -1;
+#X obj 407 111 + 200;
+#X msg 60 282 1;
+#X text 39 9 Random walk generator;
+#X text 143 64 on/off;
+#X text 298 152 output;
+#X text 22 375 A random walk is a special case of a Markov chain \,
+in which the states are integers and the transitions add or subtract
+a small amount from the previous state to get a new one. Here the "f"
+holds the state. When it gets a bang \, the previous state is added
+to a random number (from 1 to 4) multiplied by a random sign (-1 or
+1). The new value is then coerced into the range from 0 to 100;
+#X text 35 235 sign;
+#X text 113 234 magnitude;
+#X text 203 313 add prev value;
+#X text 200 330 to random increment;
+#X text 256 30 coercion to range 0-100 \; if out of range \, reflect
+;
+#X text 255 60 us back in.;
+#X text 323 492 updated for Pd version 0.37-1;
+#X connect 1 0 5 0;
+#X connect 2 0 0 0;
+#X connect 2 0 10 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 2 0;
+#X connect 5 2 7 1;
+#X connect 6 0 13 0;
+#X connect 6 1 19 0;
+#X connect 7 0 14 0;
+#X connect 8 0 1 0;
+#X connect 9 0 8 0;
+#X connect 10 0 12 1;
+#X connect 11 0 1 1;
+#X connect 12 0 7 0;
+#X connect 13 0 12 0;
+#X connect 14 0 16 0;
+#X connect 14 1 15 0;
+#X connect 15 0 11 0;
+#X connect 15 1 17 0;
+#X connect 16 0 11 0;
+#X connect 17 0 18 0;
+#X connect 18 0 11 0;
+#X connect 19 0 12 0;
diff --git a/pd/doc/2.control.examples/23.sequencing.pd b/pd/doc/2.control.examples/23.sequencing.pd
new file mode 100644
index 00000000..1aa19942
--- /dev/null
+++ b/pd/doc/2.control.examples/23.sequencing.pd
@@ -0,0 +1,28 @@
+#N canvas 47 52 758 482 12;
+#X text 465 442 updated for Pd version 0.26;
+#X text 35 28 You can use "qlist" or "textfile" objects for sequencing.
+Qlist is simpler to use than the (more versatile) textfile.;
+#X obj 345 144 r receive1;
+#X obj 441 146 r receive2;
+#X msg 205 88 clear \, add receive1 1 \, add 1000 receive1 0 \, add
+receive2 2 \, add 1000 receive2 0 \, add receive1 3 \, bang;
+#X obj 205 129 qlist;
+#X floatatom 345 170 0 0 0 0 - - -;
+#X floatatom 441 171 0 0 0 0 - - -;
+#X text 48 202 The "add" messages add lines to the qlist \, so that
+it contains:;
+#X text 155 238 receive1 1;
+#X text 154 259 1000 receive1 0;
+#X text 155 279 receive2 2;
+#X text 153 299 1000 receive2 0;
+#X text 155 317 receive1 3;
+#X text 16 391 If you have more than 5 lines or so wou will probably
+want to store them as a separate file and have qlist read it. You can
+also write files \, set tempo \, and single step... see the help patch
+for details.;
+#X text 22 341 and the "bang" instructs qlist to play the sequence
+by sending messages to "receive" objects. Messages starting with numbers
+request that amount of delay.;
+#X connect 2 0 6 0;
+#X connect 3 0 7 0;
+#X connect 4 0 5 0;