aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2004-07-21 16:56:50 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2004-07-21 16:56:50 +0000
commit7db848c580506314baedd28a7c001d137c2dffbe (patch)
tree1836cf6919555ba6339f9fbfb83e289ecb553edb /examples
parentcb55a7e77b61753c186dd7eaa635d3b98f9062d2 (diff)
updated documentation
svn path=/trunk/externals/zexy/; revision=1878
Diffstat (limited to 'examples')
-rw-r--r--examples/0.INTRO.txt25
-rw-r--r--examples/a2l.pd21
-rw-r--r--examples/blockmirror~.pd35
-rw-r--r--examples/blockswap~.pd36
-rw-r--r--examples/mtx_binops.pd40
-rw-r--r--examples/mtx_transpose.pd51
-rw-r--r--examples/tabread4.pd29
7 files changed, 155 insertions, 82 deletions
diff --git a/examples/0.INTRO.txt b/examples/0.INTRO.txt
index ffd209a..1af8c61 100644
--- a/examples/0.INTRO.txt
+++ b/examples/0.INTRO.txt
@@ -16,6 +16,8 @@ noisi~ downsampled noise (interpolate)
limiter~ a limiter/compressor module
quantize~ quantizes signals
swap~ bytes swap a 16bit-signal
+blockmirror~ time-reverse a signal-vector (1,2,...,64 -> 64,63,...,1)
+blockswap~ swap the upper and lower half of a signal-vector
z~ samplewise delay
------------------------- analytic~ -----------------------------
@@ -36,6 +38,7 @@ nop~ no-operation
pack~ convert a signal to a list of floats
unpack~ convert a list of floats to a signal
matrix~ matrix-multiply m IN-signals to n OUT-signals
+multiline~ multiply a number of signals with scalars (interpolated)
multiplex~ multiplex 1-of-n inlets to 1 outlet
demultiplex~ demultiplex 1 inlet to 1-of-n outlets
@@ -44,9 +47,11 @@ demultiplex~ demultiplex 1 inlet to 1-of-n outlets
-------------------------- basic -------------------------------
nop no-operation
+repeat repeat a message several times
lister store lists (like "float" for floats)
repack (re)pack atoms to packages of a given size
packel get a specified element of a list
+drip extract the atoms of a package (opt. scheduled)
length get the length of a list
niagara split 1 packages into 2
glue append a package to another (glue them together)
@@ -56,10 +61,9 @@ list2int cast each float of a list to integer
atoi ascii to integer
strcmp compare lists as strings
list2symbol convert a list into a single symbol
-. scalar multiplication of vectors (=lists of floats)
+symbol2list convert a symbol to a list
------------------------ advanced ------------------------------
-tabread4 interpolating tabread (obsolete since pd>=0.30)
tabdump dump out a table as a list of floats
tabset set a table with a list of floats
makesymbol concatenate lists to formatted symbols
@@ -67,13 +71,23 @@ date get system date
time get system time
index map symbols to indices
msgfile a powerful "textfile" derivative
+demultiplex demultiplex the input to a specified outlet
+lpt write to the (parallel) port (linux only)
+operating_system get the current OS
+
+
+-------------------------- maths --------------------------------
mavg moving average filter for floats
mean get the mean value of a list of floats
minmax get minimum and maximum of a list of floats
sort shell-sort a list of floats
-demultiplex demultiplex the input to a specified outlet
-drip extract the atoms of a package (opt. scheduled)
-lp write to the (parallel) port (linux only)
+urn unique random numbers
+prime test whether a number is prime or not
+wrap wrap the float-input between to boundaries
+. scalar multiplication of vectors (=lists of floats)
+deg2rad convert between degree and radiant
+rad2deg convert between radiant and degree
+cart2pol, pol2cart, cart2sph, sph2cart, pol2sph, sph2pol convert between coordinate systems (cartesian, polar, shperic)
-------------------------- matrix -------------------------------
matrix create/store/... matrices
@@ -96,6 +110,7 @@ mtx_resize resize a matrix (evtl. with zero-padding)
mtx_size get the size of a matrix
mtx_inverse get the inverse of a matrix
mtx_add, mtx_+ add 2 matrices (or an offset to 1 matrix)
+mtx_sub, mtx_- subtract 2 matrices (or an offset from 1 matrix)
mtx_mul, mtx_* multiply 2 matrices (or a factor with 1 matrix)
mtx_.* multiply 2 matrices element by element
mtx_./ divide 2 matrices element by element
diff --git a/examples/a2l.pd b/examples/a2l.pd
deleted file mode 100644
index 54416e8..0000000
--- a/examples/a2l.pd
+++ /dev/null
@@ -1,21 +0,0 @@
-#N canvas 165 209 450 458 10;
-#X obj 76 28 a2l;
-#X text 113 30 convert "anything" to lists;
-#X obj 35 256 a2l;
-#X text 116 56 pass through the rest;
-#X floatatom 46 229;
-#X symbolatom 46 203;
-#X msg 46 162 this is anything;
-#X msg 46 182 list this is a list;
-#X obj 35 276 print a2l;
-#X text 69 335 to make "anything"s out of lists \, try;
-#X obj 319 339 route list;
-#X msg 319 320 list this is a list;
-#X obj 319 358 print l2a;
-#X connect 2 0 8 0;
-#X connect 4 0 2 0;
-#X connect 5 0 2 0;
-#X connect 6 0 2 0;
-#X connect 7 0 2 0;
-#X connect 10 0 12 0;
-#X connect 11 0 10 0;
diff --git a/examples/blockmirror~.pd b/examples/blockmirror~.pd
new file mode 100644
index 0000000..101410c
--- /dev/null
+++ b/examples/blockmirror~.pd
@@ -0,0 +1,35 @@
+#N canvas 0 0 705 533 10;
+#X obj 71 367 dac~ 1;
+#X obj 71 342 *~;
+#X obj 32 293 dbtorms;
+#X floatatom 32 269 0 0 0 0 - - -;
+#X floatatom 26 203 0 0 0 0 - - -;
+#X msg 118 228 help;
+#X msg 404 59 \; pd dsp 1;
+#X obj 71 317 sig~ 0.2;
+#X msg 482 61 \; pd dsp 0;
+#N canvas 0 0 450 300 graph5 0;
+#X array scope 100 float 0;
+#X coords 0 1 100 -1 400 300 1;
+#X restore 298 194 graph;
+#X obj 139 314 tabwrite~ scope;
+#X msg 139 289 bang;
+#X text 287 166 note: there will be a break at 64 samples (signal-vector!)
+;
+#X obj 26 227 osc~ 440;
+#X obj 122 198 tgl 15 0 empty empty on/off 0 -6 0 8 -262144 -1 -1 1
+1;
+#X obj 101 12 blockmirror~;
+#X obj 87 255 blockmirror~;
+#X text 200 13 play back a signal-vector in a time-reversed way!;
+#X connect 1 0 0 0;
+#X connect 2 0 7 0;
+#X connect 3 0 2 0;
+#X connect 4 0 13 0;
+#X connect 5 0 16 0;
+#X connect 7 0 1 0;
+#X connect 11 0 10 0;
+#X connect 13 0 16 0;
+#X connect 14 0 16 0;
+#X connect 16 0 1 1;
+#X connect 16 0 10 0;
diff --git a/examples/blockswap~.pd b/examples/blockswap~.pd
new file mode 100644
index 0000000..2ff6fd1
--- /dev/null
+++ b/examples/blockswap~.pd
@@ -0,0 +1,36 @@
+#N canvas 0 0 705 533 10;
+#X obj 71 367 dac~ 1;
+#X obj 71 342 *~;
+#X obj 32 293 dbtorms;
+#X floatatom 32 269 0 0 0 0 - - -;
+#X floatatom 26 203 0 0 0 0 - - -;
+#X msg 118 228 help;
+#X msg 404 59 \; pd dsp 1;
+#X obj 71 317 sig~ 0.2;
+#X msg 482 61 \; pd dsp 0;
+#N canvas 0 0 450 300 graph5 0;
+#X array scope 100 float 0;
+#X coords 0 1 100 -1 400 300 1;
+#X restore 298 194 graph;
+#X obj 139 314 tabwrite~ scope;
+#X msg 139 289 bang;
+#X text 287 166 note: there will be a break at 64 samples (signal-vector!)
+;
+#X obj 87 255 blockswap~;
+#X obj 26 227 osc~ 440;
+#X obj 123 12 blockswap~;
+#X text 200 13 swap upper and lower half of the signal-vector;
+#X obj 122 198 tgl 15 0 empty empty on/off 0 -6 0 8 -262144 -1 -1 1
+1;
+#X text 287 151 note: there will be a break at 32 samples (swap!);
+#X connect 1 0 0 0;
+#X connect 2 0 7 0;
+#X connect 3 0 2 0;
+#X connect 4 0 14 0;
+#X connect 5 0 13 0;
+#X connect 7 0 1 0;
+#X connect 11 0 10 0;
+#X connect 13 0 1 1;
+#X connect 13 0 10 0;
+#X connect 14 0 13 0;
+#X connect 17 0 13 0;
diff --git a/examples/mtx_binops.pd b/examples/mtx_binops.pd
index 9c700f4..a0ae6d0 100644
--- a/examples/mtx_binops.pd
+++ b/examples/mtx_binops.pd
@@ -1,4 +1,4 @@
-#N canvas 95 74 802 673 10;
+#N canvas 79 32 859 673 10;
#X obj 87 360 mtx_mul;
#X obj 157 360 mtx_*;
#X obj 88 163 mtx_add;
@@ -13,7 +13,7 @@
#X obj 305 159 mtx_add 10;
#X msg 305 107 bang;
#X obj 305 186 mtx_print;
-#X floatatom 374 101 4 0 0;
+#X floatatom 374 101 4 0 0 0 - - -;
#X obj 374 119 t b f;
#X obj 392 160 mtx_+ 10;
#X text 371 161 ==;
@@ -26,7 +26,7 @@
#X obj 87 314 mtx_eye 3 2;
#X obj 249 399 mtx_print;
#X obj 249 292 t b f;
-#X floatatom 249 274 4 0 0;
+#X floatatom 249 274 4 0 0 0 - - -;
#X msg 249 315 4 2 1 3;
#X obj 249 335 mtx_diag;
#X obj 249 363 mtx_mul 2;
@@ -49,7 +49,7 @@
#X text 334 19 matrix arithmetic;
#X obj 88 599 mtx_print;
#X obj 88 492 t b f;
-#X floatatom 88 474 4 0 0;
+#X floatatom 88 474 4 0 0 0 - - -;
#X msg 88 515 4 2 1 3;
#X obj 88 535 mtx_diag;
#X obj 323 600 mtx_print;
@@ -61,9 +61,27 @@
#X obj 323 565 mtx_./;
#X text 307 624 divide 2 matrices element by element;
#X obj 323 482 t b b f;
-#X floatatom 323 463 4 0 0;
+#X floatatom 323 463 4 0 0 0 - - -;
#X obj 709 538 matrix;
#X text 592 538 see also help for;
+#X obj 550 141 mtx_diag 1 2 3 4 5;
+#X obj 483 141 mtx_ones 5;
+#X obj 483 118 t b b;
+#X obj 483 192 mtx_print;
+#X msg 483 99 bang;
+#X text 537 172 ==;
+#X obj 700 141 mtx_eye 4;
+#X msg 700 114 bang;
+#X obj 700 193 mtx_print;
+#X floatatom 769 108 4 0 0 0 - - -;
+#X obj 769 126 t b f;
+#X text 762 168 ==;
+#X obj 483 170 mtx_sub;
+#X obj 562 173 mtx_-;
+#X obj 779 169 mtx_sub 10;
+#X obj 700 166 mtx_- 10;
+#X text 481 221 subtract 2 matrices;
+#X text 669 225 subtract an offset from a matrix;
#X connect 0 0 18 0;
#X connect 2 0 7 0;
#X connect 4 0 2 1;
@@ -110,3 +128,15 @@
#X connect 61 1 55 0;
#X connect 61 2 56 1;
#X connect 62 0 61 0;
+#X connect 65 0 77 1;
+#X connect 66 0 77 0;
+#X connect 67 0 66 0;
+#X connect 67 1 65 0;
+#X connect 69 0 67 0;
+#X connect 71 0 80 0;
+#X connect 72 0 71 0;
+#X connect 74 0 75 0;
+#X connect 75 0 71 0;
+#X connect 75 1 80 1;
+#X connect 77 0 68 0;
+#X connect 80 0 73 0;
diff --git a/examples/mtx_transpose.pd b/examples/mtx_transpose.pd
index dd042b2..afe5c7b 100644
--- a/examples/mtx_transpose.pd
+++ b/examples/mtx_transpose.pd
@@ -1,26 +1,28 @@
-#N canvas 204 56 718 799 10;
+#N canvas 199 -133 718 600 10;
#X obj 48 162 mtx_print;
#X obj 48 134 mtx_transpose;
#X obj 48 81 mtx_ones;
#X msg 48 59 3 5;
#X text 45 42 transpose a matrix;
-#X text 158 13 tranpose/shift matrices;
+#X text 188 7 tranpose/shift matrices;
#X obj 37 349 mtx_print;
#X msg 37 246 1 2 3 4 5;
#X text 33 229 shift rows of a matrix;
-#X floatatom 104 301 4 0 0;
+#X floatatom 104 301 4 0 0 0 - - -;
#X obj 37 321 mtx_scroll 1;
#X obj 37 268 mtx_diag;
-#X obj 32 524 mtx_print;
-#X msg 32 421 1 2 3 4 5;
-#X floatatom 99 476 4 0 0;
-#X obj 32 443 mtx_diag;
-#X text 28 404 shift columns of a matrix;
-#X obj 32 497 mtx_roll 1;
-#X text 135 477 shift amount (0=no-shift \; 1=1-column-right \; -2=2-columns-left \; ...);
-#X text 143 299 shift amount (0=no-shift \; 1=1-row-down \; -2=2-rows-up \; ...);
-#X text 30 594 pivot-transform a matrix;
-#X obj 34 669 mtx_pivot;
+#X obj 414 333 mtx_print;
+#X msg 414 230 1 2 3 4 5;
+#X floatatom 481 285 4 0 0 0 - - -;
+#X obj 414 252 mtx_diag;
+#X text 410 213 shift columns of a matrix;
+#X obj 414 306 mtx_roll 1;
+#X text 517 286 shift amount (0=no-shift \; 1=1-column-right \; -2=2-columns-left
+\; ...);
+#X text 143 299 shift amount (0=no-shift \; 1=1-row-down \; -2=2-rows-up
+\; ...);
+#X text 29 419 pivot-transform a matrix;
+#X obj 33 494 mtx_pivot;
#N canvas 352 114 190 367 rand-matrix 0;
#X obj 74 163 inlet;
#X obj 74 270 outlet;
@@ -31,16 +33,21 @@
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 1 0;
-#X restore 34 633 pd rand-matrix;
-#X msg 34 611 4 3;
-#X obj 83 690 mtx_print post;
-#X obj 58 710 mtx_print pre;
-#X obj 34 760 mtx_print pivot;
+#X restore 33 458 pd rand-matrix;
+#X msg 33 436 4 3;
+#X obj 82 515 mtx_print post;
+#X obj 57 535 mtx_print pre;
+#X obj 33 575 mtx_print pivot;
#X obj 485 95 matrix;
-#X text 375 95 see also help for;
-#X text 282 620 this will tranform the columns and rows \, so that the result will have all maximum values in the diagonale. the maximum of the matrix will be located at the upper-lft corner.;
-#X text 281 669 the first outlet is the pivot-transformed matrix.;
-#X text 280 695 the other outlets are the 1/0-matrices that have to be pre-multiplied (row-tranform) and post-multiplied (column-tranform) to the original matrix to get the pivot-tranformation. this is useful for de-pivoting.;
+#X text 435 77 see also help for;
+#X text 280 494 the first outlet is the pivot-transformed matrix.;
+#X text 279 520 the other outlets are the 1/0-matrices that have to
+be pre-multiplied (row-tranform) and post-multiplied (column-tranform)
+to the original matrix to get the pivot-tranformation. this is useful
+for de-pivoting.;
+#X text 281 445 this will tranform the columns and rows \, so that
+the result will have all maximum values in the diagonale. the maximum
+of the matrix will be located at the upper-left corner.;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
diff --git a/examples/tabread4.pd b/examples/tabread4.pd
deleted file mode 100644
index 8fff4e5..0000000
--- a/examples/tabread4.pd
+++ /dev/null
@@ -1,29 +0,0 @@
-#N canvas 0 0 884 549 8;
-#X obj 85 45 tabread4;
-#X text 87 96 "tabread4" is missing in the pd-distribution \, and i really don't know why \, because sometimes one might need it...;
-#X text 89 132 so here it is;
-#X msg 495 140 \; readout 1 \; array99 resize 10 \; array99 bounds 0 0 10 10 \; array99 xlabel -0.5 0 1 2 3 4 5 6 7 8 9 10 \; array99 ylabel -1 0 1 2 3 4 5 6 7 8 9 10 \; array99 0 1 4 2 8 5 6 1 4 2 8;
-#X floatatom 204 185;
-#X floatatom 204 351;
-#X text 242 369 output = array99[index];
-#X text 323 303 creation argument;
-#X text 323 318 gives array name;
-#X msg 214 277 set array99;
-#X text 303 278 change array name;
-#X obj 204 317 tabread4 array99;
-#X graph graph1 0 0 10 10 504 467 754 267;
-#X array array99 10 float;
-#X pop;
-#X obj 94 317 tabread array99;
-#X floatatom 94 356;
-#X text -7 335 this is how it was;
-#X msg 214 255 help;
-#X text 235 184 index (try non-integer :: 1.5);
-#X obj 495 119 loadbang;
-#X connect 4 0 11 0;
-#X connect 4 0 13 0;
-#X connect 9 0 11 0;
-#X connect 11 0 5 0;
-#X connect 13 0 14 0;
-#X connect 16 0 11 0;
-#X connect 18 0 3 0;