diff options
-rw-r--r-- | externals/grill/vasp/changes.txt | 5 | ||||
-rwxr-xr-x | externals/grill/vasp/pd-ex/granular1.pd | 670 | ||||
-rw-r--r-- | externals/grill/vasp/pd-ex/granular2.pd | 380 | ||||
-rw-r--r-- | externals/grill/vasp/pd-help/vasp_set.pd | 17 | ||||
-rw-r--r-- | externals/grill/vasp/source/buflib.cpp | 22 | ||||
-rw-r--r-- | externals/grill/vasp/source/buflib.h | 4 | ||||
-rw-r--r-- | externals/grill/vasp/source/classes.cpp | 3 | ||||
-rw-r--r-- | externals/grill/vasp/source/main.cpp | 4 | ||||
-rw-r--r-- | externals/grill/vasp/source/main.h | 4 | ||||
-rw-r--r-- | externals/grill/vasp/source/obj_frames.cpp | 2 | ||||
-rw-r--r-- | externals/grill/vasp/vasp.cw | bin | 120144 -> 142172 bytes |
11 files changed, 758 insertions, 353 deletions
diff --git a/externals/grill/vasp/changes.txt b/externals/grill/vasp/changes.txt index 0b3abf59..dea15217 100644 --- a/externals/grill/vasp/changes.txt +++ b/externals/grill/vasp/changes.txt @@ -1,5 +1,10 @@ Version history: +0.1.2: +- FIX: bug in vasp.frames* ... wrong argument +- FIX: another bug in resize of immediate buffers +- CHANGE: immediates will be initialized to zero, also upon resize to a larger size (by default, later make this optional) + 0.1.1: - FIX: bug in resize of immediate buffers - CHANGE: check (at actual operation!) whether vector exceeds buffer size (GetRVecs, GetCVecs -> corrlen) diff --git a/externals/grill/vasp/pd-ex/granular1.pd b/externals/grill/vasp/pd-ex/granular1.pd index c2ef29d4..2a601fc0 100755 --- a/externals/grill/vasp/pd-ex/granular1.pd +++ b/externals/grill/vasp/pd-ex/granular1.pd @@ -1,329 +1,341 @@ -#N canvas 62 0 622 487 10; -#N canvas 0 0 450 300 graph34 0; -#X array insert 64 float 1; -#A 0 1 0.55557 -0.382683 -0.980785 -0.707107 0.19509 0.92388 0.83147 -1.17033e-007 -0.83147 -0.92388 -0.19509 0.707107 0.980785 0.382684 --0.55557 -1 -0.55557 0.382683 0.980785 0.707107 -0.19509 -0.923879 --0.83147 -3.511e-007 0.831469 0.92388 0.195091 -0.707106 -0.980785 --0.382684 0.55557 1 0.555571 -0.382683 -0.980785 -0.707107 0.19509 -0.923879 0.83147 5.85167e-007 -0.831469 -0.92388 -0.195091 0.707106 -0.980785 0.382684 -0.55557 -1 -0.555571 0.382683 0.980785 0.707107 --0.19509 -0.923879 -0.83147 -8.19234e-007 0.831469 0.92388 0.195091 --0.707106 -0.980785 -0.382684 0.555569; -#X coords 0 1 63 -1 200 140 1; -#X restore 78 68 graph; -#N canvas 374 102 510 487 player 0; -#X obj 112 139 tabplay~ schnipparray; -#X obj 148 240 tabplay~ schnipparray; -#X obj 204 337 tabplay~ schnipparray; -#X obj 112 163 throw~ toex; -#X obj 148 259 throw~ toex; -#X obj 204 361 throw~ toex; -#X msg 112 119 0 64; -#X msg 148 220 64 64; -#X msg 205 317 128 64; -#X obj 86 64 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 86 91 spigot; -#X obj 233 161 t b b; -#X obj 427 276 s \$0-part; -#X obj 269 262 t b b; -#X obj 325 361 t b b; -#X msg 258 182 3; -#X msg 294 282 1; -#X msg 350 388 2; -#X obj 86 40 inlet; -#X connect 0 0 3 0; -#X connect 0 1 11 0; -#X connect 1 0 4 0; -#X connect 1 1 13 0; -#X connect 2 0 5 0; -#X connect 2 1 14 0; -#X connect 6 0 0 0; -#X connect 7 0 1 0; -#X connect 8 0 2 0; -#X connect 9 0 10 1; -#X connect 9 0 10 0; -#X connect 10 0 6 0; -#X connect 11 0 7 0; -#X connect 11 1 15 0; -#X connect 13 0 8 0; -#X connect 13 1 16 0; -#X connect 14 0 10 0; -#X connect 14 1 17 0; -#X connect 15 0 12 0; -#X connect 16 0 12 0; -#X connect 17 0 12 0; -#X connect 18 0 9 0; -#X restore 204 294 pd player; -#X obj 204 348 catch~ toex; -#X obj 204 403 dac~; -#X floatatom 76 311 0 0 0 0 - - -; -#X obj 76 271 nbx 5 14 -1e+037 1e+037 0 1 empty empty empty 0 -6 0 -10 -24198 -1 -1 2 256; -#X text 76 253 density; -#X obj 76 333 s \$0-density; -#X obj 204 275 tgl 15 0 empty empty start/stop 0 -6 0 8 -24198 -1 -1 -0 1; -#X text 319 80 this array is insertet at triggering points; -#X obj 76 290 * 0.001; -#X floatatom 241 429 0 0 0 0 - - -; -#X obj 241 407 env~ 32768; -#N canvas 0 0 350 219 inside 0; -#X obj 41 63 table positions; -#X obj 40 37 table schnipparray 192; -#N canvas 0 0 460 310 create_schippler 0; -#X msg 155 114 vasp insert; -#X obj 155 162 vasp.u; -#X obj 155 138 vasp.osc 6.4; -#X msg 66 114 vasp insert; -#X obj 66 162 vasp.u; -#X obj 66 138 vasp.osc 64; -#X msg 251 115 vasp insert; -#X obj 251 163 vasp.u; -#X obj 251 139 vasp.osc 2; -#X text 56 71 create various samples to insert; -#X msg 63 216 vasp insert; -#X obj 63 261 vasp.u; -#X obj 63 239 vasp.window; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 5 0 4 0; -#X connect 6 0 8 0; -#X connect 8 0 7 0; -#X connect 10 0 12 0; -#X connect 12 0 11 0; -#X restore 43 113 pd create_schippler; -#N canvas 0 0 642 330 inserter 0; -#X obj 48 84 sel 1 2 3; -#N canvas 2 7 397 657 first_part 0; -#X obj 48 483 tabread positions; -#X obj 48 172 vasp.noise; -#X obj 48 149 vasp.! 64; -#X obj 48 238 vasp.??; -#X obj 48 192 vasp.abs; -#X obj 48 215 vasp.< 0.1; -#X obj 48 262 route list; -#X text 58 501 insert a soundfile at certain offset-position; -#X msg 48 525 vasp 64 schnipparray \$1; -#X text 111 552 fuer drei teilbereiche; -#X obj 48 551 vasp.o+ 0; -#X obj 48 586 vasp.+ vasp insert; -#X obj 48 120 t b b; -#X obj 126 146 vasp.= 0; -#X obj 48 70 inlet; -#X obj 103 192 r \$0-density; -#X msg 162 326 \; positions resize \$1; -#X obj 80 362 tabset positions; -#X obj 48 387 0; -#X obj 48 411 until; -#X obj 90 436 + 1; -#X obj 48 436 0; -#X msg 72 386 0; -#X obj 97 310 length; -#X obj 48 460 t f f; -#X obj 97 331 t f f; -#X obj 48 288 t b b l l; -#X msg 126 124 vasp 64 schnipparray; -#X connect 0 0 8 0; -#X connect 1 0 4 0; -#X connect 2 0 1 0; -#X connect 3 0 6 0; -#X connect 4 0 5 0; -#X connect 5 0 3 0; -#X connect 6 0 26 0; -#X connect 8 0 10 0; -#X connect 10 0 11 0; -#X connect 12 0 2 0; -#X connect 12 1 27 0; -#X connect 14 0 12 0; -#X connect 15 0 5 1; -#X connect 18 0 19 0; -#X connect 19 0 21 0; -#X connect 20 0 21 1; -#X connect 21 0 24 0; -#X connect 22 0 21 1; -#X connect 23 0 25 0; -#X connect 24 0 0 0; -#X connect 24 1 20 0; -#X connect 25 0 18 1; -#X connect 25 1 16 0; -#X connect 26 0 18 0; -#X connect 26 1 22 0; -#X connect 26 2 17 0; -#X connect 26 3 23 0; -#X connect 27 0 13 0; -#X restore 48 183 pd first_part; -#N canvas 162 22 375 655 second_part 0; -#X obj 48 483 tabread positions; -#X obj 48 172 vasp.noise; -#X obj 48 149 vasp.! 64; -#X obj 48 238 vasp.??; -#X obj 48 192 vasp.abs; -#X obj 48 215 vasp.< 0.1; -#X obj 48 262 route list; -#X text 58 501 insert a soundfile at certain offset-position; -#X msg 48 525 vasp 64 schnipparray \$1; -#X text 124 552 fuer drei teilbereiche; -#X obj 48 586 vasp.+ vasp insert; -#X obj 48 120 t b b; -#X obj 126 146 vasp.= 0; -#X obj 48 70 inlet; -#X obj 48 551 vasp.o+ 64; -#X obj 103 192 r \$0-density; -#X msg 162 323 \; positions resize \$1; -#X obj 80 359 tabset positions; -#X obj 48 384 0; -#X obj 48 408 until; -#X obj 90 433 + 1; -#X obj 48 433 0; -#X msg 72 383 0; -#X obj 97 307 length; -#X obj 48 457 t f f; -#X obj 97 328 t f f; -#X obj 48 285 t b b l l; -#X msg 126 124 vasp 64 schnipparray 64; -#X connect 0 0 8 0; -#X connect 1 0 4 0; -#X connect 2 0 1 0; -#X connect 3 0 6 0; -#X connect 4 0 5 0; -#X connect 5 0 3 0; -#X connect 6 0 26 0; -#X connect 8 0 14 0; -#X connect 11 0 2 0; -#X connect 11 1 27 0; -#X connect 13 0 11 0; -#X connect 14 0 10 0; -#X connect 15 0 5 1; -#X connect 18 0 19 0; -#X connect 19 0 21 0; -#X connect 20 0 21 1; -#X connect 21 0 24 0; -#X connect 22 0 21 1; -#X connect 23 0 25 0; -#X connect 24 0 0 0; -#X connect 24 1 20 0; -#X connect 25 0 18 1; -#X connect 25 1 16 0; -#X connect 26 0 18 0; -#X connect 26 1 22 0; -#X connect 26 2 17 0; -#X connect 26 3 23 0; -#X connect 27 0 12 0; -#X restore 191 181 pd second_part; -#N canvas 323 1 606 693 third_part 0; -#X msg 155 289 \; positions resize \$1; -#X obj 73 325 tabset positions; -#X obj 41 350 0; -#X obj 41 374 until; -#X obj 83 399 + 1; -#X obj 41 399 0; -#X obj 41 445 tabread positions; -#X msg 65 349 0; -#X obj 41 134 vasp.noise; -#X obj 41 111 vasp.! 64; -#X obj 41 200 vasp.??; -#X obj 41 154 vasp.abs; -#X obj 41 177 vasp.< 0.1; -#X obj 90 273 length; -#X obj 41 423 t f f; -#X obj 41 224 route list; -#X obj 41 642 vasp.+ vasp insert; -#X obj 41 82 t b b; -#X obj 119 108 vasp.= 0; -#X obj 41 52 inlet; -#X obj 96 154 r \$0-density; -#X text 177 107 (clears second part); -#X text 101 502 sample-length; -#X obj 72 526 - 0; -#X text 103 526 minus offset; -#X obj 41 584 vasp.f; -#X text 91 586 that's the space you have; -#X text 292 215 this part has to write "around the corner"; -#X msg 41 548 vasp 64 schnipparray \$1; -#X obj 300 551 + 0; -#X text 339 526 frames; -#X text 339 550 plus offset; -#X obj 300 597 - 192; -#X text 344 594 minus sample-length; -#X obj 300 643 vasp.+ vasp insert; -#X msg 300 619 vasp \$1 schnipparray; -#X text 177 642 insert at end; -#X text 300 670 insert at beginning; -#X obj 300 574 + 128; -#X text 343 572 for third part; -#X obj 300 528 64; -#X obj 90 294 t f f; -#X obj 41 251 t b b l l; -#X obj 41 467 t f b f b f; -#X obj 72 500 64; -#X msg 119 86 vasp 64 schnipparray 128; -#X connect 2 0 3 0; -#X connect 3 0 5 0; -#X connect 4 0 5 1; -#X connect 5 0 14 0; -#X connect 6 0 43 0; -#X connect 7 0 5 1; -#X connect 8 0 11 0; -#X connect 9 0 8 0; -#X connect 10 0 15 0; -#X connect 11 0 12 0; -#X connect 12 0 10 0; -#X connect 13 0 41 0; -#X connect 14 0 6 0; -#X connect 14 1 4 0; -#X connect 15 0 42 0; -#X connect 17 0 9 0; -#X connect 17 1 45 0; -#X connect 19 0 17 0; -#X connect 20 0 12 1; -#X connect 23 0 25 1; -#X connect 25 0 16 0; -#X connect 28 0 25 0; -#X connect 29 0 38 0; -#X connect 32 0 35 0; -#X connect 35 0 34 0; -#X connect 38 0 32 0; -#X connect 40 0 29 0; -#X connect 41 0 2 1; -#X connect 41 1 0 0; -#X connect 42 0 2 0; -#X connect 42 1 7 0; -#X connect 42 2 1 0; -#X connect 42 3 13 0; -#X connect 43 0 28 0; -#X connect 43 1 44 0; -#X connect 43 2 23 1; -#X connect 43 3 40 0; -#X connect 43 4 29 1; -#X connect 44 0 23 0; -#X connect 45 0 18 0; -#X restore 336 183 pd third_part; -#X obj 48 55 r \$0-part; -#X text 50 33 after a sample-part is played \, next step is calculated -; -#X text 296 84 1) generate noise \; 2) get triggering-values \; 3) -...save in positions-array \; 4) read samplevalues of positions \; -5) at every trigger insert the "insert"array; -#X connect 0 0 1 0; -#X connect 0 1 2 0; -#X connect 0 2 3 0; -#X connect 4 0 0 0; -#X restore 42 88 pd inserter; -#X restore 516 119 pd inside; -#X obj 322 271 vsl 15 100 0 1 0 0 empty empty volume 0 -8 0 8 -24198 --1 -1 0 1; -#X obj 204 374 *~ 0.2; -#X text 387 445 needs the zexy library and vasp; -#X connect 2 0 15 0; -#X connect 4 0 7 0; -#X connect 5 0 10 0; -#X connect 8 0 1 0; -#X connect 10 0 4 0; -#X connect 12 0 11 0; -#X connect 14 0 15 1; -#X connect 15 0 3 0; -#X connect 15 0 3 1; -#X connect 15 0 12 0; +#N canvas 62 0 628 493 10;
+#N canvas 0 0 450 300 graph34 0;
+#X array insert 128 float 1;
+#A 0 1 0.995185 0.980785 0.95694 0.92388 0.881921 0.83147 0.77301 0.707107
+0.634393 0.55557 0.471397 0.382683 0.290285 0.19509 0.0980171 -3.82859e-016
+-0.0980171 -0.19509 -0.290285 -0.382683 -0.471397 -0.55557 -0.634393
+-0.707107 -0.77301 -0.83147 -0.881921 -0.92388 -0.95694 -0.980785 -0.995185
+-1 -0.995185 -0.980785 -0.95694 -0.92388 -0.881921 -0.83147 -0.77301
+-0.707107 -0.634393 -0.55557 -0.471397 -0.382683 -0.290285 -0.19509
+-0.0980171 7.04487e-016 0.0980171 0.19509 0.290285 0.382683 0.471397
+0.55557 0.634393 0.707107 0.77301 0.83147 0.881921 0.92388 0.95694
+0.980785 0.995185 1 0.995185 0.980785 0.95694 0.92388 0.881921 0.83147
+0.77301 0.707107 0.634393 0.55557 0.471397 0.382683 0.290285 0.19509
+0.0980171 1.00761e-014 -0.0980171 -0.19509 -0.290285 -0.382683 -0.471397
+-0.55557 -0.634393 -0.707107 -0.77301 -0.83147 -0.881921 -0.92388 -0.95694
+-0.980785 -0.995185 -1 -0.995185 -0.980785 -0.95694 -0.92388 -0.881921
+-0.83147 -0.77301 -0.707107 -0.634393 -0.55557 -0.471397 -0.382683
+-0.290285 -0.19509 -0.0980171 -1.99685e-014 0.0980171 0.19509 0.290285
+0.382683 0.471397 0.55557 0.634393 0.707107 0.77301 0.83147 0.881921
+0.92388 0.95694 0.980785 0.995185;
+#X coords 0 1 127 -1 200 140 1;
+#X restore 78 68 graph;
+#N canvas 112 314 505 434 player 0;
+#X obj 117 137 tabplay~ schnipparray;
+#X obj 171 245 tabplay~ schnipparray;
+#X obj 250 350 tabplay~ schnipparray;
+#X obj 117 161 throw~ toex;
+#X obj 171 264 throw~ toex;
+#X obj 250 374 throw~ toex;
+#X obj 88 46 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
+;
+#X obj 88 73 spigot;
+#X obj 85 283 s \$0-part;
+#X obj 143 200 t b b;
+#X obj 222 306 t b b;
+#X obj 88 22 inlet;
+#X msg 114 115 0 128;
+#X msg 171 225 128 128;
+#X msg 251 330 256 128;
+#X obj 89 93 t b b;
+#X msg 222 328 1;
+#X msg 143 225 3;
+#X msg 85 117 2;
+#X connect 0 0 3 0;
+#X connect 0 1 9 0;
+#X connect 1 0 4 0;
+#X connect 1 1 10 0;
+#X connect 2 0 5 0;
+#X connect 2 1 7 0;
+#X connect 6 0 7 1;
+#X connect 6 0 7 0;
+#X connect 7 0 15 0;
+#X connect 9 0 17 0;
+#X connect 9 1 13 0;
+#X connect 10 0 16 0;
+#X connect 10 1 14 0;
+#X connect 11 0 6 0;
+#X connect 12 0 0 0;
+#X connect 13 0 1 0;
+#X connect 14 0 2 0;
+#X connect 15 0 18 0;
+#X connect 15 1 12 0;
+#X connect 16 0 8 0;
+#X connect 17 0 8 0;
+#X connect 18 0 8 0;
+#X restore 204 294 pd player;
+#X obj 204 339 catch~ toex;
+#X obj 204 403 dac~;
+#X floatatom 76 311 0 0 0 0 - - -;
+#X obj 76 271 nbx 5 14 -1e+037 1e+037 0 1 empty empty empty 0 -6 0
+10 -24198 -1 -1 11 256;
+#X text 76 253 density;
+#X obj 76 333 s \$0-density;
+#X obj 204 275 tgl 15 0 empty empty start/stop 0 -6 0 8 -24198 -1 -1
+1 1;
+#X text 319 80 this array is insertet at triggering points;
+#X obj 76 290 * 0.001;
+#X floatatom 241 429 0 0 0 0 - - -;
+#X obj 241 407 env~ 32768;
+#N canvas 0 0 392 261 inside 0;
+#X obj 41 63 table positions;
+#N canvas 0 0 478 328 create_schippler 0;
+#X msg 155 114 vasp insert;
+#X obj 155 162 vasp.u;
+#X obj 155 138 vasp.osc 6.4;
+#X msg 66 114 vasp insert;
+#X obj 66 162 vasp.u;
+#X obj 66 138 vasp.osc 64;
+#X msg 251 115 vasp insert;
+#X obj 251 163 vasp.u;
+#X obj 251 139 vasp.osc 2;
+#X text 56 71 create various samples to insert;
+#X msg 63 216 vasp insert;
+#X obj 63 261 vasp.u;
+#X obj 63 239 vasp.window;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X connect 3 0 5 0;
+#X connect 5 0 4 0;
+#X connect 6 0 8 0;
+#X connect 8 0 7 0;
+#X connect 10 0 12 0;
+#X connect 12 0 11 0;
+#X restore 43 113 pd create_schippler;
+#N canvas 0 0 660 348 inserter 0;
+#X obj 48 84 sel 1 2 3;
+#N canvas 2 7 415 675 first_part 0;
+#X obj 48 483 tabread positions;
+#X obj 48 172 vasp.noise;
+#X obj 48 238 vasp.??;
+#X obj 48 192 vasp.abs;
+#X obj 48 215 vasp.< 0.1;
+#X obj 48 262 route list;
+#X text 58 501 insert a soundfile at certain offset-position;
+#X obj 48 547 vasp.+ vasp insert;
+#X obj 48 120 t b b;
+#X obj 126 146 vasp.= 0;
+#X obj 48 70 inlet;
+#X obj 103 192 r \$0-density;
+#X msg 162 326 \; positions resize \$1;
+#X obj 80 362 tabset positions;
+#X obj 48 387 0;
+#X obj 48 411 until;
+#X obj 90 436 + 1;
+#X obj 48 436 0;
+#X msg 72 386 0;
+#X obj 97 310 length;
+#X obj 48 460 t f f;
+#X obj 97 331 t f f;
+#X obj 48 288 t b b l l;
+#X obj 48 149 vasp.! 128;
+#X msg 48 522 vasp 128 schnipparray \$1;
+#X msg 126 125 vasp 128 schnipparray 128;
+#X connect 0 0 24 0;
+#X connect 1 0 3 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 2 0;
+#X connect 5 0 22 0;
+#X connect 8 0 23 0;
+#X connect 8 1 25 0;
+#X connect 10 0 8 0;
+#X connect 11 0 4 1;
+#X connect 14 0 15 0;
+#X connect 15 0 17 0;
+#X connect 16 0 17 1;
+#X connect 17 0 20 0;
+#X connect 18 0 17 1;
+#X connect 19 0 21 0;
+#X connect 20 0 0 0;
+#X connect 20 1 16 0;
+#X connect 21 0 14 1;
+#X connect 21 1 12 0;
+#X connect 22 0 14 0;
+#X connect 22 1 18 0;
+#X connect 22 2 13 0;
+#X connect 22 3 19 0;
+#X connect 23 0 1 0;
+#X connect 24 0 7 0;
+#X connect 25 0 9 0;
+#X restore 48 183 pd first_part;
+#N canvas 162 22 383 663 second_part 0;
+#X obj 48 483 tabread positions;
+#X obj 48 172 vasp.noise;
+#X obj 48 238 vasp.??;
+#X obj 48 192 vasp.abs;
+#X obj 48 215 vasp.< 0.1;
+#X obj 48 262 route list;
+#X text 58 501 insert a soundfile at certain offset-position;
+#X text 124 552 fuer drei teilbereiche;
+#X obj 48 586 vasp.+ vasp insert;
+#X obj 48 120 t b b;
+#X obj 126 146 vasp.= 0;
+#X obj 48 70 inlet;
+#X obj 103 192 r \$0-density;
+#X msg 162 323 \; positions resize \$1;
+#X obj 80 359 tabset positions;
+#X obj 48 384 0;
+#X obj 48 408 until;
+#X obj 90 433 + 1;
+#X obj 48 433 0;
+#X msg 72 383 0;
+#X obj 97 307 length;
+#X obj 48 457 t f f;
+#X obj 97 328 t f f;
+#X obj 48 285 t b b l l;
+#X obj 48 148 vasp.! 128;
+#X msg 48 525 vasp 128 schnipparray \$1;
+#X obj 48 551 vasp.o+ 128;
+#X msg 126 124 vasp 128 schnipparray 256;
+#X connect 0 0 25 0;
+#X connect 1 0 3 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 2 0;
+#X connect 5 0 23 0;
+#X connect 9 0 24 0;
+#X connect 9 1 27 0;
+#X connect 11 0 9 0;
+#X connect 12 0 4 1;
+#X connect 15 0 16 0;
+#X connect 16 0 18 0;
+#X connect 17 0 18 1;
+#X connect 18 0 21 0;
+#X connect 19 0 18 1;
+#X connect 20 0 22 0;
+#X connect 21 0 0 0;
+#X connect 21 1 17 0;
+#X connect 22 0 15 1;
+#X connect 22 1 13 0;
+#X connect 23 0 15 0;
+#X connect 23 1 19 0;
+#X connect 23 2 14 0;
+#X connect 23 3 20 0;
+#X connect 24 0 1 0;
+#X connect 25 0 26 0;
+#X connect 26 0 8 0;
+#X connect 27 0 10 0;
+#X restore 191 181 pd second_part;
+#N canvas 427 3 562 703 third_part 0;
+#X msg 155 289 \; positions resize \$1;
+#X obj 73 325 tabset positions;
+#X obj 41 350 0;
+#X obj 41 374 until;
+#X obj 83 399 + 1;
+#X obj 41 399 0;
+#X obj 41 445 tabread positions;
+#X msg 65 349 0;
+#X obj 41 134 vasp.noise;
+#X obj 41 200 vasp.??;
+#X obj 41 154 vasp.abs;
+#X obj 41 177 vasp.< 0.1;
+#X obj 90 273 length;
+#X obj 41 423 t f f;
+#X obj 41 224 route list;
+#X obj 310 641 vasp.+ vasp insert;
+#X obj 41 82 t b b;
+#X obj 119 108 vasp.= 0;
+#X obj 41 52 inlet;
+#X obj 96 154 r \$0-density;
+#X text 177 107 (clears second part);
+#X text 327 499 sample-length;
+#X obj 292 520 - 0;
+#X text 329 519 minus offset;
+#X text 292 215 this part has to write "around the corner";
+#X obj 48 636 vasp.+ vasp insert;
+#X msg 48 586 vasp \$1 schnipparray;
+#X text 446 641 insert at end;
+#X text 49 663 insert at beginning;
+#X obj 90 294 t f f;
+#X obj 41 251 t b b l l;
+#X msg 310 565 vasp \$1 schnipparray;
+#X obj 310 613 vasp.o;
+#X obj 186 609 vasp.o;
+#X msg 413 614 vasp \$1 insert;
+#X msg 186 586 vasp \$1 insert;
+#X obj 48 550 t f f;
+#X obj 48 527 - 0;
+#X obj 276 471 t b b f f;
+#X text 73 528 already at the end;
+#X obj 292 541 t f f f f;
+#X obj 41 111 vasp.! 128;
+#X obj 292 497 128;
+#X obj 48 505 128;
+#X obj 341 590 + 256;
+#X msg 119 86 vasp 128 schnipparray;
+#X connect 2 0 3 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 1;
+#X connect 5 0 13 0;
+#X connect 6 0 38 0;
+#X connect 7 0 5 1;
+#X connect 8 0 10 0;
+#X connect 9 0 14 0;
+#X connect 10 0 11 0;
+#X connect 11 0 9 0;
+#X connect 12 0 29 0;
+#X connect 13 0 6 0;
+#X connect 13 1 4 0;
+#X connect 14 0 30 0;
+#X connect 16 0 41 0;
+#X connect 16 1 45 0;
+#X connect 18 0 16 0;
+#X connect 19 0 11 1;
+#X connect 22 0 40 0;
+#X connect 26 0 25 0;
+#X connect 29 0 2 1;
+#X connect 29 1 0 0;
+#X connect 30 0 2 0;
+#X connect 30 1 7 0;
+#X connect 30 2 1 0;
+#X connect 30 3 12 0;
+#X connect 31 0 32 0;
+#X connect 32 0 15 0;
+#X connect 33 0 25 1;
+#X connect 34 0 15 1;
+#X connect 35 0 33 0;
+#X connect 36 0 26 0;
+#X connect 36 1 35 0;
+#X connect 37 0 36 0;
+#X connect 38 0 43 0;
+#X connect 38 1 42 0;
+#X connect 38 2 22 1;
+#X connect 38 3 44 0;
+#X connect 40 0 37 1;
+#X connect 40 1 33 1;
+#X connect 40 2 31 0;
+#X connect 40 3 34 0;
+#X connect 41 0 8 0;
+#X connect 42 0 22 0;
+#X connect 43 0 37 0;
+#X connect 44 0 32 1;
+#X connect 45 0 17 0;
+#X restore 336 183 pd third_part;
+#X obj 48 55 r \$0-part;
+#X text 50 33 after a sample-part is played \, next step is calculated
+;
+#X text 296 84 1) generate noise \; 2) get triggering-values \; 3)
+...save in positions-array \; 4) read samplevalues of positions \;
+5) at every trigger insert the "insert"array;
+#X connect 0 0 1 0;
+#X connect 0 1 2 0;
+#X connect 0 2 3 0;
+#X connect 4 0 0 0;
+#X restore 42 88 pd inserter;
+#X obj 40 37 table schnipparray 384;
+#X restore 516 119 pd inside;
+#X obj 322 271 vsl 15 100 0 1 0 1 empty empty volume 0 -8 0 8 -24198
+-1 -1 600 1;
+#X obj 204 374 *~ 0.2;
+#X text 387 445 needs the zexy library and vasp;
+#X connect 2 0 15 0;
+#X connect 4 0 7 0;
+#X connect 5 0 10 0;
+#X connect 8 0 1 0;
+#X connect 10 0 4 0;
+#X connect 12 0 11 0;
+#X connect 14 0 15 1;
+#X connect 15 0 3 0;
+#X connect 15 0 3 1;
+#X connect 15 0 12 0;
diff --git a/externals/grill/vasp/pd-ex/granular2.pd b/externals/grill/vasp/pd-ex/granular2.pd new file mode 100644 index 00000000..5dea43a7 --- /dev/null +++ b/externals/grill/vasp/pd-ex/granular2.pd @@ -0,0 +1,380 @@ +#N canvas 64 38 704 556 10;
+#N canvas 0 0 450 300 graph34 0;
+#X array insert 128 float 0;
+#X coords 0 1 127 -1 200 140 1;
+#X restore 96 73 graph;
+#N canvas 339 256 521 450 player 0;
+#X obj 228 372 tabplay~ schnipparray;
+#X obj 228 396 throw~ toex;
+#X obj 208 45 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 208 76 spigot;
+#X obj 104 330 s \$0-part;
+#X obj 208 21 inlet;
+#X obj 264 251 t b b;
+#X obj 283 327 r \$0-partlen;
+#X obj 253 299 r \$0-partlen;
+#X obj 228 319 * 128;
+#X obj 228 350 pack 0 128;
+#X obj 253 147 + 1;
+#X obj 208 147 t f f;
+#X obj 143 251 t b b;
+#X obj 203 250 t b b;
+#X obj 240 192 t b b;
+#X obj 208 125 1;
+#X msg 265 212 1;
+#X obj 208 170 sel 1 2 3;
+#X msg 143 271 2;
+#X msg 168 271 0;
+#X msg 203 271 3;
+#X msg 228 271 1;
+#X msg 264 271 1;
+#X msg 289 271 2;
+#X connect 0 0 1 0;
+#X connect 0 1 3 0;
+#X connect 2 0 3 1;
+#X connect 2 0 3 0;
+#X connect 3 0 16 0;
+#X connect 5 0 2 0;
+#X connect 6 0 23 0;
+#X connect 6 1 24 0;
+#X connect 7 0 10 1;
+#X connect 8 0 9 1;
+#X connect 9 0 10 0;
+#X connect 10 0 0 0;
+#X connect 11 0 16 1;
+#X connect 12 0 18 0;
+#X connect 12 1 11 0;
+#X connect 13 0 19 0;
+#X connect 13 1 20 0;
+#X connect 14 0 21 0;
+#X connect 14 1 22 0;
+#X connect 15 0 6 0;
+#X connect 15 1 17 0;
+#X connect 16 0 12 0;
+#X connect 17 0 16 1;
+#X connect 18 0 13 0;
+#X connect 18 1 14 0;
+#X connect 18 2 15 0;
+#X connect 19 0 4 0;
+#X connect 20 0 9 0;
+#X connect 21 0 4 0;
+#X connect 22 0 9 0;
+#X connect 23 0 4 0;
+#X connect 24 0 9 0;
+#X restore 204 294 pd player;
+#X obj 204 339 catch~ toex;
+#X obj 204 403 dac~;
+#X floatatom 98 423 0 0 0 0 - - -;
+#X obj 98 383 nbx 5 14 -1e+037 1e+037 0 1 empty empty empty 0 -6 0
+10 -24198 -1 -1 0.13 256;
+#X text 98 365 density;
+#X obj 98 445 s \$0-density;
+#X obj 204 275 tgl 15 0 empty empty start/stop 0 -6 0 8 -24198 -1 -1
+0 1;
+#X floatatom 241 430 0 0 0 0 - - -;
+#X obj 241 407 env~ 32768;
+#N canvas 202 187 287 226 inside 0;
+#X obj 88 151 table positions;
+#N canvas 259 48 514 364 create_schippler 0;
+#X msg 155 114 vasp insert;
+#X obj 155 182 vasp.u;
+#X obj 155 138 vasp.osc 6.4;
+#X msg 66 114 vasp insert;
+#X obj 66 162 vasp.u;
+#X msg 293 113 vasp insert;
+#X obj 293 161 vasp.u;
+#X obj 293 137 vasp.osc 2;
+#X text 56 71 create various samples to insert;
+#X msg 63 216 vasp insert;
+#X obj 63 261 vasp.u;
+#X obj 63 239 vasp.window;
+#X obj 66 138 vasp.osc 128;
+#X obj 155 160 vasp.*!window lin;
+#X connect 0 0 2 0;
+#X connect 2 0 13 0;
+#X connect 3 0 12 0;
+#X connect 5 0 7 0;
+#X connect 7 0 6 0;
+#X connect 9 0 11 0;
+#X connect 11 0 10 0;
+#X connect 12 0 4 0;
+#X connect 13 0 1 0;
+#X restore 40 47 pd create_schippler;
+#N canvas 136 160 532 356 inserter 0;
+#X obj 48 55 r \$0-part;
+#X text 50 33 after a sample-part is played \, next step is calculated
+;
+#X obj 169 145 sel 1 2 3;
+#X msg 317 235 1;
+#X text 411 234 clear;
+#X msg 346 235 2;
+#X msg 376 235 0;
+#X obj 317 259 s \$0-clear;
+#X obj 169 260 s \$0-partfw;
+#X msg 169 233 0;
+#X msg 205 233 1;
+#X msg 238 233 2;
+#X text 244 260 (offset);
+#X obj 246 176 t b b;
+#X obj 48 78 t b f;
+#N canvas 267 0 670 675 three_steps 0;
+#X msg 139 235 \; positions resize \$1;
+#X obj 78 269 tabset positions;
+#X obj 46 291 0;
+#X obj 46 311 until;
+#X obj 88 336 + 1;
+#X obj 46 336 0;
+#X obj 46 377 tabread positions;
+#X msg 70 291 0;
+#X obj 46 100 vasp.noise;
+#X obj 46 165 vasp.??;
+#X obj 46 122 vasp.abs;
+#X obj 46 145 vasp.< 0.1;
+#X obj 95 227 length;
+#X obj 46 357 t f f;
+#X obj 345 609 vasp.+ vasp insert;
+#X obj 46 58 t b b;
+#X obj 46 37 inlet;
+#X obj 101 122 r \$0-density;
+#X text 348 452 sample-length;
+#X obj 313 473 - 0;
+#X text 350 472 minus offset;
+#X obj 46 620 vasp.+ vasp insert;
+#X msg 46 527 vasp \$1 schnipparray;
+#X text 164 621 insert at beginning;
+#X obj 95 248 t f f;
+#X obj 46 205 t b b l l;
+#X msg 345 517 vasp \$1 schnipparray;
+#X obj 345 587 vasp.o;
+#X obj 149 599 vasp.o;
+#X msg 448 588 vasp \$1 insert;
+#X msg 149 576 vasp \$1 insert;
+#X obj 46 502 t f f;
+#X obj 46 479 - 0;
+#X obj 46 400 t b b f f;
+#X text 73 478 already at the end;
+#X obj 313 494 t f f f f;
+#X obj 46 79 vasp.! 128;
+#X obj 313 450 128;
+#X obj 46 457 128;
+#X obj 399 195 r \$0-partlen;
+#X text 405 261 clear;
+#X obj 374 173 r \$0-clear;
+#X obj 329 173 vasp.f;
+#X msg 329 128 vasp schnipparray;
+#X obj 329 261 vasp.= 0;
+#X obj 374 217 * 128;
+#X obj 360 150 r \$0-partlen;
+#X obj 329 239 vasp.o;
+#X obj 101 58 r \$0-partlen;
+#X obj 470 541 r \$0-partlen;
+#X obj 399 564 * 128;
+#X obj 399 541 r \$0-partfw;
+#X obj 376 564 + 0;
+#X obj 326 428 r \$0-partlen;
+#X obj 59 433 r \$0-partlen;
+#X obj 46 595 vasp.o+;
+#X obj 149 550 r \$0-partlen;
+#X obj 83 572 * 128;
+#X obj 83 550 r \$0-clear;
+#X text 481 619 insert at end of this part;
+#X text 163 634 of next part;
+#X obj 46 185 route bang;
+#X connect 2 0 3 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 1;
+#X connect 5 0 13 0;
+#X connect 6 0 33 0;
+#X connect 7 0 5 1;
+#X connect 8 0 10 0;
+#X connect 9 0 61 0;
+#X connect 10 0 11 0;
+#X connect 11 0 9 0;
+#X connect 12 0 24 0;
+#X connect 13 0 6 0;
+#X connect 13 1 4 0;
+#X connect 15 0 36 0;
+#X connect 15 1 43 0;
+#X connect 16 0 15 0;
+#X connect 17 0 11 1;
+#X connect 19 0 35 0;
+#X connect 22 0 55 0;
+#X connect 24 0 2 1;
+#X connect 24 1 0 0;
+#X connect 25 0 2 0;
+#X connect 25 1 7 0;
+#X connect 25 2 1 0;
+#X connect 25 3 12 0;
+#X connect 26 0 27 0;
+#X connect 27 0 14 0;
+#X connect 28 0 21 1;
+#X connect 29 0 14 1;
+#X connect 30 0 28 0;
+#X connect 31 0 22 0;
+#X connect 31 1 30 0;
+#X connect 32 0 31 0;
+#X connect 33 0 38 0;
+#X connect 33 1 37 0;
+#X connect 33 2 19 1;
+#X connect 33 3 52 0;
+#X connect 35 0 32 1;
+#X connect 35 1 28 1;
+#X connect 35 2 26 0;
+#X connect 35 3 29 0;
+#X connect 36 0 8 0;
+#X connect 37 0 19 0;
+#X connect 38 0 32 0;
+#X connect 39 0 45 1;
+#X connect 41 0 45 0;
+#X connect 42 0 47 0;
+#X connect 43 0 42 0;
+#X connect 45 0 47 1;
+#X connect 46 0 42 1;
+#X connect 47 0 44 0;
+#X connect 48 0 36 1;
+#X connect 49 0 50 1;
+#X connect 50 0 52 1;
+#X connect 51 0 50 0;
+#X connect 52 0 27 1;
+#X connect 53 0 37 1;
+#X connect 54 0 38 1;
+#X connect 55 0 21 0;
+#X connect 56 0 57 1;
+#X connect 57 0 55 1;
+#X connect 58 0 57 0;
+#X connect 61 1 25 0;
+#X restore 48 259 pd three_steps;
+#X obj 209 176 t b b;
+#X obj 169 175 t b b;
+#X text 386 260 (=nextpart);
+#X connect 0 0 14 0;
+#X connect 2 0 17 0;
+#X connect 2 1 16 0;
+#X connect 2 2 13 0;
+#X connect 3 0 7 0;
+#X connect 5 0 7 0;
+#X connect 6 0 7 0;
+#X connect 9 0 8 0;
+#X connect 10 0 8 0;
+#X connect 11 0 8 0;
+#X connect 13 0 11 0;
+#X connect 13 1 6 0;
+#X connect 14 0 15 0;
+#X connect 14 1 2 0;
+#X connect 16 0 10 0;
+#X connect 16 1 5 0;
+#X connect 17 0 9 0;
+#X connect 17 1 3 0;
+#X restore 40 70 pd inserter;
+#X obj 88 129 table schnipparray 384;
+#N canvas 286 262 325 213 init 0;
+#X obj 112 77 s \$0-partlen;
+#X msg 112 100 \; insert resize \$1;
+#X msg 50 137 \; schnipparray resize \$1;
+#X obj 50 43 loadbang;
+#X msg 50 65 128;
+#X obj 50 113 * 3;
+#X connect 3 0 4 0;
+#X connect 4 0 5 0;
+#X connect 4 0 0 0;
+#X connect 4 0 1 0;
+#X connect 5 0 2 0;
+#X restore 41 95 pd init;
+#X restore 436 220 pd inside;
+#X obj 322 271 vsl 15 100 0 1 0 1 empty empty volume 0 -8 0 8 -24198
+-1 -1 5400 1;
+#X obj 204 374 *~ 0.2;
+#X text 332 464 needs the zexy library and vasp;
+#X obj 98 402 * 0.0001;
+#N canvas 0 0 478 359 glaetten 0;
+#X floatatom 225 70 5 0 0 0 - - -;
+#X floatatom 242 130 5 0 0 0 - - -;
+#X obj 225 111 div 64;
+#X obj 225 148 + 1;
+#X obj 225 169 * 64;
+#X floatatom 254 193 0 0 0 0 - - -;
+#X obj 225 90 - 1;
+#X text 40 193 correct to a size dividable by 64;
+#X obj 225 215 * 3;
+#X floatatom 238 240 0 0 0 0 - - -;
+#X text 143 239 size of array;
+#X text 115 68 length of sample;
+#X text 303 194 (part-length);
+#X obj 322 257 s \$0-partlen;
+#X msg 313 285 \; insert resize \$1;
+#X msg 73 287 \; schnipparray resize \$1;
+#X obj 225 38 inlet;
+#X connect 0 0 6 0;
+#X connect 2 0 1 0;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 4 0 5 0;
+#X connect 4 0 8 0;
+#X connect 5 0 13 0;
+#X connect 5 0 14 0;
+#X connect 6 0 2 0;
+#X connect 8 0 9 0;
+#X connect 8 0 15 0;
+#X connect 16 0 0 0;
+#X restore 482 362 pd glaetten;
+#N canvas 0 0 471 365 sequence 0;
+#X obj 82 115 metro 500;
+#X obj 82 93 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 86 184 sel 1 2 3 4;
+#X obj 52 290 line;
+#X obj 116 145 + 1;
+#X obj 82 144 0;
+#X msg 188 215 0;
+#X floatatom 130 81 5 0 0 0 - - -;
+#X msg 204 245 60 100;
+#X msg 36 248 120 10;
+#X msg 89 246 30 100;
+#X msg 141 246 100 10;
+#X obj 53 323 outlet;
+#X connect 0 0 5 0;
+#X connect 1 0 0 0;
+#X connect 2 0 9 0;
+#X connect 2 1 10 0;
+#X connect 2 2 11 0;
+#X connect 2 3 6 0;
+#X connect 2 3 8 0;
+#X connect 3 0 12 0;
+#X connect 4 0 5 1;
+#X connect 5 0 4 0;
+#X connect 5 0 2 0;
+#X connect 6 0 5 1;
+#X connect 7 0 0 1;
+#X connect 8 0 3 0;
+#X connect 9 0 3 0;
+#X connect 10 0 3 0;
+#X connect 11 0 3 0;
+#X restore 77 342 pd sequence;
+#X obj 482 320 soundfiler;
+#X obj 482 278 openpanel;
+#X msg 482 299 read -resize \$1 insert;
+#X obj 482 251 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
+-1;
+#X floatatom 482 342 0 0 0 0 - - -;
+#X text 326 103 this array is inserted at random triggering points
+;
+#X text 506 251 load sample to insert;
+#X text 332 478 be careful with high density \, with large files costs
+a lot of cpu and glitches can appear;
+#X connect 2 0 13 0;
+#X connect 4 0 7 0;
+#X connect 5 0 15 0;
+#X connect 8 0 1 0;
+#X connect 10 0 9 0;
+#X connect 12 0 13 1;
+#X connect 13 0 3 0;
+#X connect 13 0 3 1;
+#X connect 13 0 10 0;
+#X connect 15 0 4 0;
+#X connect 17 0 5 0;
+#X connect 18 0 22 0;
+#X connect 19 0 20 0;
+#X connect 20 0 18 0;
+#X connect 21 0 19 0;
+#X connect 22 0 16 0;
diff --git a/externals/grill/vasp/pd-help/vasp_set.pd b/externals/grill/vasp/pd-help/vasp_set.pd index 161b4774..cda19360 100644 --- a/externals/grill/vasp/pd-help/vasp_set.pd +++ b/externals/grill/vasp/pd-help/vasp_set.pd @@ -1,4 +1,4 @@ -#N canvas 21 60 881 576 10;
+#N canvas 21 60 891 586 10;
#X obj 61 33 cnv 15 15 15 empty empty vasp.= 0 10 1 14 -262144 -1 0
;
#X text 56 66 set a vasp to a value;
@@ -66,16 +66,18 @@ mouse+spacebar (select) or mouse+"s" (shift).; #X text 57 138 use vasp.= to clear a buffer;
#X obj 53 473 vaspset_examples;
#X obj 51 533 VASP-HELP;
-#N canvas 280 291 407 308 inside 0;
-#X obj 82 165 s \$0-sample-length;
-#X msg 138 90 resize \$1;
+#N canvas 280 291 370 218 inside 0;
+#X obj 138 155 s \$0-sample-length;
+#X msg 163 110 resize \$1;
#X obj 138 43 loadbang;
#X msg 138 64 88200;
-#X obj 138 112 s bufset;
+#X obj 163 132 s bufset;
+#X obj 138 89 t f f;
#X connect 1 0 4 0;
#X connect 2 0 3 0;
-#X connect 3 0 1 0;
-#X connect 3 0 0 0;
+#X connect 3 0 5 0;
+#X connect 5 0 0 0;
+#X connect 5 1 1 0;
#X restore 709 420 pd inside;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
@@ -86,5 +88,6 @@ mouse+spacebar (select) or mouse+"s" (shift).; #X connect 11 0 12 0;
#X connect 14 0 15 0;
#X connect 15 0 9 0;
+#X connect 16 0 14 0;
#X connect 17 0 9 0;
#X connect 21 0 20 0;
diff --git a/externals/grill/vasp/source/buflib.cpp b/externals/grill/vasp/source/buflib.cpp index 30b500c4..36bc90c7 100644 --- a/externals/grill/vasp/source/buflib.cpp +++ b/externals/grill/vasp/source/buflib.cpp @@ -32,7 +32,7 @@ public: class BufEntry { public: - BufEntry(t_symbol *s,I fr); + BufEntry(t_symbol *s,I fr,BL zero = true); ~BufEntry(); V IncRef(); @@ -62,11 +62,12 @@ static V FreeLibSym(t_symbol *s); -BufEntry::BufEntry(t_symbol *s,I fr): +BufEntry::BufEntry(t_symbol *s,I fr,BL zero): sym(s), //magic(LIBMAGIC), alloc(fr),len(fr),data(new S[fr]), refcnt(0),nxt(NULL) { + if(zero) flext::ZeroMem(data,len*sizeof(*data)); // ASSERT(!flext_base::GetThing(sym)); // flext_base::SetThing(sym,this); } @@ -129,7 +130,7 @@ static t_symbol *GetLibSym() #ifdef __MWERKS__ std:: #endif - sprintf(tmp,"vasp!%04i",libcnt); // what if libcnt has > 4 digits? + sprintf(tmp,"vasp!%04i",libcnt); //! \todo what if libcnt has > 4 digits? libcnt++; return gensym(tmp); } @@ -181,7 +182,7 @@ static V LibTick(V *) #endif } -BufEntry *BufLib::NewImm(I fr) +BufEntry *BufLib::NewImm(I fr,BL zero) { if(!libclk) { libclk = (t_clock *)clock_new(NULL,(t_method)LibTick); @@ -193,7 +194,7 @@ BufEntry *BufLib::NewImm(I fr) s = GetLibSym(); // } while(s->s_thing); - BufEntry *entry = new BufEntry(s,fr); + BufEntry *entry = new BufEntry(s,fr,zero); #ifdef FLEXT_THREADS libmtx.Lock(); @@ -213,18 +214,21 @@ BufEntry *BufLib::NewImm(I fr) static F reuse_maxloserel = (F)REUSE_MAXLOSEREL; static I reuse_maxloseabs = REUSE_MAXLOSEABS; -BufEntry *BufLib::Resize(BufEntry *e,I fr,BL keep) +BufEntry *BufLib::Resize(BufEntry *e,I fr,BL keep,BL zero) { if(e->alloc >= fr && fr >= e->alloc*(1-reuse_maxloserel) && fr >= (e->alloc-reuse_maxloseabs)) { // reuse buffer e->len = fr; } else { - S *nd = new S[fr]; + S *nd = new S[fr]; if(keep) { I l = fr; - if(e->len < l) l = e->len; - flext::CopyMem(e->data,nd,l); + if(e->len < l) { + l = e->len; + if(zero) flext::ZeroMem(nd+l,(fr-l)*sizeof(*nd)); + } + flext::CopyMem(nd,e->data,l*sizeof(*nd)); } delete[] e->data; diff --git a/externals/grill/vasp/source/buflib.h b/externals/grill/vasp/source/buflib.h index f64bd8d1..b53be9c8 100644 --- a/externals/grill/vasp/source/buflib.h +++ b/externals/grill/vasp/source/buflib.h @@ -24,12 +24,12 @@ namespace BufLib { VBuffer *Get(const VSymbol &s,I chn = 0,I len = -1,I offs = 0); - BufEntry *NewImm(I fr); + BufEntry *NewImm(I fr,BL zero = true); V IncRef(t_symbol *s); V DecRef(t_symbol *s); - BufEntry *Resize(BufEntry *e,I fr,BL keep = false); + BufEntry *Resize(BufEntry *e,I fr,BL keep = false,BL zero = true); } diff --git a/externals/grill/vasp/source/classes.cpp b/externals/grill/vasp/source/classes.cpp index 658cf0a7..46d07147 100644 --- a/externals/grill/vasp/source/classes.cpp +++ b/externals/grill/vasp/source/classes.cpp @@ -101,7 +101,7 @@ vasp_op::vasp_op(BL op) V vasp_op::m_dobang() { #ifdef FLEXT_THREADS - if(detach) + if(detach) FLEXT_CALLMETHOD(m_bang); else #endif @@ -216,6 +216,7 @@ V vasp_tx::m_bang() #ifdef FLEXT_THREADS thrid = 0; #endif + Unlock(); } diff --git a/externals/grill/vasp/source/main.cpp b/externals/grill/vasp/source/main.cpp index def63a43..15525aac 100644 --- a/externals/grill/vasp/source/main.cpp +++ b/externals/grill/vasp/source/main.cpp @@ -11,7 +11,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "classes.h" -const C *VASP_VERSION = "0.1.1"; +const C *VASP_VERSION = "0.1.2pre2"; V lib_setup() { @@ -20,7 +20,7 @@ V lib_setup() post(" VASP modular %s ",VASP_VERSION); post(" vector assembling signal processor "); post(" (C)2002 Thomas Grill "); -#if defined(_DEBUG) && !defined(__MWERKS__) +#ifdef _DEBUG post(" DEBUG BUILD - " __DATE__ " " __TIME__); #endif post(""); diff --git a/externals/grill/vasp/source/main.h b/externals/grill/vasp/source/main.h index 53d732c2..0fad36d8 100644 --- a/externals/grill/vasp/source/main.h +++ b/externals/grill/vasp/source/main.h @@ -13,8 +13,8 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include <flext.h> -#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) -#error You need at least flext version 0.4.0 +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401) +#error You need at least flext version 0.4.1 #endif diff --git a/externals/grill/vasp/source/obj_frames.cpp b/externals/grill/vasp/source/obj_frames.cpp index 70210d61..fb618e51 100644 --- a/externals/grill/vasp/source/obj_frames.cpp +++ b/externals/grill/vasp/source/obj_frames.cpp @@ -136,7 +136,7 @@ public: virtual Vasp *x_work() { Vasp *ret = new Vasp(ref); - if(setf) ret->FramesM(frms); + if(setf) ret->FramesM(factor); return ret; } diff --git a/externals/grill/vasp/vasp.cw b/externals/grill/vasp/vasp.cw Binary files differindex 9b2ec610..467cbc7a 100644 --- a/externals/grill/vasp/vasp.cw +++ b/externals/grill/vasp/vasp.cw |