[PD] drawnumber_motion: scalar disappeared

m.weiss weiss at weiss-archiv.de
Mon Oct 9 19:44:24 CEST 2006


great
it works with 0.40-1
many thanks for the fix
i m the happiest boy in town
gruss
m.weiss

Miller Puckette schrieb:
> Hmm.  It's a bug all right.  I've tried to fix it (will appear
> in the upcoming 0.40-1, maybe in a test version Tuesday if I
> can get it together.)  thanks for the report.
> 
> Miller
> 
> On Thu, Oct 05, 2006 at 11:02:19AM +0200, m.weiss wrote:
> 
>>salut frank
>>attached patch should illustrate it better
>>each element of the ds-array works like a numberbox
>>on 0.40-0 it doesnt do anything and i get these message
>>maybe im doing something wrong????
>>danke
>>gruss
>>m.weiss
>>
>>Frank Barknecht schrieb:
>>
>>>Hallo,
>>>m.weiss hat gesagt: // m.weiss wrote:
>>>
>>>
>>>
>>>>salut again
>>>>this seems to be a bug
>>>>happens only when using ds-arrays
>>>
>>>
>>>Hm, does the float field in your element-template have to be called
>>>"f"? It seems like "y" would be a better name, if you want to plot the
>>>array. You cannot [plot] an array unless it has an "y" field according
>>>to the original help file 4.data.structures/05.array.pd
>>>
>>>Ciao
>>
>>
> 
>>#N struct template5 float x float y array bazoo template5-element;
>>#N struct template5-element float f;
>>#N canvas 303 366 737 484 12;
>>#X obj 235 323 pointer;
>>#X floatatom 232 183 0 0 0 0 - - -;
>>#X msg 235 300 bang;
>>#X floatatom 15 200 0 0 0 0 - - -;
>>#X floatatom 17 350 0 0 0 0 - - -;
>>#X floatatom 235 369 0 0 0 0 - - -;
>>#X floatatom 451 276 0 0 0 0 - - -;
>>#X obj 451 229 pointer;
>>#X obj 318 163 pointer;
>>#X msg 449 194 bang;
>>#N canvas 359 19 514 312 data5 1;
>>#X scalar template5 50 150 \; 0 \; 0 \; 0 \; 0 \; 0 \; 3 \; 0 \; 0
>>\; 0 \; 7 \; 30 \; 0 \; 0 \; 0 \; 0 \; 43 \; \;;
>>#X restore 508 314 pd data5;
>>#N canvas 470 534 666 280 template5 0;
>>#X text 6 44 this declares an array named "bazoo" whose elements are
>>described by "template5-element." Array declarations take three arguments
>>while "float" declarations take only two.;
>>#X text 6 136 Here we ask to plot the array \, color 700 \, line width
>>3 \, starting location (30 \, 10) relative to the scalar \, points
>>spaced 4 apart.;
>>#X text 7 186 You can also do (x \, y) plots and/or make the line thickness
>>variable---see the help window for "plot".;
>>#X obj 6 8 struct template5 float x float y array bazoo template5-element
>>;
>>#X obj 8 113 plot bazoo 0 1 0 40 22;
>>#X restore 508 337 pd template5;
>>#N canvas 518 432 588 345 template5-element 0;
>>#X text 12 36 This says that array elements will have a single floating-point
>>number named "y". The variable name "y" is automatically assumed to
>>control screen height \; if you don't have at least that variable you
>>can't plot the array..;
>>#X obj 35 11 struct template5-element float f;
>>#X obj 34 129 filledpolygon 999 0 1 0 0 22 0 22 14 0 14;
>>#X obj 37 211 drawnumber f 0 0 0;
>>#X restore 508 360 pd template5-element;
>>#N canvas 515 84 613 453 stuff 0;
>>#X obj 354 163 pointer;
>>#X obj 136 102 t b b b;
>>#X msg 136 61 bang;
>>#X text 170 61 click here to re-initialize;
>>#X msg 354 100 \; pd-data5 clear;
>>#X msg 354 140 traverse pd-data5 \, bang;
>>#X obj 284 307 setsize template5 bazoo;
>>#X obj 137 23 loadbang;
>>#X obj 134 191 t b b p;
>>#X floatatom 68 327 0 0 0 0 - - -;
>>#X floatatom 14 332 0 0 0 0 - - -;
>>#X obj 68 350 element template5 bazoo;
>>#X obj 20 303 unpack;
>>#X obj 14 376 set template5-element f;
>>#X msg 283 280 16;
>>#X obj 134 163 append template5 x y;
>>#X msg 134 140 50 150;
>>#X msg 12 258 3 5 \, 7 9 \, 30 10 \, 43 45;
>>#X connect 0 0 15 2;
>>#X connect 1 0 16 0;
>>#X connect 1 1 5 0;
>>#X connect 1 2 4 0;
>>#X connect 2 0 1 0;
>>#X connect 5 0 0 0;
>>#X connect 7 0 2 0;
>>#X connect 8 0 17 0;
>>#X connect 8 1 14 0;
>>#X connect 8 2 6 1;
>>#X connect 8 2 11 1;
>>#X connect 9 0 11 0;
>>#X connect 10 0 13 0;
>>#X connect 11 0 13 1;
>>#X connect 12 0 10 0;
>>#X connect 12 1 9 0;
>>#X connect 14 0 6 0;
>>#X connect 15 0 8 0;
>>#X connect 16 0 15 0;
>>#X connect 17 0 12 0;
>>#X restore 508 383 pd stuff;
>>#X msg 318 140 traverse pd-data5 \, next;
>>#X obj 451 252 getsize template5 bazoo;
>>#X obj 232 229 setsize template5 bazoo;
>>#X obj 17 373 set template5-element y;
>>#X obj 235 346 get template5-element y;
>>#X obj 15 223 element template5 bazoo;
>>#X text 38 15 Scalars may contain arrays \, and moreover the elements
>>of an array can be of any scalar type (and can have sub-arrays recursively.)
>>The type of the element of an array is fixed in the template. In this
>>case \, "template5" contains the definition of the top-level scalar
>>and "template5-element" is the template of each array element (see
>>the template subpatch.);
>>#X text 328 121 click to get pointer;
>>#X text 449 173 get size;
>>#X text 221 158 set size;
>>#X text 16 133 select an individual;
>>#X text 16 153 element \, which is a;
>>#X text 14 169 scalar with template;
>>#X text 104 189 template5;
>>#X text 12 413 work as before \, but on;
>>#X text 12 433 array elements...;
>>#X text 433 424 Updated for Pd version 0.35;
>>#X text 17 395 normal "set" amd "get";
>>#X connect 0 0 18 0;
>>#X connect 1 0 16 0;
>>#X connect 2 0 0 0;
>>#X connect 3 0 19 0;
>>#X connect 4 0 17 0;
>>#X connect 7 0 15 0;
>>#X connect 8 0 16 1;
>>#X connect 8 0 19 1;
>>#X connect 8 0 7 0;
>>#X connect 9 0 7 0;
>>#X connect 14 0 8 0;
>>#X connect 15 0 6 0;
>>#X connect 18 0 5 0;
>>#X connect 19 0 0 0;
>>#X connect 19 0 17 1;
>>
> 
> 
>>_______________________________________________
>>PD-list at iem.at mailing list
>>UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
> 
> 
> 
> 





More information about the Pd-list mailing list