[PD] multislider with structs

Frank Barknecht fbar at footils.org
Wed May 5 01:04:07 CEST 2004


Hallo,

Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
> This is very cool, should be quite useful.  It loads properly, but I
> can't drag the sliders easily.  I guess the targets are quite small. 

I now made the outline a bit larger, changed the data structure and
now also included an output function, done by "tagging" the slider
with an int-id and outputting them all as list of "id: height" pairs.

Now it's actually starting to get a tiny real bit useful.

Ciao
-- 
 Frank Barknecht                               _ ______footils.org__
-------------- next part --------------
#N struct \$0-slider float x float y float color float cline float
h float tag;
#N canvas 191 400 479 333 10;
#N canvas 415 406 450 300 \$0-slider 0;
#X text 39 70 color: color of polygon;
#X text 39 90 h: height of polygon;
#X obj 47 172 filledpolygon color cline 5 0 0 10 0 10 h 0 h;
#X obj 39 31 struct \$0-slider float x float y float color float cline
float h float tag;
#X restore 304 4 pd \$0-slider;
#N canvas 104 334 305 232 \$0-showme 0;
#X scalar \$0-slider 85 10 85 0 50 4 \;;
#X scalar \$0-slider 65 10 65 0 154.564 3 \;;
#X scalar \$0-slider 45 10 45 0 50 2 \;;
#X scalar \$0-slider 25 10 25 0 50 1 \;;
#X scalar \$0-slider 5 10 5 0 50 0 \;;
#X coords 0 240 300 1 300 240 1;
#X restore 22 48 pd \$0-showme;
#X floatatom 388 104 5 0 15 2 how-many? - #0-howmany;
#X obj 390 61 bng 15 250 50 0 \$0-clear empty clear 0 -6 0 8 -262144
-1 -1;
#X obj 390 141 bng 15 250 50 0 \$0-do-create empty create 0 -6 0 8
-262144 -1 -1;
#N canvas 318 188 886 578 mechanics 0;
#X msg 462 91 \; \$1 clear;
#X obj 462 65 symbol;
#X obj 462 38 r \$0-clear;
#X text 462 12 clear show-canvas:;
#X obj 540 39 r \$0-show-cnv;
#X obj 369 420 pointer;
#X text 431 367 go to (and output) "head" of the list;
#X obj 391 252 makefilename pd-%d-showme;
#X msg 369 396 traverse \$1 \, bang;
#X obj 392 233 float \$0;
#X obj 392 206 loadbang;
#X obj 179 216 f;
#X obj 180 249 until;
#X obj 220 140 t b b b b;
#X obj 219 295 + 20;
#X obj 391 276 s \$0-show-cnv;
#X obj 406 344 r \$0-show-cnv;
#X obj 291 227 s \$0-clear;
#X obj 118 149 r \$0-howmany;
#X obj 221 115 r \$0-do-create;
#X obj 369 367 symbol;
#X msg 316 359 bang;
#X obj 131 429 print;
#X msg 333 446 50;
#X obj 507 453 print pointer;
#X msg 299 449 0;
#X obj 186 379 t f f b b b;
#X msg 211 444 10;
#X msg 239 268 5;
#X obj 180 295 i 5;
#X obj 179 478 append \$0-slider x y color cline h tag;
#X obj 291 393 int 0;
#X obj 339 392 + 1;
#X msg 266 329 0;
#X msg 355 170 bang;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
#X connect 4 0 1 1;
#X connect 5 0 30 6;
#X connect 7 0 15 0;
#X connect 8 0 5 0;
#X connect 9 0 7 0;
#X connect 10 0 9 0;
#X connect 11 0 12 0;
#X connect 12 0 29 0;
#X connect 13 0 11 0;
#X connect 13 1 28 0;
#X connect 13 1 33 0;
#X connect 13 2 17 0;
#X connect 13 3 9 0;
#X connect 14 0 29 1;
#X connect 16 0 20 1;
#X connect 18 0 11 1;
#X connect 19 0 13 0;
#X connect 20 0 8 0;
#X connect 21 0 20 0;
#X connect 23 0 30 4;
#X connect 25 0 30 3;
#X connect 26 0 30 0;
#X connect 26 1 27 0;
#X connect 26 1 30 2;
#X connect 26 2 25 0;
#X connect 26 3 23 0;
#X connect 26 3 31 0;
#X connect 26 4 21 0;
#X connect 27 0 30 1;
#X connect 28 0 29 1;
#X connect 29 0 14 0;
#X connect 29 0 26 0;
#X connect 31 0 32 0;
#X connect 31 0 30 5;
#X connect 32 0 31 1;
#X connect 33 0 31 1;
#X connect 34 0 9 0;
#X restore 200 3 pd mechanics;
#N canvas 683 487 561 384 getter 0;
#X obj 93 262 outlet;
#X obj 73 133 pointer;
#X msg 85 101 next;
#X text 133 131 <- object that outputs pointers to scalars;
#X text 189 159 <- this gets a bang when we reach the end;
#X text 269 183 <- this takes incoming pointers;
#X text 272 197 and outputs the values of x \, y \, z \, and q.;
#X text 230 75 <- go to head of list (click first);
#X text 126 103 <- output next item (click 4 times);
#X obj 122 32 r \$0-show-cnv;
#X msg 73 76 traverse \$1;
#X obj 73 185 get \$0-slider tag h;
#X obj 93 236 pack 0 0;
#X obj 73 51 symbol;
#X obj 53 12 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 28 76 until;
#X obj 52 32 t b b;
#X obj 117 160 print EOF;
#X obj 79 12 inlet;
#X connect 1 0 11 0;
#X connect 1 1 15 1;
#X connect 2 0 1 0;
#X connect 9 0 13 1;
#X connect 10 0 1 0;
#X connect 11 0 12 0;
#X connect 11 1 12 1;
#X connect 12 0 0 0;
#X connect 13 0 10 0;
#X connect 14 0 16 0;
#X connect 15 0 2 0;
#X connect 16 0 15 0;
#X connect 16 1 13 0;
#X connect 18 0 16 0;
#X restore 354 249 pd getter;
#X obj 354 280 outlet;
#X obj 412 282 print out;
#X obj 388 177 bng 15 250 50 0 empty \$0-get get 0 -6 0 8 -262144 -1
-1;
#X obj 388 210 tgl 15 0 empty empty auto-get 0 -6 0 8 -262144 -1 -1
1 1;
#X obj 385 228 metro 50;
#X connect 6 0 7 0;
#X connect 9 0 6 0;
#X connect 10 0 11 0;
#X connect 11 0 6 0;
#X coords 0 270 450 0 450 270 1;
-------------- next part --------------
#N struct 1001-slider float x float y float color float cline float
h float tag;
#N struct 1002-slider float x float y float color float cline float
h float tag;
#N canvas 53 246 939 533 10;
#X obj 21 56 slidertest;
#X floatatom 19 377 5 0 0 0 - - -;
#X floatatom 61 377 5 0 0 0 - - -;
#X floatatom 102 377 5 0 0 0 - - -;
#X floatatom 152 377 5 0 0 0 - - -;
#X floatatom 196 377 5 0 0 0 - - -;
#X obj 488 56 slidertest;
#X obj 121 347 route 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14;
#X floatatom 242 377 5 0 0 0 - - -;
#X floatatom 284 377 5 0 0 0 - - -;
#X floatatom 325 377 5 0 0 0 - - -;
#X floatatom 373 377 5 0 0 0 - - -;
#X floatatom 420 377 5 0 0 0 - - -;
#X floatatom 466 377 5 0 0 0 - - -;
#X floatatom 508 377 5 0 0 0 - - -;
#X floatatom 549 377 5 0 0 0 - - -;
#X floatatom 594 377 5 0 0 0 - - -;
#X floatatom 641 377 5 0 0 0 - - -;
#X text 109 407 turn on "auto-get" to automatically receive current
slider state.;
#X connect 0 0 7 0;
#X connect 7 0 1 0;
#X connect 7 1 2 0;
#X connect 7 2 3 0;
#X connect 7 3 4 0;
#X connect 7 4 5 0;
#X connect 7 5 8 0;
#X connect 7 6 9 0;
#X connect 7 7 10 0;
#X connect 7 8 11 0;
#X connect 7 9 12 0;
#X connect 7 10 13 0;
#X connect 7 11 14 0;
#X connect 7 12 15 0;
#X connect 7 13 16 0;
#X connect 7 14 17 0;


More information about the Pd-list mailing list