[PD] multi-colored arrays inside one table || zoomable tables ?

Frank Barknecht fbar at footils.org
Tue Mar 29 12:49:00 CEST 2005


Hallo,
andy graybeal hat gesagt: // andy graybeal wrote:

> i'm wondering if it is possible to have multiply colored arrays inside 
> of one table.  i recently got the hang of having multiple arrays in one 
> table, and i'm wondering if i can have each array with seperate colors.  
> i would like to have for instance, an audio sample inside the table, and 
> have it be blue, then i could have another array overtop of that and 
> have that array be orange, and it would conceivably represent an 
> envelope that could control anything,say amplitude, and then another 
> array on top of that would represent my panning envelope..and on and 
> on.. until i had so many colors (arrays that represented envelopes) that 
> i ended up being confused ;)

Hhm, I don't think, you can do colored arrays. Yet, that is, because
arrays are currently in the process of being unified with data
structures, and data structures can be very colorful and also be used
to display soundfiles, as attached patch shows. The patch is very
slow, though, that's why I used "mousfilter" from Cyclone in it to di
redraws only on mousup

Ciao
-- 
 Frank Barknecht                               _ ______footils.org__
             
          _ __latest track: "scans" _ http://footils.org/cms/show/41
-------------- next part --------------
#N canvas 566 216 881 527 10;
#N canvas 722 109 450 300 sample 0;
#X obj 56 52 struct sample float y;
#X restore 422 132 pd sample;
#N canvas 0 0 984 622 data 0;
#X restore 37 63 pd data;
#N canvas 664 618 450 300 appender 0;
#X msg 291 152 traverse pd-data \, bang;
#X obj 291 179 pointer;
#X obj 176 124 t b b;
#X obj 173 95 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 99 246 setsize wave s;
#X floatatom 101 224 5 0 0 0 - - -;
#X obj 111 32 inlet;
#X obj 111 52 t f b b;
#X obj 221 237 s last_array;
#X obj 163 203 append wave x y c;
#X msg 274 105 \; pd-data clear;
#X obj 245 37 inlet;
#X obj 168 166 pack 10 300 9;
#X connect 0 0 1 0;
#X connect 1 0 9 3;
#X connect 2 0 12 0;
#X connect 2 1 0 0;
#X connect 3 0 2 0;
#X connect 5 0 4 0;
#X connect 6 0 7 0;
#X connect 7 0 4 0;
#X connect 7 1 3 0;
#X connect 7 2 10 0;
#X connect 9 0 4 1;
#X connect 9 0 8 0;
#X connect 11 0 12 2;
#X connect 12 0 9 0;
#X restore 185 171 pd appender;
#N canvas 391 349 450 300 wave 0;
#X obj 44 104 struct wave float x float y float c array s sample;
#X obj 61 159 plot s c 1 0 0 1 1;
#X obj 51 210 drawpolygon 0 1 0 0 800 0;
#X restore 422 154 pd wave;
#N canvas 216 99 782 392 loadfile 0;
#X obj 611 48 openpanel;
#X obj 611 90 soundfiler;
#X obj 611 16 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 611 69 read -resize \$1 snd;
#X floatatom 611 133 5 0 0 0 - - -;
#X obj 54 135 until;
#X obj 54 167 f 0;
#X obj 82 167 + 1;
#X obj 54 107 t f f f f b;
#X msg 93 136 0;
#X obj 169 173 outlet;
#X obj 281 197 r last_array;
#X obj 188 222 element wave s;
#X obj 54 195 t f f;
#X obj 575 32 inlet;
#X obj 54 245 * 1;
#X obj 54 40 t b;
#X obj 54 340 * 400;
#X obj 91 39 r display-width;
#X obj 54 363 set sample y;
#X obj 54 318 tabread4 snd;
#X obj 473 73 table snd 200;
#X obj 543 124 s paint;
#X obj 54 13 r paint;
#X obj 70 224 r sample_per_px;
#X obj 54 289 + 0;
#X obj 70 265 r start-sample;
#X obj 54 62 f 800;
#X obj 54 83 min 800;
#X connect 0 0 3 0;
#X connect 1 0 4 0;
#X connect 1 0 22 0;
#X connect 2 0 0 0;
#X connect 3 0 1 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 6 0 13 0;
#X connect 7 0 6 1;
#X connect 8 0 5 0;
#X connect 8 3 10 0;
#X connect 8 4 9 0;
#X connect 9 0 6 1;
#X connect 11 0 12 1;
#X connect 12 0 19 1;
#X connect 13 0 15 0;
#X connect 13 1 12 0;
#X connect 14 0 0 0;
#X connect 15 0 25 0;
#X connect 16 0 27 0;
#X connect 17 0 19 0;
#X connect 18 0 27 1;
#X connect 20 0 17 0;
#X connect 23 0 16 0;
#X connect 24 0 15 1;
#X connect 25 0 20 0;
#X connect 26 0 25 1;
#X connect 27 0 28 0;
#X connect 28 0 8 0;
#X restore 185 149 pd loadfile;
#X obj 185 130 bng 15 250 50 0 empty empty load_soundfile 0 -6 0 8
-262144 -1 -1;
#X obj 183 86 s pd-data;
#X msg 183 62 clear;
#X obj 186 253 s display-width;
#X floatatom 156 211 5 0 0 1 width_(px) - -;
#X obj 187 342 s sample_per_px;
#X floatatom 157 295 5 0 0 1 zoom_(samples/px) - -;
#X msg 62 465 bang;
#X obj 62 490 s paint;
#X obj 62 434 mousefilter;
#X obj 157 315 t f f;
#X obj 156 228 t f f;
#X text 147 433 if you don't have mousefilter \, bang "paint" manually.
;
#X floatatom 326 209 5 0 0 1 startsample - -;
#X obj 326 226 t f f;
#X obj 326 276 s redraw;
#X obj 62 400 r redraw;
#X obj 157 363 s redraw;
#X obj 156 270 s redraw;
#X obj 356 251 s start-sample;
#X floatatom 286 148 5 0 0 1 color - -;
#X obj 286 171 s redraw;
#X text 19 40 Your soundfile:;
#X connect 4 0 2 0;
#X connect 5 0 4 0;
#X connect 7 0 6 0;
#X connect 9 0 16 0;
#X connect 11 0 15 0;
#X connect 12 0 13 0;
#X connect 14 0 12 0;
#X connect 15 0 22 0;
#X connect 15 1 10 0;
#X connect 16 0 23 0;
#X connect 16 1 8 0;
#X connect 18 0 19 0;
#X connect 19 0 20 0;
#X connect 19 1 24 0;
#X connect 21 0 14 0;
#X connect 25 0 2 1;
#X connect 25 0 26 0;


More information about the Pd-list mailing list