diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/0.INTRO.txt | 36 | ||||
-rw-r--r-- | examples/sum.pd | 13 | ||||
-rw-r--r-- | examples/tabminmax.pd | 35 |
3 files changed, 53 insertions, 31 deletions
diff --git a/examples/0.INTRO.txt b/examples/0.INTRO.txt index 1af8c61..242fd54 100644 --- a/examples/0.INTRO.txt +++ b/examples/0.INTRO.txt @@ -37,7 +37,6 @@ sgn~ signum of a signal 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
@@ -62,23 +61,27 @@ atoi ascii to integer strcmp compare lists as strings
list2symbol convert a list into a single symbol
symbol2list convert a symbol to a list
+fifop list FIFO with priorities
+lifop list LIFO with priorities
------------------------ advanced ------------------------------
tabdump dump out a table as a list of floats
tabset set a table with a list of floats
+tabminman get minimum and maximum of a table
makesymbol concatenate lists to formatted symbols
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)
+lpt write to the (parallel) port
operating_system get the current OS
-------------------------- maths --------------------------------
mavg moving average filter for floats
mean get the mean value of a list of floats
+sum get the sum of a list of floats
minmax get minimum and maximum of a list of floats
sort shell-sort a list of floats
urn unique random numbers
@@ -89,32 +92,3 @@ 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
-mtx_element set elements of a matrix
-mtx_row set rows of a matrix
-mtx_col set columns of a matrix
-mtx_ones matrix with all elements==1
-mtx_zeros matrix with all elements==0
-mtx_eye identity matrix
-mtx_egg identity matrix (from upper-right to lower-left)
-mtx_diag diagonal matrix
-mtx_diegg diagonal matrix (from upper-right to lower-left)
-mtx_diag get the diagonal of a matrix
-mtx_trace get the trace of a matrix
-mtx_transpose transpose a matrix
-mtx_roll column-shift a matrix
-mtx_scroll row-shift a matrix
-mtx_pivot pivot-transform a matrix
-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
-mtx_mean get the mean value of each column
-mtx_rand matrix with random elements
-mtx_check check the consistency of a matrix and repair
-mtx_print print a matrix to the stderr
\ No newline at end of file diff --git a/examples/sum.pd b/examples/sum.pd new file mode 100644 index 0000000..1be9378 --- /dev/null +++ b/examples/sum.pd @@ -0,0 +1,13 @@ +#N canvas 231 541 421 294 10; +#X floatatom 72 206 4 0 0 0 - - -; +#X text 324 19 part of zexy; +#X obj 72 186 sum; +#X obj 77 40 sum; +#X text 109 41 sum the elements of a list; +#X msg 72 79 1; +#X msg 83 108 1 2 3 4 5 6 7 8 9 10; +#X msg 93 141 1000 3 2 -100 2 12; +#X connect 2 0 0 0; +#X connect 5 0 2 0; +#X connect 6 0 2 0; +#X connect 7 0 2 0; diff --git a/examples/tabminmax.pd b/examples/tabminmax.pd new file mode 100644 index 0000000..f2514d0 --- /dev/null +++ b/examples/tabminmax.pd @@ -0,0 +1,35 @@ +#N canvas 293 375 861 353 10; +#N canvas 0 0 450 300 graph2 0; +#X array my_array66 5 float 0; +#X array my_array77 8 float 0; +#X coords 0 1 8 -1 200 140 1; +#X restore 653 87 graph; +#X obj 493 208 loadbang; +#X msg 83 100 bang; +#X msg 133 148 set my_array77; +#X msg 493 234 \; my_array66 resize 5 \; my_array77 resize 8 \; my_array66 +0.1 0.3 0.2 0.5 0.2 -0.1 \; my_array77 0.1 0.1 0.2 0.3 0.5 0.8 0.13 +0.21 0.34; +#X msg 132 126 set my_array66; +#X text 648 24 part of zexy; +#X obj 176 22 tabminmax; +#X text 256 24 get the minimum and the maximum of a table; +#X obj 83 168 tabminmax my_array66; +#X obj 83 192 unpack; +#X floatatom 83 217 0 0 0 0 minimum - -; +#X floatatom 120 218 2 0 0 3 idx - -; +#X obj 213 192 unpack; +#X floatatom 213 217 0 0 0 0 maximum - -; +#X floatatom 250 218 2 0 0 3 idx - -; +#X text 149 81 additionally this object gets the indices of the maxima. +; +#X connect 1 0 4 0; +#X connect 2 0 9 0; +#X connect 3 0 9 0; +#X connect 5 0 9 0; +#X connect 9 0 10 0; +#X connect 9 1 13 0; +#X connect 10 0 11 0; +#X connect 10 1 12 0; +#X connect 13 0 14 0; +#X connect 13 1 15 0; |