Hi guys.
So I'm relatively new to PD, and right now I'm trying to make a set number of discrete objects (20 of them) created along a spline path. In the cityscape1 subpatch in the patch below, I've set up an array to be randomly populated on a bang from the main patch screen. I'd like the objects in the gemlist in the cityscape1 subpatch to use that array, via spline_path, to generate each object's y-axis value. Obviously, how I've set it up is simply creating a straight line of evenly placed circles, rather than conforming to the path as set. What am I doing wrong, or is there another way to do this? Thanks.
----Attachment----
#N canvas 1282 113 450 300 10; #X obj 60 185 gemwin; #X msg 45 159 create; #X msg 103 159 destroy; #X msg 83 124 dimen 1024 768; #X obj 25 189 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X msg 43 93 lighting 1; #X msg 50 67 lighting 0; #N canvas 0 22 450 300 letterbox 0; #X obj 26 34 gemhead; #X obj 26 59 color 0 0 0; #X obj 26 85 translate 0 5 0; #X obj 26 112 rectangle 9 2; #X obj 136 85 translate 0 -5 0; #X obj 135 112 rectangle 9 2; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 0 4 0; #X connect 2 0 3 0; #X connect 4 0 5 0; #X restore 201 76 pd letterbox; #N canvas 1252 399 602 414 cityscape1 1; #X obj 31 24 inlet; #X obj 320 -3 inlet; #X obj 31 51 alpha; #N canvas 802 631 450 300 lightarray 1; #X obj 19 13 inlet; #X obj 20 147 randomF 1; #X obj 20 69 f; #X obj 55 68 + 1; #X obj 19 39 metro 100; #X msg 20 120 stop; #N canvas 0 22 450 300 (subpatch) 0; #X array lightarray 8 float 5; #A 0 0.954794 0.628871 0.729569 0.513401 0.95223 0.916195 0.635712 0.717297; #X coords 0 1 7 0 200 140 1; #X restore 178 23 graph; #X obj 21 200 tabwrite lightarray; #X msg 87 67 0; #X obj 55 94 - 1; #X obj 55 120 sel 7; #X obj 20 172 moses 0.5; #X obj 87 172 * 2; #X connect 0 0 4 0; #X connect 0 0 8 0; #X connect 1 0 11 0; #X connect 2 0 3 0; #X connect 3 0 2 1; #X connect 3 0 9 0; #X connect 4 0 2 0; #X connect 4 0 1 0; #X connect 5 0 4 0; #X connect 8 0 2 1; #X connect 9 0 10 0; #X connect 9 0 7 1; #X connect 10 0 5 0; #X connect 11 0 12 0; #X connect 11 1 7 0; #X connect 12 0 7 0; #X restore 320 25 pd lightarray; #X obj 31 73 t b a; #X msg 31 96 20; #X obj 31 119 until; #X obj 31 143 gemlist; #X obj 31 166 circle 0.1; #X obj 32 214 gemlist_info; #X obj 103 240 unpack f f f; #X floatatom 102 268 5 0 0 0 - - -; #X floatatom 139 268 5 0 0 0 - - -; #X floatatom 175 268 5 0 0 0 - - -; #X obj 217 268 spline_path lightarray; #X obj 32 190 translateXYZ 0.1 0 0; #X connect 0 0 2 0; #X connect 1 0 3 0; #X connect 2 0 4 0; #X connect 4 0 5 0; #X connect 4 1 7 1; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 15 0; #X connect 9 4 10 0; #X connect 10 0 11 0; #X connect 10 1 12 0; #X connect 10 2 13 0; #X connect 12 0 14 0; #X connect 14 0 15 2; #X connect 15 0 9 0; #X restore 203 210 pd cityscape1; #X obj 202 111 gemhead; #X obj 203 135 rotateXYZ 0 0 0; #X obj 203 160 translateXYZ 0 0 0; #X obj 278 184 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 3 0 0 0; #X connect 4 0 0 0; #X connect 4 0 12 0; #X connect 5 0 0 0; #X connect 6 0 0 0; #X connect 9 0 10 0; #X connect 10 0 11 0; #X connect 11 0 8 0; #X connect 12 0 8 1;
Ok. I switched it to a double-gemhead situation, but the pd window is telling me there's no array to be read by spline_path. I've checked the spelling, rewritten the array, and can't figure this out for the life of me.
the object needs to be created with the number of dimensions of the array as the first argument. So [spline_path 1 lightarray] will work. I guess that error message should make that clearer.
On Tue, Jan 20, 2009 at 11:02 PM, Jeff Siegel cillemall111@gmail.comwrote:
Ok. I switched it to a double-gemhead situation, but the pd window is telling me there's no array to be read by spline_path. I've checked the spelling, rewritten the array, and can't figure this out for the life of me.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
That was it! Thanks!
Jeff
On Wed, Jan 21, 2009 at 1:05 AM, chris clepper cgclepper@gmail.com wrote:
the object needs to be created with the number of dimensions of the array as the first argument. So [spline_path 1 lightarray] will work. I guess that error message should make that clearer.
On Tue, Jan 20, 2009 at 11:02 PM, Jeff Siegel cillemall111@gmail.comwrote:
Ok. I switched it to a double-gemhead situation, but the pd window is telling me there's no array to be read by spline_path. I've checked the spelling, rewritten the array, and can't figure this out for the life of me.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list