pois.pd 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #N canvas 134 41 714 543 10;
  2. #X obj 185 214 random 1e+006;
  3. #X obj 185 235 + 1;
  4. #X obj 185 256 / 1e+006;
  5. #X obj 185 278 log;
  6. #X obj 185 300 * -1;
  7. #X obj 185 321 / 1;
  8. #X text 210 322 exponential distribution;
  9. #X obj 185 385 delay;
  10. #X text 240 255 (0 \, 1] uniform;
  11. #X obj 185 343 * 1000;
  12. #X obj 101 103 cnv 15 55 49 empty empty pois 1 6 0 10 -241656 -1 0
  13. ;
  14. #X obj 185 406 outlet;
  15. #X obj 101 43 inlet;
  16. #X obj 150 43 inlet;
  17. #X obj 142 105 tgl 12 0 \$0-e \$0-en en -14 4 0 10 -262144 -1 -1 0
  18. 1;
  19. #X obj 105 320 spigot;
  20. #X obj 124 235 max 0.001;
  21. #X obj 228 406 outlet;
  22. #X floatatom 103 134 5 0 100000 1 min #0-min #0-m;
  23. #X obj 205 43 inlet;
  24. #X obj 185 364 max 0;
  25. #X obj 185 172 t b f;
  26. #X obj 185 193 spigot;
  27. #X floatatom 103 116 5 0 1000 1 lam #0-lam #0-l;
  28. #X text 270 404 second outlet is for delay time to next event;
  29. #X text 54 404 first outlet is bang;
  30. #X text 245 170 min lambda is 0.001 to prevent div by 0;
  31. #X obj 101 63 s \$0-en;
  32. #X obj 150 63 s \$0-lam;
  33. #X obj 205 63 s \$0-min;
  34. #X obj 138 300 r \$0-e;
  35. #X obj 185 152 r \$0-e;
  36. #X obj 124 215 r \$0-l;
  37. #X obj 229 347 r \$0-m;
  38. #X obj 59 46 r go;
  39. #X text 261 -6 Poisson distribution event generator en = enable (on/off)
  40. lam = lambda (mean number of events per second) \; determines density
  41. of events min = minimum time between events in ms (this is clipped
  42. \, not added). The second outlet is useful for creating piecewise linear
  43. functions or automatically scaling envelope times. Note that unlike
  44. other abstractions \, this doesn't use a separate "panel" \, and the
  45. inlets aren't in a sensible order due to a re-arranged layout. Usually
  46. "pois" parameters in other abstractions refer to the lambda setting
  47. here. If lam is set to a new value \, it will take effect once the
  48. next event is triggered. If lam is set to a very low value \, there
  49. may be a very long delay before the next event. In this case \, it
  50. can be turned off and on once to restart with a new lambda value.;
  51. #X text 407 248 Scott Nordlund \, 2011;
  52. #X text 407 266 Contact: limina@live.com.;
  53. #X text 408 285 Last revised: 08-03-2011.;
  54. #X connect 0 0 1 0;
  55. #X connect 1 0 2 0;
  56. #X connect 2 0 3 0;
  57. #X connect 3 0 4 0;
  58. #X connect 4 0 5 0;
  59. #X connect 5 0 9 0;
  60. #X connect 7 0 11 0;
  61. #X connect 7 0 15 0;
  62. #X connect 9 0 20 0;
  63. #X connect 12 0 27 0;
  64. #X connect 13 0 28 0;
  65. #X connect 15 0 0 0;
  66. #X connect 16 0 5 1;
  67. #X connect 19 0 29 0;
  68. #X connect 20 0 7 0;
  69. #X connect 20 0 17 0;
  70. #X connect 21 0 22 0;
  71. #X connect 21 1 22 1;
  72. #X connect 22 0 0 0;
  73. #X connect 30 0 15 1;
  74. #X connect 31 0 21 0;
  75. #X connect 32 0 16 0;
  76. #X connect 33 0 20 1;
  77. #X connect 34 0 27 0;
  78. #X coords 0 -1 1 1 57 55 1 100 100;