[PD] Playing with the new data structure features

Frank Barknecht fbar at footils.org
Thu Aug 25 23:11:46 CEST 2005


Hallo,

hm, I really like the additional features of data structures. The
scaling, although a bit awkward to use or to get into, gives some nice
new possibilities. Some are illustrated in attached patch. I think,
one major advantage now is, that ranges can be restricted, something
that came up here as a feature wish a couple of times. It could be
nice to also include this for [drawnumber], which currently doesn't
work. 

Also thanks to the scaling it now is possible to have "inverted"
ranges, which as in attached slider example often is more natural to
use. 

Switchable visibility can be used for nice effects, too, and might be
useful in conjunction with the new selection feature as well.
Visibility switching however doesn't work correctly with [drawnumber]
yet, which can be demonstrated by adding a "-v vis" to the [drawnumber
...] instruction in the slider template: Numbers don't get deleted
correctly, when their visibility is switched off. 

I didn't yet play a lot with the selection feature yet, apart from
looking through the help and example patches. It also looks immensly
useful, because it provides a kind of callback on editing operations
through the pointer sent by the [struct]. 

However the current mechanism doesn't allow one thing, that could be
useful as well: If I change the value of some graph, while I'm not in
edit mode, there still is no direct feedback. OTOH when I'm in edit
mode, I can select an object and get this feedback, but I cannot
change its data fields unless I leave edit mode again.

With all this, I see that I can make a lot of cool enhancements to my
msd-editor, which unfortunatly have to wait another week. ;)

Ciao
-- 
 Frank Barknecht                               _ ______footils.org__
             
          _ __latest track: "plak" @ http://footils.org/cms/show/44
-------------- next part --------------
#N struct slider float x float y float h float w float vis;
#N canvas 345 290 832 609 10;
#N canvas 269 471 629 497 slider 0;
#X msg 247 361 traverse pd-data \, bang;
#X obj 246 388 pointer;
#X obj 105 410 append slider x y h w;
#X obj 104 365 t b b;
#X msg 105 342 bang;
#X msg 106 390 100 200 127 10;
#X obj 101 182 filledpolygon 655 600 1 0 0 0 h(0:127)(0:-127) 10 h(0:127)(0:-127)
10 0;
#X obj 108 55 struct slider float x float y float h float w float vis
;
#X obj 100 132 filledpolygon w 0 1 0 h(0:127)(-3:-130) 10 h(0:127)(-3:-130)
10 h(0:127)(-6:-133) 0 h(0:127)(-6:-133);
#X obj 96 234 filledpolygon -v vis w 0 1 0 2 0 5 10 5 10 2 0 2;
#X obj 104 270 drawnumber h(0:127)(0:127) 0 h(0:127)(-18:-145);
#X connect 0 0 1 0;
#X connect 1 0 2 4;
#X connect 3 0 5 0;
#X connect 3 1 0 0;
#X connect 4 0 3 0;
#X connect 5 0 2 0;
#X restore 136 218 pd slider;
#N canvas 129 187 541 189 data 0;
#X scalar slider 0 150 0 0 0 \;;
#X scalar slider 12 150 0 556 0 \;;
#X scalar slider 24 150 0 556 0 \;;
#X scalar slider 36 150 29 556 0 \;;
#X scalar slider 48 150 0 0 0 \;;
#X scalar slider 60 150 103 556 0 \;;
#X scalar slider 72 150 84 556 0 \;;
#X scalar slider 84 150 47 556 0 \;;
#X scalar slider 96 150 32 0 0 \;;
#X scalar slider 108 150 41 556 0 \;;
#X scalar slider 120 150 0 556 0 \;;
#X scalar slider 132 150 22 556 0 \;;
#X scalar slider 144 150 0 0 0 \;;
#X scalar slider 156 150 27 556 0 \;;
#X scalar slider 168 150 54 556 0 \;;
#X scalar slider 180 150 0 556 0 \;;
#X scalar slider 192 150 52 0 0 \;;
#X scalar slider 204 150 0 556 0 \;;
#X scalar slider 216 150 103 556 0 \;;
#X scalar slider 228 150 0 556 0 \;;
#X scalar slider 240 150 43 0 0 \;;
#X scalar slider 252 150 0 556 0 \;;
#X scalar slider 264 150 4 556 0 \;;
#X scalar slider 276 150 73 556 0 \;;
#X scalar slider 288 150 0 0 0 \;;
#X scalar slider 300 150 62 556 0 \;;
#X scalar slider 312 150 0 556 0 \;;
#X scalar slider 324 150 0 556 0 \;;
#X scalar slider 336 150 60 0 0 \;;
#X scalar slider 348 150 0 556 0 \;;
#X scalar slider 360 150 108 556 0 \;;
#X scalar slider 372 150 0 556 1 \;;
#X coords 0 0 360 160 360 160 1;
#X restore 151 358 pd data;
#N canvas 830 559 450 300 make-a-lot 0;
#X msg 309 165 traverse pd-data \, bang;
#X obj 308 192 pointer;
#X obj 92 263 append slider x y h w;
#X obj 86 124 until;
#X obj 87 148 f 0;
#X msg 126 119 0;
#X obj 92 47 inlet;
#X obj 230 111 s pd-data;
#X msg 231 90 clear;
#X obj 90 75 t b f b b;
#X msg 45 98 sort;
#X obj 182 184 select 0;
#X obj 92 216 pack 0 10;
#X msg 162 200 0;
#X msg 194 210 556;
#X obj 91 174 t f f;
#X obj 121 150 + 1;
#X obj 91 193 * 12;
#X obj 182 160 mod 4;
#X msg 89 239 \$1 150 0 \$2;
#X connect 0 0 1 0;
#X connect 1 0 2 4;
#X connect 3 0 4 0;
#X connect 4 0 15 0;
#X connect 4 0 16 0;
#X connect 5 0 4 1;
#X connect 6 0 9 0;
#X connect 8 0 7 0;
#X connect 9 0 10 0;
#X connect 9 1 3 0;
#X connect 9 2 0 0;
#X connect 9 2 5 0;
#X connect 9 3 8 0;
#X connect 10 0 7 0;
#X connect 11 0 13 0;
#X connect 11 1 14 0;
#X connect 12 0 19 0;
#X connect 13 0 12 1;
#X connect 14 0 12 1;
#X connect 15 0 17 0;
#X connect 15 1 18 0;
#X connect 16 0 4 1;
#X connect 17 0 12 0;
#X connect 18 0 11 0;
#X connect 19 0 2 0;
#X restore 40 119 pd make-a-lot;
#X floatatom 40 97 5 0 32 0 - - -;
#X obj 326 278 get slider h;
#X floatatom 326 314 5 0 0 0 - - -;
#X msg 324 98 traverse pd-data \, next;
#X obj 349 184 del 200;
#X msg 412 149 next;
#X obj 525 175 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 444 273 set slider vis;
#X msg 446 253 1;
#X obj 552 275 set slider vis;
#X msg 554 255 0;
#X obj 517 139 del;
#X obj 516 113 spigot;
#X obj 323 37 tgl 24 0 empty empty startme 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 414 207 t b p p b p b;
#X obj 323 81 select 1;
#X text 565 452 <== These are silders!;
#X obj 414 185 pointer slider;
#X msg 570 142 rewind;
#X text 26 216 struct is here:;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 6 0 20 0;
#X connect 7 0 8 0;
#X connect 8 0 20 0;
#X connect 11 0 10 0;
#X connect 13 0 12 0;
#X connect 14 0 6 0;
#X connect 15 0 14 0;
#X connect 16 0 15 1;
#X connect 16 0 18 0;
#X connect 17 0 7 0;
#X connect 17 1 4 0;
#X connect 17 3 11 0;
#X connect 17 4 10 1;
#X connect 17 4 12 1;
#X connect 17 5 13 0;
#X connect 18 0 6 0;
#X connect 20 0 17 0;
#X connect 20 2 15 0;
#X connect 20 2 9 0;
#X connect 21 0 20 0;


More information about the Pd-list mailing list