udpsend~-help.pd 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. #N canvas 1 53 785 621 10;
  2. #X obj -178 225 osc~ 440;
  3. #X msg -398 60 disconnect;
  4. #X msg -353 105 format float;
  5. #X msg -332 126 format 16bit;
  6. #X msg -311 147 format 8bit;
  7. #X msg -440 18 connect localhost 8008;
  8. #X text -244 103 float is the most expensive with the best resolution
  9. (32bit) \, default is float;
  10. #X msg -419 39 connect 255.255.255.255 8008;
  11. #X obj 52 687 print udpreceive~;
  12. #X obj 224 369 print udpsend~;
  13. #X obj -178 320 tgl 15 0 empty empty empty 17 7 0 10 -4034 -1 -1 0
  14. 1;
  15. #X symbolatom -97 435 10 0 0 0 - - -;
  16. #X floatatom -44 369 5 0 0 0 - - -;
  17. #X floatatom 10 391 9 0 0 0 - - -;
  18. #X floatatom 63 411 9 0 0 0 - - -;
  19. #X symbolatom 117 390 10 0 0 0 - - -;
  20. #X obj -97 411 prepend set;
  21. #X obj 117 367 prepend set;
  22. #X text -102 368 channels:;
  23. #X text -144 442 format:;
  24. #X text 13 411 bitrate:;
  25. #X text -51 391 framesize:;
  26. #X text 98 389 to:;
  27. #X msg -216 242 info;
  28. #X symbolatom -293 774 10 0 0 0 - - -;
  29. #X floatatom -259 708 5 0 0 0 - - -;
  30. #X floatatom -224 687 7 0 0 0 - - -;
  31. #X floatatom -190 752 9 0 0 0 - - -;
  32. #X obj -293 733 prepend set;
  33. #X text -323 707 channels:;
  34. #X text -339 773 format:;
  35. #X text -239 751 bitrate:;
  36. #X text -288 686 framesize:;
  37. #X floatatom -155 709 9 0 0 0 - - -;
  38. #X floatatom -121 687 9 0 0 0 - - -;
  39. #X floatatom -86 730 5 0 0 0 - - -;
  40. #X floatatom -52 709 5 0 0 0 - - -;
  41. #X text -212 708 overflow:;
  42. #X text -181 686 underflow:;
  43. #X text -147 729 queuesize:;
  44. #X text -100 708 average:;
  45. #X msg -435 478 info;
  46. #X text -237 34 broadcast to everybody on your local subnet listening
  47. on the specified port;
  48. #X msg -455 458 reset;
  49. #X text -402 477 status info to rightmost outlet;
  50. #X text -415 241 status info to rightmost outlet;
  51. #X text -417 457 reset underflow & overflow counters;
  52. #X floatatom -260 589 3 0 0 0 - - -;
  53. #X floatatom -237 589 3 0 0 0 - - -;
  54. #X floatatom -214 589 3 0 0 0 - - -;
  55. #X floatatom -191 589 3 0 0 0 - - -;
  56. #X floatatom -167 589 5 0 0 0 - - -;
  57. #X obj -260 563 unpack 0 0 0 0 0;
  58. #X text -297 588 from:;
  59. #X obj -179 268 *~;
  60. #X floatatom -124 150 5 0 0 0 - - -;
  61. #X text -66 148 Framesize = (blocksize) X (number of channels) X (bytes
  62. per sample);
  63. #X obj -97 339 route format channels framesize bitrate ipaddr vecsize
  64. ;
  65. #X floatatom 170 430 9 0 0 0 - - -;
  66. #X text 70 430 dsp vector size:;
  67. #X msg -258 200 channels \$1;
  68. #X obj -412 185 hradio 15 1 0 4 empty empty empty 0 -8 0 10 -4034 -1
  69. -1 0;
  70. #X obj -178 297 udpsend~ 2 512;
  71. #X text -88 296 sends 2 dsp-channels using 512-sample blocks;
  72. #X obj -388 572 dac~ 1 2;
  73. #X text 68 448 (blocksize must be a multiple of this);
  74. #X text -160 318 1 = transmitting;
  75. #X obj -97 246 noise~;
  76. #X obj -98 268 *~;
  77. #X obj -124 170 / 100;
  78. #X text -455 343 Based on: [netreceive~] and [netsend~]by Olaf Matthes
  79. ;
  80. #X floatatom -17 752 9 0 0 0 - - -;
  81. #X text -69 751 packets:;
  82. #X text -50 177 Default blocksize is 2048 The number of samples per
  83. block must be an integer multiple of the number of samples in one signal
  84. vector.;
  85. #X text -28 225 Arguments: (1st required \, 2nd optional) 1:number
  86. of channels to send. 2:blocksize = number of samples per channel per
  87. frame. (Blocksize of sender and receiver must be the same.);
  88. #X text -122 562 To communicate \, a [udpreceive~] and [udpsend~] pair
  89. must have the same number of channels and the same blocksize. Also
  90. [udpsend~] must [connect( to the port on which [udpreceive~] is listening.
  91. ;
  92. #X text -329 59 stop transmitting;
  93. #X text -355 76 format defines the resolution of the sent signal and
  94. may be changed on-the-fly;
  95. #X text -450 200 number of channels to transmit;
  96. #X msg -414 499 buffer 2;
  97. #X text -352 498 set number of frames to buffer before playback;
  98. #X text -458 368 [udpsend~] transmits dsp vectors ("audio") via UDP.
  99. UDP is a connectionless protocol \, so [udpsend~] will transmit even
  100. if nothing is receiving.;
  101. #X text -299 18 connect to <hostname> <port> and begin transmitting
  102. ;
  103. #X text -456 313 [udpreceive~] and [udpsend~];
  104. #X text -249 540 receives 2 channels on port 8008 Same blocksize as
  105. udpsend~;
  106. #X floatatom -412 216 5 0 0 0 - - -;
  107. #X obj -288 172 tgl 15 0 empty empty toggle_connection 17 7 0 10 -4034
  108. -1 -1 0 1;
  109. #X obj -293 650 route format channels framesize bitrate overflow underflow
  110. queuesize average packets tag_errors;
  111. #X floatatom 17 730 9 0 0 0 - - -;
  112. #X text -49 729 tag errors:;
  113. #X obj -326 601 env~;
  114. #X floatatom -326 624 9 0 0 0 - - -;
  115. #X text -266 613 The rightmost signal outlet outputs 1 if the stream
  116. is valid \, else 0;
  117. #N canvas 27 271 657 334 multicast 0;
  118. #X msg 91 87 multicast_interface 192.168.0.88;
  119. #X msg 66 62 multicast_interface eth1;
  120. #X text 229 13 send to a multicast address;
  121. #X text 201 38 specify an interface to use with multicast;
  122. #X msg 43 39 multicast_interface 1;
  123. #X text 251 61 by index \, name or address;
  124. #X floatatom 183 112 5 0 256 0 - - -;
  125. #X obj 165 135 f 1;
  126. #X obj 165 115 bng 15 250 50 0 empty empty empty 17 7 0 10 -4034 -1
  127. -1;
  128. #X text 17 136 set multicast ttl:;
  129. #X msg 165 161 multicast_ttl \$1;
  130. #X msg 215 211 multicast_loopback \$1;
  131. #X obj 215 189 tgl 15 0 empty empty empty 20 7 0 8 -24198 -241291 -1
  132. 0 1;
  133. #X text 26 187 enable multicast loopback:;
  134. #X obj 244 257 outlet;
  135. #X msg 18 14 connect 239.200.200.200 8008;
  136. #X text 262 278 [udpreceive~ 8008 2 512 239.200.200.200];
  137. #X text -70 278 Will be received by any udpreceive~ declared like this:
  138. ;
  139. #X text 347 295 (2 and 512 may be changed);
  140. #X connect 0 0 14 0;
  141. #X connect 1 0 14 0;
  142. #X connect 4 0 14 0;
  143. #X connect 6 0 7 1;
  144. #X connect 7 0 10 0;
  145. #X connect 8 0 7 0;
  146. #X connect 10 0 14 0;
  147. #X connect 11 0 14 0;
  148. #X connect 12 0 11 0;
  149. #X connect 15 0 14 0;
  150. #X restore -347 280 pd multicast;
  151. #X obj -389 541 udpreceive~ 8008 2 512;
  152. #X text -50 497 Arguments: port \, channels \, blocksize \, multicast_address.
  153. Blocksize should match [udpsend~]. multicast_address is optional. Arguments
  154. must be in that order.;
  155. #X text -455 328 Author: Martin Peach 2010/10/28;
  156. #N canvas 529 111 494 344 META 0;
  157. #X text 12 175 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan
  158. Wilkes for Pd version 0.42.;
  159. #X text 12 25 LICENSE GPL v2 or later;
  160. #X text 12 155 AUTHOR Martin Peach;
  161. #X text 12 5 KEYWORDS control network;
  162. #X text 12 45 DESCRIPTION transmit dsp vectors ("audio") via UDP;
  163. #X text 12 65 INLET_0 signal connect disconnect format channels info
  164. multicast_interface multicast_ttl multicast_loopback;
  165. #X text 12 95 INLET_1 signal;
  166. #X text 12 115 OUTLET_0 float;
  167. #X text 12 135 OUTLET_1 format channels framesize bitrate ipaddr vecsize
  168. ;
  169. #X restore 248 760 pd META;
  170. #X connect 0 0 54 0;
  171. #X connect 1 0 62 0;
  172. #X connect 2 0 62 0;
  173. #X connect 3 0 62 0;
  174. #X connect 4 0 62 0;
  175. #X connect 5 0 62 0;
  176. #X connect 7 0 62 0;
  177. #X connect 16 0 11 0;
  178. #X connect 17 0 15 0;
  179. #X connect 23 0 62 0;
  180. #X connect 28 0 24 0;
  181. #X connect 41 0 94 0;
  182. #X connect 43 0 94 0;
  183. #X connect 52 0 47 0;
  184. #X connect 52 1 48 0;
  185. #X connect 52 2 49 0;
  186. #X connect 52 3 50 0;
  187. #X connect 52 4 51 0;
  188. #X connect 54 0 62 0;
  189. #X connect 55 0 69 0;
  190. #X connect 57 0 16 0;
  191. #X connect 57 1 12 0;
  192. #X connect 57 2 13 0;
  193. #X connect 57 3 14 0;
  194. #X connect 57 4 17 0;
  195. #X connect 57 5 58 0;
  196. #X connect 57 6 9 0;
  197. #X connect 60 0 62 0;
  198. #X connect 61 0 60 0;
  199. #X connect 61 0 85 0;
  200. #X connect 62 0 10 0;
  201. #X connect 62 1 57 0;
  202. #X connect 67 0 68 0;
  203. #X connect 68 0 62 1;
  204. #X connect 69 0 54 1;
  205. #X connect 69 0 68 1;
  206. #X connect 79 0 94 0;
  207. #X connect 86 0 62 0;
  208. #X connect 87 0 28 0;
  209. #X connect 87 1 25 0;
  210. #X connect 87 2 26 0;
  211. #X connect 87 3 27 0;
  212. #X connect 87 4 33 0;
  213. #X connect 87 5 34 0;
  214. #X connect 87 6 35 0;
  215. #X connect 87 7 36 0;
  216. #X connect 87 8 71 0;
  217. #X connect 87 9 88 0;
  218. #X connect 87 10 8 0;
  219. #X connect 90 0 91 0;
  220. #X connect 93 0 62 0;
  221. #X connect 94 0 64 0;
  222. #X connect 94 1 64 1;
  223. #X connect 94 2 90 0;
  224. #X connect 94 3 87 0;
  225. #X connect 94 4 52 0;