list-sort-help.pd 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #N canvas 0 31 628 576 10;
  2. #X obj 188 357 hradio 15 1 0 2 empty empty empty 0 -8 0 10 -262144
  3. -1 -1 0;
  4. #X msg 232 357 asc;
  5. #X msg 270 357 desc;
  6. #X obj 35 11 list-sort;
  7. #X obj 93 205 list-random 100 10;
  8. #X obj 125 256 prepent set;
  9. #X msg 93 179 bang;
  10. #X obj 93 230 t b a;
  11. #X msg 93 291 91 35 78 70 85 46 64 10 93 83;
  12. #X text 279 324 non-floats are removed with a warning.;
  13. #X msg 135 324 100 2 wrong type 3;
  14. #X obj 93 441 prepent set;
  15. #X text 55 523 2008 Michal Seta;
  16. #X obj 93 396 list-sort desc;
  17. #X text 66 80 Inlets: 1) list to sort;
  18. #X text 66 134 Argument:;
  19. #X text 121 98 2) direction: 0 or asc for ascending \, 1 or desc for
  20. descending;
  21. #X text 137 134 <direction: 0/asc for ascending \, 1/desc for descending>
  22. ;
  23. #X text 65 40 Sort an incoming list of values in ascending or descending
  24. order. Non-numbers are dropped.;
  25. #N canvas 506 181 494 396 META 0;
  26. #X text 12 25 LICENSE SIBSD;
  27. #X text 12 155 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information
  28. added by Jonathan Wilkes for Pd version 0.42.;
  29. #X text 12 5 KEYWORDS control list_op;
  30. #X text 12 135 AUTHOR Michal Seta;
  31. #X text 12 45 DESCRIPTION sort an incoming list of values in ascending
  32. or descending order;
  33. #X text 12 75 INLET_0 list;
  34. #X text 12 95 INLET_1 float asc desc;
  35. #X text 12 115 OUTLET_0 list;
  36. #X restore 571 544 pd META;
  37. #X msg 93 470;
  38. #X connect 0 0 13 1;
  39. #X connect 1 0 13 1;
  40. #X connect 2 0 13 1;
  41. #X connect 4 0 7 0;
  42. #X connect 5 0 8 0;
  43. #X connect 6 0 4 0;
  44. #X connect 7 0 8 0;
  45. #X connect 7 1 5 0;
  46. #X connect 8 0 13 0;
  47. #X connect 10 0 13 0;
  48. #X connect 11 0 20 0;
  49. #X connect 13 0 11 0;