And here's a patch that creates guard points. Your table should already have a size of (2^x) + 3, which is taken care of in the patch.
On Wed, Apr 9, 2014 at 6:43 PM, Alexandre Torres Porres <por...@gmail.com>wrote: > and I'm using it for an envelope... > > > 2014-04-09 12:42 GMT-03:00 Alexandre Torres Porres <por...@gmail.com>: > > I made one that takes care of it, here you go >> >> it's just doing a hann window, but you tweak any way you want it :) >> >> >> 2014-04-09 11:52 GMT-03:00 David <dfket...@gmail.com>: >> >> Right, I think 'sinesum' takes care of that for you. I don't know if >>> Tim's example takes care of that or not. >>> >>> Thanks again. >>> >>> >>> On Wed, Apr 9, 2014 at 10:36 AM, Alexandre Torres Porres < >>> por...@gmail.com> wrote: >>> >>>> the tricky detail you'd have to think of, if you're planing to use >>>> [tabread4~], is that you need 3 extra points that are copies of existing >>>> points. The help file will tell you that. [tabosc4~], in extent, needs a >>>> power of 2 plus the 3 extra points. >>>> >>>> >>>> 2014-04-09 9:21 GMT-03:00 David <dfket...@gmail.com>: >>>> >>>>> Thanks to everyone who replied, I'll try your suggestions when I get >>>>> home tonight. >>>>> >>>>> David. >>>>> >>>>> _______________________________________________ >>>>> Pd-list@iem.at mailing list >>>>> UNSUBSCRIBE and account-management -> >>>>> http://lists.puredata.info/listinfo/pd-list >>>>> >>>>> >>>> >>> >> > > _______________________________________________ > Pd-list@iem.at mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list > >
#N canvas 140 252 867 401 10; #N canvas 0 22 450 278 (subpatch) 0; #X array guard_points 11 float 2; #X coords 0 1 11 -1 200 140 1; #X restore 471 193 graph; #X msg -1 180 bang; #X floatatom -1 58 5 0 0 0 - - -; #X floatatom 472 95 5 0 0 0 - - -; #X floatatom 472 143 5 0 0 0 - - -; #X floatatom -1 103 5 0 0 0 - - -; #X floatatom 703 143 5 0 0 0 - - -; #X text 359 94 the value at index; #X text 507 94 should be equal to the value of index; #X text 509 142 <- these two should be equal ->; #X obj -1 37 cnv 15 15 15 empty empty 1.Set_a_power_to_raise_2_to 0 8 0 14 -262144 -66577 0; #N canvas 233 195 379 344 create-random-values 0; #X obj 74 59 arraysize guard_points; #X obj 74 103 until; #X obj 74 145 f; #X obj 101 145 + 1; #X obj 74 167 t f b f; #X obj 93 189 random 200; #X obj 93 211 / 100; #X obj 93 233 - 1; #X obj 93 255 tabwrite guard_points; #X obj 74 81 t f b f; #X msg 89 124 1; #X obj 74 38 inlet; #X obj 74 277 outlet; #X obj 113 103 outlet; #X connect 0 0 9 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 2 0 4 0; #X connect 3 0 2 1; #X connect 4 0 12 0; #X connect 4 1 5 0; #X connect 4 2 8 1; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 9 0 1 0; #X connect 9 1 10 0; #X connect 9 2 13 0; #X connect 10 0 2 1; #X connect 11 0 0 0; #X restore -1 205 pd create-random-values; #N canvas 222 238 428 437 set-guard-points 0; #X msg 57 155 3; #X obj 57 177 until; #X obj 57 222 f; #X obj 83 222 + 1; #X msg 72 201 0; #X obj 180 271 moses 1; #X obj 219 348 +; #X obj 57 254 t f f; #X obj 57 301 +; #X obj 57 278 moses 1; #X obj 57 129 t b f f b; #X obj 57 80 sel; #X obj 57 104 f; #X obj 72 56 t f f; #X obj 57 340 tabread guard_points; #X obj 57 365 tabwrite guard_points; #X obj 99 87 - 3; #X obj 57 9 inlet; #X obj 72 32 inlet; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 2 0 7 0; #X connect 3 0 2 1; #X connect 4 0 2 1; #X connect 5 0 15 1; #X connect 5 1 6 0; #X connect 6 0 15 1; #X connect 7 0 9 0; #X connect 7 1 5 0; #X connect 8 0 14 0; #X connect 9 0 8 0; #X connect 9 1 14 0; #X connect 10 0 0 0; #X connect 10 1 8 1; #X connect 10 2 6 1; #X connect 10 3 4 0; #X connect 11 0 12 0; #X connect 12 0 10 0; #X connect 13 0 11 1; #X connect 13 1 16 0; #X connect 14 0 15 0; #X connect 16 0 12 1; #X connect 17 0 11 0; #X connect 18 0 13 0; #X restore -1 230 pd set-guard-points; #N canvas 94 174 377 304 set-array-size 0; #X obj 54 81 swap 2; #X obj 54 103 pow; #X msg 81 169 resize \$1; #X obj 81 191 s guard_points; #X obj 54 125 + 3; #X obj 54 147 t f f; #X obj 54 57 inlet; #X obj 54 216 outlet; #X connect 0 0 1 0; #X connect 0 1 1 1; #X connect 1 0 4 0; #X connect 2 0 3 0; #X connect 4 0 5 0; #X connect 5 0 7 0; #X connect 5 1 2 0; #X connect 6 0 0 0; #X restore -1 80 pd set-array-size; #X text 35 102 array size should (2^x) + 3; #X obj -1 160 cnv 15 15 15 empty empty 2.create_random_values_and_guard_points 0 8 0 14 -262144 -66577 0; #N canvas 516 156 564 378 check-the-values-of-the 0; #X obj 67 296 tabread guard_points; #X obj 292 182 %; #X obj 288 88 arraysize guard_points; #X obj 288 110 - 3; #X obj 292 296 tabread guard_points; #X obj 67 71 t f f b; #X obj 273 156 +; #X obj 292 206 sel 0; #X obj 288 132 t f f f; #X obj 292 228 f; #X obj 292 250 t f f; #X obj 319 272 s index; #X obj 67 48 inlet; #X obj 67 318 outlet; #X obj 292 318 outlet; #X connect 0 0 13 0; #X connect 1 0 7 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 4 0 14 0; #X connect 5 0 0 0; #X connect 5 1 6 0; #X connect 5 2 2 0; #X connect 6 0 1 0; #X connect 7 0 9 0; #X connect 7 1 10 0; #X connect 8 0 6 1; #X connect 8 1 1 1; #X connect 8 2 9 1; #X connect 9 0 10 0; #X connect 10 0 4 0; #X connect 10 1 11 0; #X connect 12 0 5 0; #X restore 472 119 pd check-the-values-of-the guard-points; #X floatatom 734 93 5 0 0 0 - index -; #X obj 469 32 cnv 15 15 15 empty empty 3.Check_the_guard_points 0 8 0 14 -262144 -66577 0; #X text 469 48 check the values at indeces 0 \, arraysize - 2 and arraysize - 1 the numbers below should be equal; #X connect 1 0 11 0; #X connect 2 0 13 0; #X connect 3 0 16 0; #X connect 11 0 12 0; #X connect 11 1 12 1; #X connect 13 0 5 0; #X connect 16 0 4 0; #X connect 16 1 6 0;
_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list