aboutsummaryrefslogtreecommitdiff
path: root/examples/ann_mlp_example2/example2.pd
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ann_mlp_example2/example2.pd')
-rwxr-xr-xexamples/ann_mlp_example2/example2.pd911
1 files changed, 911 insertions, 0 deletions
diff --git a/examples/ann_mlp_example2/example2.pd b/examples/ann_mlp_example2/example2.pd
new file mode 100755
index 0000000..9cd588e
--- /dev/null
+++ b/examples/ann_mlp_example2/example2.pd
@@ -0,0 +1,911 @@
+#N canvas 519 124 536 237 10;
+#N canvas 103 30 712 583 guts 0;
+#X obj 18 181 t b b;
+#X obj 17 41 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X msg 89 147 0 \, destroy;
+#X obj 111 177 gemwin;
+#X msg 94 124 reset \, create \, 1;
+#X obj 18 390 s masse;
+#X obj 266 150 s reset_masse;
+#X msg 266 128 bang;
+#X text 359 281 <- right border;
+#X text 360 303 <- left border;
+#X text 360 325 <- top border;
+#X text 360 347 <- bottom border;
+#N canvas 116 11 813 636 pool 0;
+#N canvas 0 0 819 344 fattori 0;
+#N canvas 0 0 450 300 graph3 0;
+#X array armoniche_caso 100 float 1;
+#A 0 1.06332 1.06332 1.06332 1.38999 1.55333 1.55333 1.55333 1.55333
+1.55333 1.55333 1.55333 1.71666 1.87999 2.04333 2.04333 2.20666 2.20666
+2.20666 2.37 2.53333 2.53333 2.53333 2.69667 2.69667 2.69667 2.69667
+2.69667 2.69667 2.69667 3.18667 3.18667 3.18667 3.18667 3.35 3.35 3.51334
+3.84001 3.84001 4.00334 4.16668 4.16668 4.16668 4.16668 4.49334 4.65668
+4.82001 5.31002 5.47335 5.80002 6.12669 6.61669 6.94336 7.27003 7.43336
+7.92337 8.25003 8.5767 8.90337 9.23004 9.72004 10.3734 10.7 11.0267
+11.19 11.5167 12.0067 12.4967 13.3134 13.64 13.9667 14.2934 14.9467
+16.2534 16.5801 16.7434 17.2334 17.8867 19.0301 19.8467 20.9901 21.6434
+22.1334 22.7867 23.1134 23.7667 24.2568 24.5834 24.9101 27.3601 28.3401
+29.3201 30.3001 31.4435 32.5868 33.5668 34.5468 36.0168 37.8135 39.7735
+50.7169;
+#X coords 0 50 99 1 300 300 1;
+#X restore 43 13 graph;
+#X msg 434 69 \; armoniche_caso const 1;
+#X restore 37 37 pd fattori caso;
+#X text 34 19 weightened random values;
+#X text 32 8 which harmonic am I?;
+#X text 236 34 20 cellule;
+#X obj 49 82 cellulaSuono 1;
+#X obj 48 102 cellulaSuono 2;
+#X obj 44 125 cellulaSuono 3;
+#X obj 143 86 cellulaSuono 4;
+#X obj 140 104 cellulaSuono 5;
+#X obj 146 126 cellulaSuono 6;
+#X restore 398 132 pd pool;
+#N canvas 860 482 327 421 creation 0;
+#X obj 43 319 s pd-new;
+#X msg 86 95 \; pd filename new ./ \; #N canvas \; #X pop 1 \;;
+#X msg 43 289 menuclose;
+#X obj 76 238 pack f f f;
+#X obj 43 47 sel 0 1;
+#X obj 43 29 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 61 72 t b b;
+#X obj 76 187 t f f f;
+#X obj 103 211 * 10;
+#X obj 76 211 * 10;
+#X obj 61 163 ch_uzi 30;
+#X msg 76 265 obj \$1 \$2 cellulaSuono \$3;
+#X connect 2 0 0 0;
+#X connect 3 0 11 0;
+#X connect 4 0 2 0;
+#X connect 4 1 6 0;
+#X connect 5 0 4 0;
+#X connect 6 0 10 0;
+#X connect 6 1 1 0;
+#X connect 7 0 9 0;
+#X connect 7 1 8 0;
+#X connect 7 2 3 2;
+#X connect 8 0 3 1;
+#X connect 9 0 3 0;
+#X connect 10 1 7 0;
+#X connect 11 0 0 0;
+#X restore 398 158 pd creation pool;
+#X obj 61 214 s link;
+#X text 39 39 <- begin (change the metro speed for slow computer);
+#X floatatom 38 132 5 0 0 0 - - -;
+#X text 359 257 <- give random speed and ambient viscosity;
+#X obj 449 446 gemhead;
+#X obj 449 467 translateXYZ;
+#X msg 166 417 setX \$1;
+#X msg 251 418 setY \$1;
+#X obj 520 399 * -1;
+#X obj 449 487 color 0.5 0 0;
+#X obj 501 347 gemmouse 8 8;
+#X obj 481 390 - 4;
+#X obj 523 380 - 4;
+#X obj 90 473 iCircle2D masse 0 0 0.1 8 0 0 -0.0003;
+#X obj 53 280 iLine2D masse 3.5 -3.5 3.5 3.5 1000 0 0 2 1;
+#X obj 63 305 iLine2D masse -3.5 3.5 -3.5 -3.5 1000 0 0 2 1;
+#X obj 78 328 iLine2D masse 3.5 3.5 -3.5 3.5 1000 0 0 2 1;
+#X obj 89 351 iLine2D masse -3.5 -3.5 3.5 -3.5 1000 0 0 2 1;
+#X obj 449 507 sphere 0.6;
+#X obj 18 154 metro 15;
+#N canvas 0 0 555 394 osc 0;
+#X obj 139 70 dumpOSC 10001;
+#X obj 182 106 unpack s f;
+#X msg 179 155 \; \$1 \$2;
+#X obj 180 131 pack s f;
+#X obj 263 113 r x;
+#X obj 337 118 r y;
+#X obj 258 210 s c_x;
+#X obj 354 214 s c_y;
+#X obj 348 151 / 25;
+#X obj 264 151 / 40;
+#X obj 260 176 clip 0 8;
+#X obj 348 182 clip 0 8;
+#X text 128 29 here is where I connect to EyesWeb to move the main
+cell with a webcam following my hand;
+#X connect 0 0 1 0;
+#X connect 1 0 3 0;
+#X connect 1 1 3 1;
+#X connect 3 0 2 0;
+#X connect 4 0 9 0;
+#X connect 5 0 8 0;
+#X connect 8 0 11 0;
+#X connect 9 0 10 0;
+#X connect 10 0 6 0;
+#X connect 11 0 7 0;
+#X restore 499 316 pd osc;
+#X obj 453 365 r c_x;
+#X obj 589 359 r c_y;
+#X msg 156 102 cursor 0;
+#X msg 126 66 bang;
+#X msg 166 150 lighting 1;
+#N canvas 450 44 494 396 sounds 0;
+#X obj 158 307 dac~;
+#X obj 76 66 catch~ mainL;
+#X obj 160 153 line;
+#X msg 159 131 \$1 10;
+#X obj 273 41 vsl 15 128 0 1 0 0 empty empty Volume 0 -8 0 8 -262144
+-1 -1 12700 1;
+#X obj 144 179 *~;
+#X obj 178 179 *~;
+#X obj 164 67 catch~ mainR;
+#X obj 304 42 loadbang;
+#X msg 304 62 1;
+#X obj 145 265 +~;
+#X obj 177 268 +~;
+#X obj 193 233 rev3~ 70 90 3000 20;
+#X connect 1 0 5 0;
+#X connect 2 0 5 1;
+#X connect 2 0 6 1;
+#X connect 3 0 2 0;
+#X connect 4 0 3 0;
+#X connect 5 0 10 0;
+#X connect 5 0 12 0;
+#X connect 6 0 11 0;
+#X connect 6 0 12 1;
+#X connect 7 0 6 0;
+#X connect 8 0 9 0;
+#X connect 9 0 4 0;
+#X connect 10 0 0 0;
+#X connect 11 0 0 1;
+#X connect 12 0 10 1;
+#X connect 12 1 11 1;
+#X restore 398 189 pd sounds;
+#X text 463 188 <-- here is the main volue control;
+#N canvas 463 128 573 394 lights 0;
+#X obj 242 277 world_light;
+#X obj 242 163 gemhead 1;
+#X obj 242 225 rotateXYZ;
+#X msg 109 193 debug 0;
+#X msg 110 224 debug 1;
+#X text 20 169 figure out where the light is;
+#X obj 311 47 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
+;
+#X obj 354 133 pack f f;
+#X obj 334 159 line;
+#X msg 364 42 1;
+#X obj 364 23 loadbang;
+#X obj 344 298 world_light;
+#X obj 346 271 gemhead 1;
+#X obj 429 203 loadbang;
+#X obj 311 63 metro 20000;
+#X msg 400 104 10000;
+#X obj 119 57 delay 10000;
+#X msg 339 96 300;
+#X msg 292 96 50;
+#X msg 364 235 1 1 1;
+#X msg 422 266 0.6 0.3 0;
+#X connect 1 0 2 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X connect 4 0 0 0;
+#X connect 6 0 14 0;
+#X connect 7 0 8 0;
+#X connect 8 0 2 2;
+#X connect 9 0 6 0;
+#X connect 10 0 9 0;
+#X connect 10 0 15 0;
+#X connect 12 0 11 0;
+#X connect 13 0 19 0;
+#X connect 13 0 20 0;
+#X connect 14 0 17 0;
+#X connect 14 0 16 0;
+#X connect 15 0 7 1;
+#X connect 16 0 18 0;
+#X connect 17 0 7 0;
+#X connect 18 0 7 0;
+#X connect 19 0 0 1;
+#X connect 20 0 11 1;
+#X restore 266 189 pd lights;
+#X text 337 49 example "stolen" from pmpd examples. move the main cell
+with your mouse (or via osc) every cell is a random harmonic of A (from
+1st to 50th) \, the velo of a cell is its volume also.;
+#X obj 405 432 s posx;
+#X obj 535 427 s posy;
+#X obj 43 260 iAmbient2D masse 0 0 0.01 0.01 0.4;
+#X obj 86 499 iCircle2D masse 0 0 0.1 0.7 0 0 4;
+#X obj 17 19 inlet;
+#X obj 85 19 inlet;
+#X connect 0 0 5 0;
+#X connect 0 1 14 0;
+#X connect 0 1 27 0;
+#X connect 0 1 28 0;
+#X connect 0 1 29 0;
+#X connect 0 1 30 0;
+#X connect 0 1 31 0;
+#X connect 0 1 46 0;
+#X connect 0 1 47 0;
+#X connect 1 0 33 0;
+#X connect 1 0 38 0;
+#X connect 2 0 3 0;
+#X connect 4 0 3 0;
+#X connect 7 0 6 0;
+#X connect 16 0 33 1;
+#X connect 18 0 19 0;
+#X connect 19 0 23 0;
+#X connect 20 0 27 0;
+#X connect 20 0 47 0;
+#X connect 21 0 27 0;
+#X connect 21 0 47 0;
+#X connect 22 0 21 0;
+#X connect 22 0 19 2;
+#X connect 22 0 45 0;
+#X connect 23 0 32 0;
+#X connect 24 0 25 0;
+#X connect 24 1 26 0;
+#X connect 25 0 20 0;
+#X connect 25 0 19 1;
+#X connect 25 0 44 0;
+#X connect 26 0 22 0;
+#X connect 33 0 0 0;
+#X connect 35 0 25 0;
+#X connect 36 0 26 0;
+#X connect 37 0 3 0;
+#X connect 38 0 4 0;
+#X connect 38 0 39 0;
+#X connect 38 0 37 0;
+#X connect 39 0 3 0;
+#X connect 48 0 1 0;
+#X connect 49 0 2 0;
+#X restore 18 68 pd guts;
+#X obj 17 18 tgl 15 0 empty empty rendering 0 -6 0 8 -262144 -1 -1
+0 1;
+#X obj 54 46 bng 15 250 50 0 empty empty destroy_gemwin 0 -6 0 8 -262144
+-1 -1;
+#N canvas 206 22 774 557 train 0;
+#X msg 66 15 create 20 4;
+#X obj 66 345 unpack f f f f;
+#X floatatom 45 391 5 0 0 0 - - -;
+#X floatatom 83 390 5 0 0 0 - - -;
+#X floatatom 120 392 5 0 0 0 - - -;
+#X floatatom 160 394 5 0 0 0 - - -;
+#X text 118 405 chaos;
+#N canvas 0 0 642 332 inputs 0;
+#X obj 122 244 outlet;
+#X obj 24 42 inlet;
+#X text 23 22 bang;
+#X obj 76 19 r 1-X;
+#X obj 111 19 r 1-Y;
+#X obj 145 19 r 1-Velo;
+#X obj 86 47 r 2-X;
+#X obj 121 47 r 2-Y;
+#X obj 155 47 r 2-Velo;
+#X obj 222 20 r 3-X;
+#X obj 257 21 r 3-Y;
+#X obj 291 21 r 3-Velo;
+#X obj 220 46 r 4-X;
+#X obj 255 46 r 4-Y;
+#X obj 289 46 r 4-Velo;
+#X obj 359 23 r 5-X;
+#X obj 394 23 r 5-Y;
+#X obj 428 23 r 5-Velo;
+#X obj 358 51 r 6-X;
+#X obj 393 51 r 6-Y;
+#X obj 427 51 r 6-Velo;
+#X obj 420 99 r posx;
+#X obj 464 99 r posy;
+#X obj 61 153 pack s f f f f f f f f f f f f f f f f f f f f;
+#X obj 127 175 unpack s f f f f f f f f f f f f f f f f f f f f;
+#X obj 127 213 pack f f f f f f f f f f f f f f f f f f f f;
+#X connect 1 0 23 0;
+#X connect 3 0 23 1;
+#X connect 4 0 23 2;
+#X connect 5 0 23 3;
+#X connect 6 0 23 4;
+#X connect 7 0 23 5;
+#X connect 8 0 23 6;
+#X connect 9 0 23 7;
+#X connect 10 0 23 8;
+#X connect 11 0 23 9;
+#X connect 12 0 23 10;
+#X connect 13 0 23 11;
+#X connect 14 0 23 12;
+#X connect 15 0 23 13;
+#X connect 16 0 23 14;
+#X connect 17 0 23 15;
+#X connect 18 0 23 16;
+#X connect 19 0 23 17;
+#X connect 20 0 23 18;
+#X connect 21 0 23 19;
+#X connect 22 0 23 20;
+#X connect 23 0 24 0;
+#X connect 24 1 25 0;
+#X connect 24 2 25 1;
+#X connect 24 3 25 2;
+#X connect 24 4 25 3;
+#X connect 24 5 25 4;
+#X connect 24 6 25 5;
+#X connect 24 7 25 6;
+#X connect 24 8 25 7;
+#X connect 24 9 25 8;
+#X connect 24 10 25 9;
+#X connect 24 11 25 10;
+#X connect 24 12 25 11;
+#X connect 24 13 25 12;
+#X connect 24 14 25 13;
+#X connect 24 15 25 14;
+#X connect 24 16 25 15;
+#X connect 24 17 25 16;
+#X connect 24 18 25 17;
+#X connect 24 19 25 18;
+#X connect 24 20 25 19;
+#X connect 25 0 0 0;
+#X restore 190 226 pd inputs;
+#X obj 190 206 metro 100;
+#X obj 190 187 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X text 161 408 calm & close;
+#X obj 42 421 vsl 15 30 0 1 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 0 1;
+#X obj 80 421 vsl 15 30 0 1 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 0 1;
+#X obj 115 421 vsl 15 30 0 1 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 0 1;
+#X obj 154 425 vsl 15 30 0 1 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 0 1;
+#X msg 247 306 save complex.net;
+#X msg 247 324 load conplex.net;
+#X text 148 15 1- create the ann;
+#N canvas 350 135 693 354 train 0;
+#X obj 107 286 outlet;
+#X msg 73 161 iterations_between_reports 1000;
+#X msg 198 224 train-on-file complex.txt;
+#X text 200 242 training on files with many patterns may take minutes
+\, please be patient.;
+#X msg 73 109 desired_error 0.06;
+#X msg 77 135 max_iterations 200000;
+#X text 69 76 due to the complexity of the input and output data you
+should change the default training parameters:;
+#X text 219 134 smaller cycle;
+#N canvas 190 67 849 551 write 0;
+#X obj 65 417 textfile;
+#X msg 190 337 clear;
+#N canvas 0 0 458 308 alternate 0;
+#X obj 103 117 + 1;
+#X obj 70 119 f 0;
+#X obj 70 171 sel 0 1;
+#X obj 70 146 mod 2;
+#X msg 95 90 0;
+#X obj 68 31 inlet;
+#X obj 140 40 inlet;
+#X obj 140 63 bang;
+#X obj 68 55 bang;
+#X obj 65 205 outlet;
+#X obj 125 206 outlet;
+#X text 59 6 bang;
+#X text 139 18 reset to 0 without bang;
+#X connect 0 0 1 1;
+#X connect 1 0 0 0;
+#X connect 1 0 3 0;
+#X connect 2 0 9 0;
+#X connect 2 1 10 0;
+#X connect 3 0 2 0;
+#X connect 4 0 1 1;
+#X connect 5 0 8 0;
+#X connect 6 0 7 0;
+#X connect 7 0 4 0;
+#X connect 8 0 1 0;
+#X restore 58 227 pd alternate;
+#X obj 24 81 bng 15 250 50 0 empty empty write-once 0 -6 0 8 -262144
+-1 -1;
+#X obj 457 108 bng 15 250 50 0 empty empty reset 0 -6 0 8 -262144 -1
+-1;
+#N canvas 0 0 638 328 inputs 0;
+#X obj 64 271 outlet;
+#X text 118 272 to textfile;
+#X obj 24 42 inlet;
+#X text 23 22 bang;
+#X obj 76 19 r 1-X;
+#X obj 111 19 r 1-Y;
+#X obj 145 19 r 1-Velo;
+#X obj 86 47 r 2-X;
+#X obj 121 47 r 2-Y;
+#X obj 155 47 r 2-Velo;
+#X obj 222 20 r 3-X;
+#X obj 257 21 r 3-Y;
+#X obj 291 21 r 3-Velo;
+#X obj 220 46 r 4-X;
+#X obj 255 46 r 4-Y;
+#X obj 289 46 r 4-Velo;
+#X obj 359 23 r 5-X;
+#X obj 394 23 r 5-Y;
+#X obj 428 23 r 5-Velo;
+#X obj 358 51 r 6-X;
+#X obj 393 51 r 6-Y;
+#X obj 427 51 r 6-Velo;
+#X obj 420 99 r posx;
+#X obj 464 99 r posy;
+#X obj 61 153 pack s f f f f f f f f f f f f f f f f f f f f;
+#X obj 127 175 unpack s f f f f f f f f f f f f f f f f f f f f;
+#X obj 127 213 pack f f f f f f f f f f f f f f f f f f f f f;
+#X msg 64 236 add \$2 \$3 \$4 \$5 \$6 \$7 \$8 \$9 \$10 \$11 \$12 \$13
+\$14 \$15 \$16 \$17 \$18 \$19 \$20 \$21;
+#X connect 2 0 24 0;
+#X connect 4 0 24 1;
+#X connect 5 0 24 2;
+#X connect 6 0 24 3;
+#X connect 7 0 24 4;
+#X connect 8 0 24 5;
+#X connect 9 0 24 6;
+#X connect 10 0 24 7;
+#X connect 11 0 24 8;
+#X connect 12 0 24 9;
+#X connect 13 0 24 10;
+#X connect 14 0 24 11;
+#X connect 15 0 24 12;
+#X connect 16 0 24 13;
+#X connect 17 0 24 14;
+#X connect 18 0 24 15;
+#X connect 19 0 24 16;
+#X connect 20 0 24 17;
+#X connect 21 0 24 18;
+#X connect 22 0 24 19;
+#X connect 23 0 24 20;
+#X connect 24 0 27 0;
+#X connect 25 1 26 0;
+#X connect 25 2 26 1;
+#X connect 25 3 26 2;
+#X connect 25 4 26 3;
+#X connect 25 5 26 4;
+#X connect 25 6 26 5;
+#X connect 25 7 26 6;
+#X connect 27 0 0 0;
+#X restore 58 306 pd inputs;
+#N canvas 0 0 474 324 outputs 0;
+#X obj 131 202 pack f f;
+#X obj 129 178 unpack s f f;
+#X obj 66 257 outlet;
+#X text 120 258 to textfile;
+#X obj 24 42 inlet;
+#X text 23 22 bang;
+#X text 66 77 here go the outputs;
+#X obj 91 51 r output1;
+#X obj 166 51 r output2;
+#X obj 243 51 r output3;
+#X obj 318 51 r output4;
+#X obj 61 153 pack s f f f f;
+#X msg 67 227 add \$2 \$3 \$4 \$5;
+#X connect 1 1 0 0;
+#X connect 1 2 0 1;
+#X connect 4 0 11 0;
+#X connect 7 0 11 1;
+#X connect 8 0 11 2;
+#X connect 9 0 11 3;
+#X connect 10 0 11 4;
+#X connect 11 0 12 0;
+#X connect 12 0 2 0;
+#X restore 149 284 pd outputs;
+#X obj 230 223 f 0;
+#X obj 260 223 + 1;
+#X obj 239 257 nbx 5 14 -1e+037 1e+037 0 0 empty empty how_many_datasets
+0 -6 0 10 -262144 -1 -1 0 256;
+#X text 156 406 todo: write header (a line at the beginning of file
+with 3 int: how many tests \, num_input \, num_output);
+#X obj 122 190 delay 50;
+#X obj 115 159 metro 100;
+#X floatatom 346 70 5 100 5000 2 msec_between_snapshots - -;
+#X obj 127 80 tgl 15 0 empty empty toggle_on-off 0 -6 0 8 -262144 -1
+-1 0 1;
+#X obj 219 189 / 2;
+#X obj 347 14 loadbang;
+#X text 293 224 comment;
+#N canvas 262 68 635 591 README 0;
+#X text 11 63 how to use: 1) modify [pd inputs] and [ps outputs] inserting
+[r] objects to receive input data \, and modify [pack]s to handle the
+right number of inputs 2) do the same with [pd outputs] 3) click on
+reset 4) toggle ON and start collectng data 5) when you are ready toggle
+OFF 6) edit [write filename cr( with the actual filename you want for
+your training data (always keep the cr after the filename) 7) open
+the file with training data 8) add a line at the beginning and write
+3 integers: the 1st is the number of training dataset written (see
+"how many datasets" number box) \, the 2nd is how many inputs your
+ann has \, the 3th is how many outputs e.g. i collected 100 training
+snapshots \, for a ann with 10 ins and 2 outs I write: 100 10 2 at
+the very beginning of the file now the training file is ready and can
+be read from nn via train-on-file command;
+#X text 143 489 please help me getting this patch more usable: - how
+to add a line at the very beginning of a text file after i have filled
+it? - how to manage inputs and outputs of different sized without forcing
+the user to edit the patch?;
+#X text 9 7 this tricky patch is usefull to write a file to train ann
+and is intended to be used with the nn external;
+#X restore 33 13 pd README;
+#X text 516 7 by davide morelli info@davidemorelli.it;
+#X text 106 14 <--readme!;
+#X msg 347 34 500;
+#X obj 129 41 inlet;
+#X msg 368 328 write complex.txt cr;
+#X msg 303 180 0;
+#N canvas 0 0 482 332 outputs 0;
+#X obj 89 60 key;
+#X obj 41 122 sel 97;
+#X text 84 101 "a" key;
+#X obj 218 120 sel 115;
+#N canvas 0 0 458 308 a 0;
+#X obj 130 150 s output1;
+#X obj 86 76 inlet;
+#X text 88 56 bang;
+#X obj 241 80 inlet;
+#X text 243 60 reset;
+#X msg 86 101 1;
+#X msg 241 110 0;
+#X connect 1 0 5 0;
+#X connect 3 0 6 0;
+#X connect 5 0 0 0;
+#X connect 6 0 0 0;
+#X restore 41 145 pd a pressed;
+#N canvas 0 0 458 308 s 0;
+#X obj 86 76 inlet;
+#X text 88 56 bang;
+#X obj 241 80 inlet;
+#X text 243 60 reset;
+#X msg 86 101 1;
+#X msg 241 110 0;
+#X obj 130 150 s output2;
+#X connect 0 0 4 0;
+#X connect 2 0 5 0;
+#X connect 4 0 6 0;
+#X connect 5 0 6 0;
+#X restore 217 142 pd s pressed;
+#X text 295 92 "s" key;
+#X obj 228 57 keyup;
+#X obj 132 123 sel 97;
+#X obj 308 120 sel 115;
+#X floatatom 19 80 5 0 0 0 - - -;
+#X obj 39 183 sel 100;
+#X obj 130 184 sel 100;
+#X obj 216 181 sel 102;
+#X obj 306 181 sel 102;
+#N canvas 0 0 462 312 d 0;
+#X obj 86 76 inlet;
+#X text 88 56 bang;
+#X obj 241 80 inlet;
+#X text 243 60 reset;
+#X msg 86 101 1;
+#X msg 241 110 0;
+#X obj 130 150 s output3;
+#X connect 0 0 4 0;
+#X connect 2 0 5 0;
+#X connect 4 0 6 0;
+#X connect 5 0 6 0;
+#X restore 39 206 pd d pressed;
+#N canvas 0 0 470 320 f 0;
+#X obj 86 76 inlet;
+#X text 88 56 bang;
+#X obj 241 80 inlet;
+#X text 243 60 reset;
+#X msg 86 101 1;
+#X msg 241 110 0;
+#X obj 130 150 s output4;
+#X connect 0 0 4 0;
+#X connect 2 0 5 0;
+#X connect 4 0 6 0;
+#X connect 5 0 6 0;
+#X restore 215 203 pd f pressed;
+#X connect 0 0 1 0;
+#X connect 0 0 3 0;
+#X connect 0 0 10 0;
+#X connect 0 0 11 0;
+#X connect 0 0 13 0;
+#X connect 1 0 4 0;
+#X connect 3 0 5 0;
+#X connect 7 0 8 0;
+#X connect 7 0 9 0;
+#X connect 7 0 12 0;
+#X connect 7 0 14 0;
+#X connect 8 0 4 1;
+#X connect 9 0 5 1;
+#X connect 11 0 15 0;
+#X connect 12 0 15 1;
+#X connect 13 0 16 0;
+#X connect 14 0 16 1;
+#X restore 439 206 pd outputs;
+#X obj 431 237 r output1;
+#X obj 499 236 r output2;
+#X floatatom 431 258 5 0 0 0 - - -;
+#X floatatom 498 258 5 0 0 0 - - -;
+#X floatatom 568 256 5 0 0 0 - - -;
+#X floatatom 635 257 5 0 0 0 - - -;
+#X obj 568 235 r output3;
+#X obj 636 235 r output4;
+#X text 431 270 sx;
+#X text 496 272 dx;
+#X text 566 269 chaos;
+#X text 635 269 calm;
+#X text 434 171 4 outputs: using keyboard: asdf: a=sx-ness \, s=dx-ness
+\, d=chaos-ness \, f=calm-ness;
+#X text 363 348 remember to add a line at the beginning of the file
+with 3 integers... how_many_patterns 20 4 ...see README;
+#X text 142 308 <--we have 20 inputs;
+#X text 242 283 <--we have 4 outputs;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 2 1 6 0;
+#X connect 2 1 7 0;
+#X connect 3 0 11 0;
+#X connect 3 0 2 0;
+#X connect 4 0 2 1;
+#X connect 4 0 1 0;
+#X connect 4 0 24 0;
+#X connect 5 0 0 0;
+#X connect 6 0 0 0;
+#X connect 7 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 1;
+#X connect 11 0 2 0;
+#X connect 12 0 11 0;
+#X connect 12 0 2 0;
+#X connect 13 0 12 1;
+#X connect 13 0 15 0;
+#X connect 14 0 12 0;
+#X connect 15 0 11 1;
+#X connect 16 0 21 0;
+#X connect 21 0 13 0;
+#X connect 22 0 14 0;
+#X connect 23 0 0 0;
+#X connect 24 0 7 1;
+#X connect 26 0 28 0;
+#X connect 27 0 29 0;
+#X connect 32 0 30 0;
+#X connect 33 0 31 0;
+#X restore 40 27 pd write trainfile;
+#X text 163 28 1- write a trainfile;
+#X text 69 63 2- adjust parameters before training;
+#X text 225 205 3- train on the file;
+#X text 195 110 higher error allowed;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 4 0 0 0;
+#X connect 5 0 0 0;
+#X restore 114 71 pd train on file;
+#X text 217 70 2a- train using a file or;
+#N canvas 0 0 900 594 train 0;
+#X obj 66 319 outlet;
+#N canvas 0 0 793 344 inputs 0;
+#X obj 122 244 outlet;
+#X obj 24 42 inlet;
+#X text 23 22 bang;
+#X obj 76 19 r 1-X;
+#X obj 111 19 r 1-Y;
+#X obj 145 19 r 1-Velo;
+#X obj 86 47 r 2-X;
+#X obj 121 47 r 2-Y;
+#X obj 155 47 r 2-Velo;
+#X obj 222 20 r 3-X;
+#X obj 257 21 r 3-Y;
+#X obj 291 21 r 3-Velo;
+#X obj 220 46 r 4-X;
+#X obj 255 46 r 4-Y;
+#X obj 289 46 r 4-Velo;
+#X obj 359 23 r 5-X;
+#X obj 394 23 r 5-Y;
+#X obj 428 23 r 5-Velo;
+#X obj 358 51 r 6-X;
+#X obj 393 51 r 6-Y;
+#X obj 427 51 r 6-Velo;
+#X obj 395 88 r posx;
+#X obj 439 88 r posy;
+#X obj 550 29 r output1;
+#X obj 574 48 r output2;
+#X obj 598 68 r output3;
+#X obj 615 87 r output4;
+#X obj 61 153 pack s f f f f f f f f f f f f f f f f f f f f f f f
+f;
+#X obj 127 175 unpack s f f f f f f f f f f f f f f f f f f f f f f
+f f;
+#X obj 127 213 pack f f f f f f f f f f f f f f f f f f f f f f f f
+;
+#X connect 1 0 27 0;
+#X connect 3 0 27 1;
+#X connect 4 0 27 2;
+#X connect 5 0 27 3;
+#X connect 6 0 27 4;
+#X connect 7 0 27 5;
+#X connect 8 0 27 6;
+#X connect 9 0 27 7;
+#X connect 10 0 27 8;
+#X connect 11 0 27 9;
+#X connect 12 0 27 10;
+#X connect 13 0 27 11;
+#X connect 14 0 27 12;
+#X connect 15 0 27 13;
+#X connect 16 0 27 14;
+#X connect 17 0 27 15;
+#X connect 18 0 27 16;
+#X connect 19 0 27 17;
+#X connect 20 0 27 18;
+#X connect 21 0 27 19;
+#X connect 22 0 27 20;
+#X connect 23 0 27 21;
+#X connect 24 0 27 22;
+#X connect 25 0 27 23;
+#X connect 26 0 27 24;
+#X connect 27 0 28 0;
+#X connect 28 1 29 0;
+#X connect 28 2 29 1;
+#X connect 28 3 29 2;
+#X connect 28 4 29 3;
+#X connect 28 5 29 4;
+#X connect 28 6 29 5;
+#X connect 28 7 29 6;
+#X connect 28 8 29 7;
+#X connect 28 9 29 8;
+#X connect 28 10 29 9;
+#X connect 28 11 29 10;
+#X connect 28 12 29 11;
+#X connect 28 13 29 12;
+#X connect 28 14 29 13;
+#X connect 28 15 29 14;
+#X connect 28 16 29 15;
+#X connect 28 17 29 16;
+#X connect 28 18 29 17;
+#X connect 28 19 29 18;
+#X connect 28 20 29 19;
+#X connect 28 21 29 20;
+#X connect 28 22 29 21;
+#X connect 28 23 29 22;
+#X connect 28 24 29 23;
+#X connect 29 0 0 0;
+#X restore 213 222 pd inputs;
+#X obj 213 202 metro 100;
+#X obj 213 183 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X msg 84 16 train;
+#N canvas 0 0 482 332 outputs 0;
+#X obj 89 60 key;
+#X obj 41 122 sel 97;
+#X text 84 101 "a" key;
+#X obj 218 120 sel 115;
+#N canvas 0 0 458 308 a 0;
+#X obj 130 150 s output1;
+#X obj 86 76 inlet;
+#X text 88 56 bang;
+#X obj 241 80 inlet;
+#X text 243 60 reset;
+#X msg 86 101 1;
+#X msg 241 110 0;
+#X connect 1 0 5 0;
+#X connect 3 0 6 0;
+#X connect 5 0 0 0;
+#X connect 6 0 0 0;
+#X restore 41 145 pd a pressed;
+#N canvas 0 0 458 308 s 0;
+#X obj 86 76 inlet;
+#X text 88 56 bang;
+#X obj 241 80 inlet;
+#X text 243 60 reset;
+#X msg 86 101 1;
+#X msg 241 110 0;
+#X obj 130 150 s output2;
+#X connect 0 0 4 0;
+#X connect 2 0 5 0;
+#X connect 4 0 6 0;
+#X connect 5 0 6 0;
+#X restore 217 142 pd s pressed;
+#X text 295 92 "s" key;
+#X obj 228 57 keyup;
+#X obj 132 123 sel 97;
+#X obj 308 120 sel 115;
+#X floatatom 19 80 5 0 0 0 - - -;
+#X obj 39 183 sel 100;
+#X obj 130 184 sel 100;
+#X obj 216 181 sel 102;
+#X obj 306 181 sel 102;
+#N canvas 0 0 462 312 d 0;
+#X obj 86 76 inlet;
+#X text 88 56 bang;
+#X obj 241 80 inlet;
+#X text 243 60 reset;
+#X msg 86 101 1;
+#X msg 241 110 0;
+#X obj 130 150 s output3;
+#X connect 0 0 4 0;
+#X connect 2 0 5 0;
+#X connect 4 0 6 0;
+#X connect 5 0 6 0;
+#X restore 39 206 pd d pressed;
+#N canvas 0 0 470 320 f 0;
+#X obj 86 76 inlet;
+#X text 88 56 bang;
+#X obj 241 80 inlet;
+#X text 243 60 reset;
+#X msg 86 101 1;
+#X msg 241 110 0;
+#X obj 130 150 s output4;
+#X connect 0 0 4 0;
+#X connect 2 0 5 0;
+#X connect 4 0 6 0;
+#X connect 5 0 6 0;
+#X restore 215 203 pd f pressed;
+#X connect 0 0 1 0;
+#X connect 0 0 3 0;
+#X connect 0 0 10 0;
+#X connect 0 0 11 0;
+#X connect 0 0 13 0;
+#X connect 1 0 4 0;
+#X connect 3 0 5 0;
+#X connect 7 0 8 0;
+#X connect 7 0 9 0;
+#X connect 7 0 12 0;
+#X connect 7 0 14 0;
+#X connect 8 0 4 1;
+#X connect 9 0 5 1;
+#X connect 11 0 15 0;
+#X connect 12 0 15 1;
+#X connect 13 0 16 0;
+#X connect 14 0 16 1;
+#X restore 131 57 pd outputs;
+#X obj 130 87 r output1;
+#X obj 198 86 r output2;
+#X floatatom 130 108 5 0 0 0 - - -;
+#X floatatom 197 108 5 0 0 0 - - -;
+#X floatatom 267 106 5 0 0 0 - - -;
+#X floatatom 334 107 5 0 0 0 - - -;
+#X obj 267 85 r output3;
+#X obj 335 85 r output4;
+#X text 128 14 1- change to training mode;
+#X text 204 49 2- change keys if you want;
+#X text 220 61 defaults are "a" "s" "d" "f";
+#X text 239 182 3- toggle on to start training and off to stop;
+#X msg 170 282 run;
+#X text 200 283 4- switch to run mode when ready;
+#X obj 305 226 inlet;
+#X obj 305 249 nbx 8 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0
+10 -262144 -1 -1 0 256;
+#X text 344 218 note: while in training mode the right outlet gives
+you the mean square error.;
+#X connect 1 0 0 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 0;
+#X connect 4 0 0 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 12 0 10 0;
+#X connect 13 0 11 0;
+#X connect 18 0 0 0;
+#X connect 20 0 21 0;
+#X restore 133 114 pd train on the fly;
+#X text 255 113 2b- train on the fly in realtime;
+#X text 224 182 3- run the nn switching this metro ON;
+#X text 277 213 (note \, you must be in run mode);
+#X msg 281 231 run;
+#X text 34 403 left;
+#X text 75 404 right;
+#X text 356 305 4- when you are happy with you nn save it;
+#X text 354 323 remember that you can load it also passing filename
+as argument;
+#X obj 301 404 nbx 8 14 -1e+037 1e+037 0 0 empty empty mse 0 -6 0 10
+-262144 -1 -1 0 256;
+#X text 300 422 mse is usefull while training on-the-fly: tells you
+the global error in the net \, how much net's output differs from desired
+output.;
+#X obj 66 325 ann_mlp complex.net;
+#X connect 0 0 31 0;
+#X connect 1 0 2 0;
+#X connect 1 1 3 0;
+#X connect 1 2 4 0;
+#X connect 1 3 5 0;
+#X connect 2 0 11 0;
+#X connect 3 0 12 0;
+#X connect 4 0 13 0;
+#X connect 5 0 14 0;
+#X connect 7 0 31 0;
+#X connect 8 0 7 0;
+#X connect 9 0 8 0;
+#X connect 15 0 31 0;
+#X connect 16 0 31 0;
+#X connect 18 0 31 0;
+#X connect 20 0 31 0;
+#X connect 24 0 31 0;
+#X connect 31 0 1 0;
+#X connect 31 1 29 0;
+#X connect 31 1 20 0;
+#X restore 16 142 pd train and run nn;
+#X text 101 12 1- start rendering;
+#X text 141 142 2- open the subpatch and follow instructions;
+#X connect 1 0 0 0;
+#X connect 2 0 0 1;