list-random-help.pd 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #N canvas 0 31 634 420 10;
  2. #N canvas 435 477 293 176 show 0;
  3. #X obj 77 36 inlet;
  4. #X obj 77 109 outlet;
  5. #X obj 77 60 list prepend set;
  6. #X obj 77 85 list trim;
  7. #X connect 0 0 2 0;
  8. #X connect 2 0 3 0;
  9. #X connect 3 0 1 0;
  10. #X restore 105 331 pd show;
  11. #X msg 105 194 bang;
  12. #X msg 150 194 seed 123;
  13. #X floatatom 148 243 5 0 0 2 range - -;
  14. #X floatatom 191 243 5 0 0 2 length - -;
  15. #X text 63 26 [list-random];
  16. #X obj 105 265 list-random 5;
  17. #X text 101 119 A seed-message is used to seed the random number generator.
  18. ;
  19. #X obj 172 140 random;
  20. #X text 103 141 Also see:;
  21. #X text 103 55 generates a list of pseudorandom integers from 0 to
  22. N-1 \, where N is the first creation argument. The second creation
  23. argument specifies the length of the list (minimum and default length
  24. is 1).;
  25. #N canvas 435 477 293 176 show 0;
  26. #X obj 77 36 inlet;
  27. #X obj 77 109 outlet;
  28. #X obj 77 60 list prepend set;
  29. #X obj 77 85 list trim;
  30. #X connect 0 0 2 0;
  31. #X connect 2 0 3 0;
  32. #X connect 3 0 1 0;
  33. #X restore 289 331 pd show;
  34. #X msg 289 351;
  35. #X msg 289 194 bang;
  36. #X msg 334 194 seed 123;
  37. #X floatatom 346 243 5 0 0 2 range - -;
  38. #X floatatom 403 243 5 0 0 2 length - -;
  39. #X obj 289 265 list-random 10 20;
  40. #X msg 114 307 bang;
  41. #X msg 297 308 bang;
  42. #N canvas 506 181 494 396 META 0;
  43. #X text 12 25 LICENSE SIBSD;
  44. #X text 12 155 AUTHOR Frank Barknecht;
  45. #X text 12 175 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information
  46. added by Jonathan Wilkes for Pd version 0.42.;
  47. #X text 12 45 DESCRIPTION generates a list of pseudorandom integers
  48. from 0 to N-1 \, where N is the first creation argument;
  49. #X text 12 5 KEYWORDS control list_op random;
  50. #X text 12 75 INLET_0 bang seed;
  51. #X text 12 95 INLET_1 float;
  52. #X text 12 115 INLET_2 float;
  53. #X text 12 135 OUTLET_0 list float;
  54. #X restore 567 386 pd META;
  55. #X msg 105 351;
  56. #X connect 0 0 21 0;
  57. #X connect 1 0 6 0;
  58. #X connect 2 0 6 0;
  59. #X connect 3 0 6 1;
  60. #X connect 4 0 6 2;
  61. #X connect 6 0 0 0;
  62. #X connect 11 0 12 0;
  63. #X connect 13 0 17 0;
  64. #X connect 14 0 17 0;
  65. #X connect 15 0 17 1;
  66. #X connect 16 0 17 2;
  67. #X connect 17 0 11 0;
  68. #X connect 18 0 0 0;
  69. #X connect 19 0 11 0;