diff options
-rw-r--r-- | examples/drip.pd | 60 | ||||
-rw-r--r-- | src/zexy.c | 36 | ||||
-rw-r--r-- | src/zexy.h | 2 | ||||
-rw-r--r-- | zexy.pd | 347 |
4 files changed, 203 insertions, 242 deletions
diff --git a/examples/drip.pd b/examples/drip.pd index 4bf4cfc..7015729 100644 --- a/examples/drip.pd +++ b/examples/drip.pd @@ -1,4 +1,4 @@ -#N canvas 340 54 854 849 10; +#N canvas 139 0 872 747 10; #X msg 30 108 come on \, my house; #X obj 30 210 print UNFOLDED; #X msg 48 135 1 two tre quatre 5 se; @@ -22,35 +22,33 @@ is: output all the atoms at once); #X obj 248 592 drip -10; #X obj 248 621 print DESCHED; #X msg 248 556 bang; -#X obj 639 805 unfold; -#X text 423 770 for historical reasons (finding no proper object-name...) -we still provide the obsolete alias; #X text 44 27 unfolds a package to a sequence; #X text 43 50 since you can switch to scheduled mode \, this might be used to reduce CPU-load; -#X text 55 817 see also :; -#X obj 127 819 repack; +#X text 530 672 see also :; +#X obj 602 674 repack; #X obj 35 299 t l l b; -#X obj 151 350 t l l; -#X obj 35 375 unfold 200 flush; -#X obj 141 375 unfold 200; -#X obj 151 309 del 250; +#X obj 181 350 t l l; +#X obj 181 309 del 250; #X msg 35 280 list some atoms could be saved while others; -#X msg 151 329 list might get lost; -#X obj 35 412 print TIGHT; -#X obj 141 413 print LOOSE; -#X obj 35 393 pipe s 1500; +#X msg 181 329 list might get lost; +#X obj 35 422 print TIGHT; +#X obj 171 413 print LOOSE; +#X obj 35 403 pipe s 1500; #X text 411 309 creation:; #X text 475 309 "drip [<n> [flush]]"; -#X text 457 397 <n> is the initial drop-delay in [ms]; -#X text 452 333 "flush" indicates whether non-empty buffers should +#X text 447 397 <n> is the initial drop-delay in [ms]; +#X text 442 333 "flush" indicates whether non-empty buffers should be flushed when a new package arrives or not.; -#X text 453 362 default is no_flush; -#X text 457 430 n==0 will DO scheduling (and is therefore somewhat +#X text 443 362 default is no_flush; +#X text 447 430 n==0 will DO scheduling (and is therefore somewhat "slower" than without arguments; -#X text 455 415 default is NO scheduling; -#X text 456 465 negative values for <n> turn off scheduling; -#X text 717 13 part of zexy; +#X text 445 415 default is NO scheduling; +#X text 446 465 negative values for <n> turn off scheduling; +#X obj 35 375 drip 200 flush; +#X obj 171 375 drip 200; +#X text 717 13 part of; +#X obj 776 13 zexy; #X connect 0 0 4 0; #X connect 2 0 4 0; #X connect 4 0 1 0; @@ -64,14 +62,14 @@ be flushed when a new package arrives or not.; #X connect 15 1 13 0; #X connect 18 0 19 0; #X connect 20 0 18 0; +#X connect 25 0 41 0; +#X connect 25 1 42 0; +#X connect 25 2 27 0; +#X connect 26 0 41 0; +#X connect 26 1 42 0; #X connect 27 0 29 0; -#X connect 27 1 30 0; -#X connect 27 2 31 0; -#X connect 28 0 29 0; -#X connect 28 1 30 0; -#X connect 29 0 36 0; -#X connect 30 0 35 0; -#X connect 31 0 33 0; -#X connect 32 0 27 0; -#X connect 33 0 28 0; -#X connect 36 0 34 0; +#X connect 28 0 25 0; +#X connect 29 0 26 0; +#X connect 32 0 30 0; +#X connect 41 0 32 0; +#X connect 42 0 31 0; @@ -4,7 +4,7 @@ * * copyleft (c) IOhannes m zmölnig * - * 1999:forum::für::umläute:2004 + * 1999:forum::für::umläute:2005 * * institute of electronic music and acoustics (iem) * @@ -58,7 +58,6 @@ static void zexy_help(void) "\n%c multary operations on signals" - "\nmatrix~\t\t:: handle matrices" "\nmultiline~\t:: multiple line~ multiplication" "\nmultiplex~\t:: multiplex 1 inlet~ to 1-of-various outlet~s" "\ndemultiplex~\t:: demultiplex 1-of-various inlet~s to 1 outlet~" @@ -111,39 +110,6 @@ static void zexy_help(void) "\nwrap\t\t:: wrap a floating number between 2 limits" "\nurn\t\t:: unique random numbers" "\noperating_system\t:: information on the OS" -#if 0 - "\nexecute\t\t:: execute an application" -#endif - - "\n%c matrix message objects" - - "\nmatrix\t\t:: create/store/edit matrices" - - "\nmtx_element\t:: change elements of a matrix" - "\nmtx_row\t\t:: change rows of a matrix" - "\nmtx_col\t\t:: change columns of a matrix" - "\nmtx_eye\t\t:: create an identity matrix" - "\nmtx_egg\t\t:: create an identity matrix that is rotated by 90deg" - "\nmtx_zeros\t:: create a matrix whose elements are all 1" - "\nmtx_ones\t:: create a matrix whose elements are all 0" - "\nmtx_diag\t:: returns the diagonal of a matrix or create a diagonal matrix" - "\nmtx_dieggt:: like mtx_diag but rotated by 90deg" - "\nmtx_trace\t:: calculate the trace of a matrix" - "\nmtx_size\t:: returns the size of a matrix" - "\nmtx_resize\t:: resize a matrix (evt. with zero-padding)" - "\nmtx_transpose\t:: transpose a matrix" - "\nmtx_scroll\t:: shift the rows of a matrix" - "\nmtx_roll\t:: shift the columns of a matrix" - "\nmtx_pivot\t:: pivot-transform a matrix" - "\nmtx_add\t\t:: add matrices" - "\nmtx_mul\t\t:: multiply matrices" - "\nmtx_.*\t\t:: multiply matrices element by element" - "\nmtx_./\t\t:: divide matrices element by element" - "\nmtx_inverse\t:: calculate the inverse of a matrix" - "\nmtx_mean\t:: return the mean value of each column" - "\nmtx_rand\t:: fill a matrix with random values" - "\nmtx_check\t:: check the consistency of a matrix and correct if necessary" - "\nmtx_print\t:: print formatted matrix to the stdout (for debug)" "\n\n(l) forum::für::umläute except where indicated (%c)\n" "this software is under the GnuGPL that is provided with these files", HEARTSYMBOL, HEARTSYMBOL, HEARTSYMBOL, HEARTSYMBOL, HEARTSYMBOL, HEARTSYMBOL, HEARTSYMBOL, HEARTSYMBOL, HEARTSYMBOL, HEARTSYMBOL, HEARTSYMBOL, HEARTSYMBOL); @@ -38,7 +38,7 @@ #include "m_pd.h" #include <math.h> -#define VERSION "2.0" +#define VERSION "2.1" #ifdef __WIN32__ @@ -1,8 +1,6 @@ -#N canvas 236 146 761 706 10; +#N canvas 116 59 745 601 10; #X obj 101 83 zexy; #X msg 101 59 help; -#X text 430 82 bug-reports: zmoelnig@iem.kug.ac.at; -#X text 428 66 (c) forum::für::umlute 1999-2001; #N canvas 259 142 708 221 io~ 0; #X obj 41 184 sfplay; #X obj 137 185 sfrecord; @@ -30,7 +28,7 @@ #X connect 3 0 7 0; #X connect 4 0 6 0; #X restore 74 212 pd generators~; -#N canvas 362 224 638 326 processing~ 0; +#N canvas 362 224 657 505 processing~ 0; #X obj 52 93 limiter~; #X obj 51 143 quantize~; #X obj 52 193 swap~; @@ -43,17 +41,27 @@ #X text 281 186 byte-swapps a 16bit signal; #X obj 55 254 z~; #X msg 55 231 help; -#X text 245 228 a samplewise delay \, great for designing FIR-filters; +#X text 245 228 a samplewise delay \, great for designing FIR-filters +; #X text 253 247 (you cannot use it for IIR-filters !); +#X obj 62 336 blockswap~; +#X msg 62 314 help; +#X text 244 339 swap upper and lower part of a signal-block; +#X msg 62 374 help; +#X obj 62 396 blockmirror~; +#X text 244 399 revert a signal-block (play it back reversely); #X connect 3 0 1 0; #X connect 4 0 0 0; #X connect 5 0 2 0; #X connect 11 0 10 0; +#X connect 15 0 14 0; +#X connect 17 0 18 0; #X restore 74 236 pd processing~; #N canvas 319 68 585 573 analytic~ 0; #X obj 26 173 sigzero~; #X msg 26 151 help; -#X text 164 171 detects whether a signal-block is zero throughout or not; +#X text 164 171 detects whether a signal-block is zero throughout or +not; #X obj 25 236 pdf~; #X msg 25 213 help; #X text 165 237 get the probability density function of a signal; @@ -64,7 +72,8 @@ #X msg 27 282 help; #X msg 28 335 help; #X msg 29 386 help; -#X text 158 300 the same as env~ \, except that this outputs rms instead of dB; +#X text 158 300 the same as env~ \, except that this outputs rms instead +of dB; #X text 158 356 arithmetic mean of one signal~vector; #X text 161 407 arithmetic mean between two bangs; #X msg 31 448 help; @@ -80,25 +89,23 @@ #N canvas 299 114 664 548 others~ 0; #X obj 31 70 nop~; #X msg 31 48 help; -#X text 246 63 do_nothing but delay for one-block (useful for synchronising); +#X text 246 63 do_nothing but delay for one-block (useful for synchronising) +; #X text 175 11 miscanellous signal~ objects; #X msg 31 127 help; #X obj 31 149 pack~; #X msg 77 128 help; #X obj 77 150 unpack~; -#X text 245 138 convert a signal to (packages of) floats and vice-versa; -#X obj 31 257 matrix~; -#X msg 31 236 help; +#X text 245 138 convert a signal to (packages of) floats and vice-versa +; #X msg 31 350 help; #X msg 32 394 help; #X obj 31 371 multiplex~; #X obj 32 415 demultiplex~; -#X msg 109 350 help; -#X msg 110 394 help; -#X obj 109 371 mux~; -#X obj 110 416 demux~; -#X text 240 237 matrix-multiply m IN~signals to n OUT~signals; -#X text 240 250 matrices are interpolated a la line~; +#X msg 129 350 help; +#X msg 130 393 help; +#X obj 129 371 mux~; +#X obj 130 415 demux~; #X text 245 416 multiplex 1 IN~signal to 1-of-n OUT~signals; #X text 246 369 multiplex 1-of-n IN~signals to 1 OUT~signal; #X msg 31 297 help; @@ -107,12 +114,11 @@ #X connect 1 0 0 0; #X connect 4 0 5 0; #X connect 6 0 7 0; -#X connect 10 0 9 0; -#X connect 11 0 13 0; -#X connect 12 0 14 0; -#X connect 15 0 17 0; -#X connect 16 0 18 0; -#X connect 23 0 24 0; +#X connect 9 0 11 0; +#X connect 10 0 12 0; +#X connect 13 0 15 0; +#X connect 14 0 16 0; +#X connect 19 0 20 0; #X restore 74 332 pd others~; #X text 289 183 alternative i/o-devices (harddisk \, net \, ...); #X text 288 207 useful signal generators; @@ -132,172 +138,163 @@ #X text 154 278 logical OR; #X obj 80 347 abs~; #X obj 80 375 sgn~; -#X text 158 348 absolute value (I think this is included at GEM too); +#X text 158 348 absolute value (I think this is included at GEM too) +; #X text 158 375 sign of a function; #X text 148 32 binary and math operators for signals~; #X restore 74 286 pd sigbinops~; -#X text 289 284 some mathematical and logical functions that were missing; -#N canvas 345 88 652 713 basic 0; +#X text 289 284 some mathematical and logical functions that were missing +; +#N canvas 266 0 630 542 basic 0; #X obj 41 28 nop; #X text 222 28 a do nothing - pass through everything; #X obj 41 85 lister; #X obj 98 86 l; #X text 216 87 store a list (like "float" \, "int" \, ...); #X text 83 86 ==; -#X obj 40 184 repack; -#X text 211 182 (re)packs atoms to packages of a given size; -#X obj 40 215 packel; -#X text 209 212 the specified element of a list; -#X obj 39 256 niagara; -#X text 214 255 split 1 package into 2 at a specifique point; +#X obj 40 244 repack; +#X text 211 242 (re)packs atoms to packages of a given size; +#X obj 40 275 packel; +#X text 209 272 the specified element of a list; +#X obj 39 316 niagara; +#X text 214 315 split 1 package into 2 at a specifique point; #X obj 43 464 segregate; -#X text 210 463 segregates the input to various outputs depending on the type; +#X text 210 463 segregates the input to various outputs depending on +the type; #X text 210 117 convert anythings to lists; -#X obj 53 626 matrix; -#X text 211 626 store/create/... matrices; -#X obj 39 336 list2int; -#X text 94 337 ==; -#X obj 112 337 l2i; -#X text 207 339 cast each float of a list/anything to an integer; #X obj 41 115 any2list; -#X text 98 117 ==; -#X obj 116 117 a2l; -#X obj 41 375 atoi; -#X text 209 373 ascii to integer; -#X obj 39 155 length; -#X text 210 154 get the length of a list; -#X obj 41 291 glue; -#X text 216 285 append a list to another; +#X text 101 115 ==; +#X obj 119 115 a2l; +#X obj 39 215 length; +#X text 210 214 get the length of a list; +#X obj 41 351 glue; +#X text 216 345 append a list to another; #X obj 42 409 list2symbol; -#X text 114 412 ==; -#X obj 129 411 l2s; +#X text 123 410 ==; +#X obj 140 409 l2s; #X text 207 410 convert a list into a single symbol; -#X restore 72 416 pd basic control; +#X obj 40 147 repeat 0; +#X text 211 148 repeat a message N-times; +#X restore 72 446 pd basic control; #N canvas 401 27 602 871 advanced 0; -#X obj 29 58 tabread4 table; -#X obj 28 189 makesymbol; -#X msg 28 167 help; -#X msg 29 39 help; -#X text 205 56 read out a table doing 4point-interpolation; -#X text 202 189 concatenate lists to formatted symbols; -#X msg 28 214 help; -#X obj 28 236 date; -#X msg 67 214 help; -#X obj 67 236 time; -#X text 201 233 get the current system date/time; -#X obj 28 289 index; -#X msg 28 264 help; -#X text 202 286 map symbols to indices; -#X text 163 565 (no "help"-message available...); -#X obj 28 643 demultiplex; -#X obj 114 643 demux; -#X text 99 644 ==; -#X text 199 644 demultiplex the inlet to a specified outlet; -#X obj 76 696 unfold; -#X obj 28 695 drip; -#X text 58 696 ==; -#X text 201 694 extract the atoms of a package (opt. scheduled); -#X obj 28 745 sort; -#X text 204 748 shell-sort a package of floats; -#X msg 28 338 help; -#X obj 28 362 msgfile; -#X text 197 360 a powerful "textfile" derivative; -#X obj 28 423 mavg; -#X msg 28 403 help; -#X text 200 427 a moving average filter; -#X msg 29 76 help; -#X obj 29 95 tabdump table; -#X text 205 93 dump a table as a list of floats; -#X obj 27 466 mean; -#X msg 27 447 help; -#X msg 26 487 help; -#X obj 26 506 minmax; -#X text 195 463 get the mean value of a list of floats (==vector); -#X text 194 503 get the minimum and the maximum of a vector; -#X obj 29 613 .; -#X text 199 615 scalar multiplication of 2 vectors; -#X msg 30 115 help; -#X obj 30 134 tabset table; -#X text 206 132 set a table with a list of floats; -#X obj 28 809 lp; -#X text 199 805 write data to the (parallel) port (linux only); -#X connect 2 0 1 0; -#X connect 3 0 0 0; -#X connect 6 0 7 0; -#X connect 8 0 9 0; +#X obj 28 129 makesymbol; +#X msg 28 107 help; +#X text 202 129 concatenate lists to formatted symbols; +#X msg 28 154 help; +#X obj 28 176 date; +#X msg 67 154 help; +#X obj 67 176 time; +#X text 201 173 get the current system date/time; +#X obj 28 229 index; +#X msg 28 207 help; +#X text 202 226 map symbols to indices; +#X text 166 384 (no "help"-message available...); +#X obj 28 433 demultiplex; +#X obj 128 433 demux; +#X text 109 434 ==; +#X text 199 434 demultiplex the inlet to a specified outlet; +#X obj 28 485 drip; +#X text 201 484 extract the atoms of a package (opt. scheduled); +#X msg 28 278 help; +#X obj 28 302 msgfile; +#X text 197 300 a powerful "textfile" derivative; +#X obj 28 629 lpt; +#X text 200 625 write data to the parallel port (line printer); +#X text 109 454 ==; +#X obj 28 453 multiplex; +#X obj 128 453 mux; +#X text 200 456 multiplex the specified inlet to the outlet; +#X obj 28 672 operating_system; +#X text 209 676 get the current operating system; +#X obj 31 553 fifop; +#X text 195 554 a FIFO (first-in-first-out) with Priorities; +#X obj 31 583 lifop; +#X text 195 584 a LIFO (last-in-first-out) with Priorities; +#X obj 28 350 strcmp; +#X text 194 354 compare to symbols with strcmp(); +#X connect 1 0 0 0; +#X connect 3 0 4 0; +#X connect 5 0 6 0; +#X connect 9 0 8 0; +#X connect 18 0 19 0; +#X restore 73 478 pd advanced control; +#X text 285 477 some more complex control objects (systime \, tabread4 +\, ...); +#X text 282 446 some useful control objects (nop...); +#X text 288 567 objects to work with matrices (moved to IEMMATRIX) +; +#N canvas 221 231 583 258 matrix 0; +#X obj 224 173 iemmatrix; +#X text 109 52 zexy>=2.0 no longer has any matrix-objects.; +#X text 109 72 instead \, these objects are now in a separate library +"iemmatrix" \, dedicated solely to manipulation of 2D-matrices.; +#X text 185 171 use; +#X restore 73 570 pd matrix; +#N canvas 0 0 616 602 numeric 0; +#X obj 39 46 list2int; +#X text 94 47 ==; +#X obj 112 47 l2i; +#X obj 41 85 atoi; +#X text 207 49 cast each float of a list/anything to an integer; +#X text 209 83 ascii to integer; +#X obj 42 435 sort; +#X text 208 438 shell-sort a package of floats; +#X obj 42 303 mavg; +#X msg 42 283 help; +#X text 214 307 a moving average filter; +#X obj 41 346 mean; +#X msg 41 327 help; +#X msg 40 367 help; +#X obj 40 386 minmax; +#X text 209 343 get the mean value of a list of floats (==vector); +#X text 208 383 get the minimum and the maximum of a vector; +#X obj 43 223 .; +#X text 209 225 scalar multiplication of 2 vectors; +#X obj 43 158 prime; +#X text 200 162 check whether a number is prime; +#X obj 43 259 sum; +#X text 194 252 elementwise sum of a list; +#X obj 44 137 wrap; +#X text 196 139 wrap a number between an upper and a lower bound; +#X obj 50 505 urn; +#X text 199 502 Unique-Random-Numbers: get random numbers from an urn +; +#X connect 9 0 8 0; #X connect 12 0 11 0; -#X connect 25 0 26 0; -#X connect 29 0 28 0; -#X connect 31 0 32 0; -#X connect 35 0 34 0; -#X connect 36 0 37 0; -#X connect 42 0 43 0; -#X restore 71 446 pd advanced control; -#X text 283 442 some more complex control objects (systime \, tabread4 \, ...); -#X text 282 416 some useful control objects (nop...); -#N canvas 201 65 784 833 matrix 0; -#X obj 74 10 matrix; -#X obj 123 10 mtx; -#X text 188 10 create/store/... matrices; -#X obj 75 128 mtx_eye; -#X obj 75 169 mtx_ones; -#X obj 75 193 mtx_zeros; -#X obj 75 213 mtx_diag; -#X obj 74 262 mtx_trace; -#X obj 69 557 mtx_mul; -#X obj 142 558 mtx_*; -#X obj 68 584 mtx_mul 0; -#X obj 141 586 mtx_* 0; -#X obj 194 586 mtx_.* 0; -#X obj 68 609 mtx_.*; -#X obj 70 494 mtx_add; -#X obj 143 495 mtx_+; -#X obj 70 516 mtx_add 0; -#X obj 143 517 mtx_+ 0; -#X obj 74 288 mtx_transpose; -#X obj 65 707 mtx_check; -#X obj 65 736 mtx_print; -#X text 281 121 identity matrix; -#X text 286 162 matrix (all elements == 1); -#X text 286 185 matrix (all elements == 0); -#X text 282 205 create diagonal matrix out of the diagonal-vector; -#X text 282 216 return the diagonal-vector of a matrix; -#X text 281 256 return the trace of a matrix; -#X text 280 296 transpose a matrix; -#X text 281 489 add two matrices; -#X text 280 513 add a scalar two a matrix; -#X text 293 556 mutiply two matrices; -#X text 292 580 multiply a matrix with a scalar; -#X text 290 609 mutiply two matrices alement by element; -#X text 286 702 check the consistency of a matrix and regenerate it; -#X text 282 734 print a matrix to the stderr; -#X obj 74 40 mtx_element; -#X obj 74 63 mtx_row; -#X obj 74 86 mtx_col; -#X obj 74 400 mtx_resize; -#X obj 73 422 mtx_size; -#X text 284 421 get the size of a matrix; -#X text 283 403 resize a matrix; -#X text 287 38 set elements of a matrix; -#X text 286 61 set rows of a matrix; -#X text 285 87 set columns of a matrix; -#X obj 66 644 mtx_mean; -#X obj 65 671 mtx_rand; -#X text 290 642 get the mean value of each column; -#X text 287 670 fill a matrix with random values; -#X obj 75 149 mtx_egg; -#X text 285 145 identity matrix with rectangular diagonale; -#X obj 75 233 mtx_diegg; -#X text 281 233 like mtx_diag \, but with the diagonale flipped for 90deg; -#X obj 71 455 mtx_inverse; -#X text 277 452 calculate the inverse of a matrix; -#X obj 73 311 mtx_scroll; -#X text 280 316 shift the rows of a matrix; -#X obj 73 330 mtx_roll; -#X text 280 335 shift the column of a matrix; -#X obj 72 363 mtx_pivot; -#X text 281 359 pivot-transform a matrix; -#X restore 69 500 pd matrix control; -#X text 284 497 some objects to work with matrices; -#X text 228 7 the zexy external v1.0; +#X connect 13 0 14 0; +#X restore 71 378 pd numeric objects; +#X text 282 376 objects dealing with numbers; +#N canvas 306 127 571 219 tables 0; +#X msg 29 16 help; +#X obj 29 35 tabdump table; +#X text 205 33 dump a table as a list of floats; +#X msg 30 55 help; +#X obj 30 74 tabset table; +#X text 206 72 set a table with a list of floats; +#X msg 29 106 help; +#X obj 29 125 tabminmax table; +#X text 208 128 get minimum and maximum; +#X connect 0 0 1 0; +#X connect 3 0 4 0; +#X connect 6 0 7 0; +#X restore 73 508 pd tables; +#X text 288 517 objects to work on tables; +#N canvas 0 0 701 577 conversions 0; +#X obj 65 95 cart2sph; +#X obj 65 115 cart2pol; +#X obj 65 155 sph2pol; +#X obj 65 175 sph2cart; +#X obj 65 224 pol2cart; +#X obj 65 247 pol2sph; +#X text 84 67 coordinate-conversion; +#X text 186 168 convert between Cartesian \, polar and spherical corrdinates +; +#X obj 72 334 deg2rad; +#X obj 72 362 rad2deg; +#X text 146 350 convert between degree and radiant; +#X restore 72 402 pd conversions; +#X text 279 406 numeric conversion (coordinates \, angles \, ...); +#X text 228 7 the zexy external v2.1; +#X text 429 66 (c) forum::für::umlute 1999-2005; +#X text 430 82 bug-reports: zmoelnig-AT-iem.at; #X connect 1 0 0 0; |