hi !

i submit you a little abstraction i made using the list-abs/ abstractions... i 
don't know if objects doing that already exist, but the idea is to move one 
element in a list, without changing the others.
i made it to change the rendering order in a Gem-based patch, in the spirit of 
the "layers" in many well-known image manipulation softwares. This should 
explain why it only works with floats lists. I also did not take care of the 
cases you try to move an element out of the "range" (i mean the list length)
maybe looking at the attached patch will be more meaningful than my poor 
english...
every comments are welcome (even to say it has already been made !)

ciao

raphaël

__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible 
contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail 
#N canvas 348 201 454 271 10;
#X obj 116 225 print sorted;
#X msg 146 84 -1;
#X msg 176 84 1;
#X obj 116 117 t b f;
#X obj 116 155 hradio 15 1 0 8 empty empty empty 0 -6 0 10 -262144
-1 -1 2;
#X msg 206 84 2;
#X msg 116 84 -2;
#X msg 246 177 0 1 2 3 4 5 6 7;
#X obj 246 127 loadbang;
#X obj 116 194 list-ordre;
#X text 44 13 the idea is to "move" one element (inlet 1) of the list
of a number of steps (inlet 2) to the beginning of the list (negative
int) or to the end (positive). the list to change is stored in the
third inlet.;
#X connect 1 0 3 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 3 1 9 1;
#X connect 4 0 9 0;
#X connect 5 0 3 0;
#X connect 6 0 3 0;
#X connect 7 0 9 2;
#X connect 8 0 7 0;
#X connect 9 0 0 0;
#N canvas 26 87 628 559 10;
#X obj 172 312 f;
#X obj 235 151 +;
#X obj 172 342 list-insert;
#X obj 172 222 list;
#X obj 172 262 t b a;
#X obj 253 291 list-idx;
#X obj 172 91 unpack f f;
#X obj 172 131 t b b f f f;
#X obj 253 271 list;
#X obj 172 55 inlet;
#X obj 172 242 list-delete 0 1;
#X obj 298 55 inlet;
#X obj 250 55 inlet;
#X obj 172 383 outlet;
#X connect 0 0 2 0;
#X connect 1 0 2 1;
#X connect 2 0 13 0;
#X connect 3 0 10 0;
#X connect 4 0 0 0;
#X connect 4 1 2 2;
#X connect 5 0 0 1;
#X connect 6 0 7 0;
#X connect 6 1 1 1;
#X connect 7 0 3 0;
#X connect 7 1 8 0;
#X connect 7 2 5 1;
#X connect 7 3 10 1;
#X connect 7 4 1 0;
#X connect 8 0 5 0;
#X connect 9 0 6 0;
#X connect 10 0 4 0;
#X connect 11 0 3 1;
#X connect 11 0 5 1;
#X connect 11 0 8 1;
#X connect 12 0 1 1;
_______________________________________________
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to