list-replace-help.pd 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #N canvas 0 31 583 391 10;
  2. #X msg 287 266 0 1 2 3 4 5;
  3. #X obj 194 343 print RESULT;
  4. #X obj 240 244 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
  5. -1 0;
  6. #X floatatom 240 265 5 0 0 0 - - -;
  7. #X obj 194 298 list-replace 2;
  8. #X text 50 32 list-replace: Replace the list starting at position POS
  9. with a new list \, overwriting the old elements.;
  10. #X text 49 92 POS is zerobased and can be negative \, in which case
  11. it is taken from the end of the orig. list.;
  12. #X text 49 67 Argument: default POS;
  13. #X text 49 129 If POS exceeds the length of the original list in whatever
  14. direction \, is is prepended resp. appended to the orig. list.;
  15. #X msg 194 190 list aa bb;
  16. #X msg 194 216 list aa bb cc dd ee ff gg;
  17. #X msg 194 167 aa;
  18. #N canvas 472 161 494 396 META 0;
  19. #X text 12 25 LICENSE SIBSD;
  20. #X text 12 155 AUTHOR Frank Barknecht;
  21. #X text 12 175 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information
  22. added by Jonathan Wilkes for Pd version 0.42.;
  23. #X text 12 5 KEYWORDS control list_op;
  24. #X text 12 75 INLET_0 anything;
  25. #X text 12 95 INLET_1 float;
  26. #X text 12 115 INLET_2 list;
  27. #X text 12 135 OUTLET_0 list;
  28. #X text 12 45 DESCRIPTION replace the list starting at position POS
  29. with a new list \, overwriting the old elements;
  30. #X restore 523 358 pd META;
  31. #X connect 0 0 4 2;
  32. #X connect 2 0 3 0;
  33. #X connect 3 0 4 1;
  34. #X connect 4 0 1 0;
  35. #X connect 9 0 4 0;
  36. #X connect 10 0 4 0;
  37. #X connect 11 0 4 0;