~ubuntu-branches/ubuntu/precise/puredata/precise

« back to all changes in this revision

Viewing changes to doc/2.control.examples/22.random-walk.pd

  • Committer: Bazaar Package Importer
  • Author(s): Paul Brossier
  • Date: 2009-12-22 21:29:31 UTC
  • mfrom: (1.2.6 upstream) (4.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091222212931-nhwkzapjwsmjao1l
Tags: 0.42.5-3
* debian/control:
  - add community site to homepage field
  - improve long description
  - remove Replaces and Conflicts fields
  - add Suggests on pd-csound, pd-pdp, pd-zexy, pd-aubio
* debian/rules: add per-arch configuration flags
* debian/patches/02_kfreebsd.diff:
  - also define pd_tilde_dllextent on FreeBSD
  - fix typo (really closing #414414 this time)
  - also add hurd glue
* debian/patches/04_hurd.diff:
  - add hurd glue and s_midi_dummy.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#N canvas 0 0 604 511 12;
 
2
#X floatatom 113 218 5 0 0 0 - - -;
 
3
#X obj 123 113 f;
 
4
#X obj 104 198 random 4;
 
5
#X obj 26 197 random 2;
 
6
#X floatatom 35 219 5 0 0 0 - - -;
 
7
#X obj 123 138 t b b f;
 
8
#X obj 26 253 sel 0 1;
 
9
#X obj 159 328 +;
 
10
#X obj 123 87 metro 100;
 
11
#X obj 123 65 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
 
12
;
 
13
#X obj 104 252 + 1;
 
14
#X floatatom 242 153 5 0 0 0 - - -;
 
15
#X obj 82 309 *;
 
16
#X msg 26 282 -1;
 
17
#X obj 242 83 moses 0;
 
18
#X obj 316 83 moses 100;
 
19
#X obj 242 107 * -1;
 
20
#X obj 407 86 * -1;
 
21
#X obj 407 111 + 200;
 
22
#X msg 60 282 1;
 
23
#X text 39 9 Random walk generator;
 
24
#X text 143 64 on/off;
 
25
#X text 298 152 output;
 
26
#X text 22 375 A random walk is a special case of a Markov chain \,
 
27
in which the states are integers and the transitions add or subtract
 
28
a small amount from the previous state to get a new one. Here the "f"
 
29
holds the state. When it gets a bang \, the previous state is added
 
30
to a random number (from 1 to 4) multiplied by a random sign (-1 or
 
31
1). The new value is then coerced into the range from 0 to 100;
 
32
#X text 35 235 sign;
 
33
#X text 113 234 magnitude;
 
34
#X text 203 313 add prev value;
 
35
#X text 200 330 to random increment;
 
36
#X text 256 30 coercion to range 0-100 \; if out of range \, reflect
 
37
;
 
38
#X text 255 60 us back in.;
 
39
#X text 323 492 updated for Pd version 0.37-1;
 
40
#X connect 1 0 5 0;
 
41
#X connect 2 0 0 0;
 
42
#X connect 2 0 10 0;
 
43
#X connect 3 0 4 0;
 
44
#X connect 3 0 6 0;
 
45
#X connect 5 0 3 0;
 
46
#X connect 5 1 2 0;
 
47
#X connect 5 2 7 1;
 
48
#X connect 6 0 13 0;
 
49
#X connect 6 1 19 0;
 
50
#X connect 7 0 14 0;
 
51
#X connect 8 0 1 0;
 
52
#X connect 9 0 8 0;
 
53
#X connect 10 0 12 1;
 
54
#X connect 11 0 1 1;
 
55
#X connect 12 0 7 0;
 
56
#X connect 13 0 12 0;
 
57
#X connect 14 0 16 0;
 
58
#X connect 14 1 15 0;
 
59
#X connect 15 0 11 0;
 
60
#X connect 15 1 17 0;
 
61
#X connect 16 0 11 0;
 
62
#X connect 17 0 18 0;
 
63
#X connect 18 0 11 0;
 
64
#X connect 19 0 12 0;