[Gridflow-cvs] [svn] commit: r6351 - in /trunk: doc/flow_classes/#expr-help.pd tests/#expr-test.pd

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Fri Sep 24 15:15:23 EDT 2010


Author: matju
Date: Fri Sep 24 15:15:21 2010
New Revision: 6351

Log:
added tanh() sqrt() abs() rand()

Modified:
    trunk/doc/flow_classes/#expr-help.pd
    trunk/tests/#expr-test.pd

Modified: trunk/doc/flow_classes/#expr-help.pd
==============================================================================
--- trunk/doc/flow_classes/#expr-help.pd (original)
+++ trunk/doc/flow_classes/#expr-help.pd Fri Sep 24 15:15:21 2010
@@ -1,19 +1,19 @@
-#N canvas 467 70 632 582 10;
+#N canvas 467 70 632 641 10;
 #X obj 0 0 doc_h;
-#X obj 3 528 doc_also;
-#X obj 0 548 doc_f;
-#X obj 3 267 doc_c 1..;
-#X obj 14 297 doc_cc any;
-#X obj 97 297 doc_m cany <atom>;
-#X text 232 297 floats and symbols (and commas and semicolons) that
+#X obj 3 587 doc_also;
+#X obj 0 607 doc_f;
+#X obj 3 290 doc_c 1..;
+#X obj 14 320 doc_cc any;
+#X obj 97 320 doc_m cany <atom>;
+#X text 232 320 floats and symbols (and commas and semicolons) that
 will be joined together to form a string which will be interpreted
 in a manner quite similar to what [expr] does.;
-#X obj 14 385 doc_ii 0;
-#X obj 97 385 doc_m i0 bang;
-#X text 232 381 evaluate expression and output result.;
-#X obj 103 528 expr;
-#X obj 139 528 expr~;
-#X obj 181 528 fexpr~;
+#X obj 14 408 doc_ii 0;
+#X obj 97 408 doc_m i0 bang;
+#X text 232 408 evaluate expression and output result.;
+#X obj 103 587 expr;
+#X obj 139 587 expr~;
+#X obj 181 587 fexpr~;
 #X obj 98 43 #expr;
 #X text 135 43 computes the result of the formula(s) you write in it.
 ;
@@ -29,21 +29,23 @@
 like [%].;
 #X text 96 188 it supports $f1 \, $f2 \, $f3 \, etc.;
 #X text 96 203 it does not support $s1 \, $v1 \, etc.;
-#X obj 3 355 doc_i 1..;
-#X obj 97 402 doc_m i0 float;
-#X text 232 396 set value of $f1 and then do like bang.;
-#X obj 14 399 doc_ii other;
-#X obj 97 399 doc_m iother float;
-#X text 232 399 set value of any other $f variable \, such as $f2 \,
+#X obj 3 378 doc_i 1..;
+#X obj 97 430 doc_m i0 float;
+#X text 232 430 set value of $f1 and then do like bang.;
+#X obj 14 454 doc_ii other;
+#X obj 97 454 doc_m iother float;
+#X text 232 454 set value of any other $f variable \, such as $f2 \,
 $f3 \, etc. \; for example \, a float into inlet 6 will set $f7.;
-#X obj 3 440 doc_o 1..;
-#X obj 14 470 doc_oo any;
-#X obj 97 470 doc_m oany float;
-#X text 232 470 the results \, output from right to left \, even though
+#X obj 3 499 doc_o 1..;
+#X obj 14 529 doc_oo any;
+#X obj 97 529 doc_m oany float;
+#X text 232 529 the results \, output from right to left \, even though
 they get computed left-to-right. [#expr] makes a list of the results
 and then outputs it in reverse order.;
-#X text 97 219 it supports some functions that have a single arguments
-\, which are the following : sin cos exp log;
+#X text 96 219 it supports some functions that have a single argument
+\, which are the following : sin cos exp log tanh sqrt abs rand;
+#X text 118 248 [#expr rand($f1)] is the same as [expr random(0 \,
+$f1)];
 #X connect 1 1 10 0;
 #X connect 1 1 11 0;
 #X connect 1 1 12 0;

Modified: trunk/tests/#expr-test.pd
==============================================================================
--- trunk/tests/#expr-test.pd (original)
+++ trunk/tests/#expr-test.pd Fri Sep 24 15:15:21 2010
@@ -1,4 +1,4 @@
-#N canvas 545 149 533 523 10;
+#N canvas 629 127 533 523 10;
 #X obj 57 11 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
 -1;
 #X obj 57 47 display;
@@ -99,6 +99,22 @@
 #X text 327 182 -10;
 #X text 379 182 1;
 #X obj 296 330 #expr log($f1*3);
+#X obj 294 392 #expr weight($f1);
+#X floatatom 294 374 5 0 0 0 - - -;
+#X obj 294 411 display;
+#X floatatom 149 376 5 0 0 0 - - -;
+#X obj 149 413 display;
+#X obj 149 394 #expr tanh($f1);
+#X floatatom 49 376 5 0 0 0 - - -;
+#X obj 49 413 display;
+#X obj 49 394 #expr sqrt($f1);
+#X floatatom 49 436 5 0 0 0 - - -;
+#X obj 49 473 display;
+#X obj 49 454 #expr abs($f1);
+#X floatatom 152 436 5 0 0 0 - - -;
+#X obj 152 473 display;
+#X obj 152 454 #expr rand($f1);
+#X obj 307 460 ../doc/numop;
 #X connect 0 0 2 0;
 #X connect 2 0 1 0;
 #X connect 3 0 5 0;
@@ -150,3 +166,13 @@
 #X connect 75 0 38 0;
 #X connect 76 0 80 0;
 #X connect 80 0 77 0;
+#X connect 81 0 83 0;
+#X connect 82 0 81 0;
+#X connect 84 0 86 0;
+#X connect 86 0 85 0;
+#X connect 87 0 89 0;
+#X connect 89 0 88 0;
+#X connect 90 0 92 0;
+#X connect 92 0 91 0;
+#X connect 93 0 95 0;
+#X connect 95 0 94 0;



More information about the Gridflow-cvs mailing list