12_ev_example_osc_communication.pd 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. #N canvas 339 54 804 756 10;
  2. #X declare -path . -path .. -path data -path ../data -path ev-in -path
  3. ../ev-in -path ev-main -path ../ev-main -path ev-pano -path ../ev-pano
  4. -path ev-pro -path ../ev-pro -path libs/gil -path ../libs/gil -path
  5. libs/kollabs -path ../libs/kollabs -path media -path ../media -path
  6. ev-glsl -path ../ev-glsl;
  7. #X obj 14 14 cnv 15 750 30 empty empty Example:_osc_communication 20
  8. 12 0 14 -233017 -66577 0;
  9. #X obj 14 56 cnv 15 750 125 empty empty a_simple_patch 20 12 0 14 -262130
  10. -66577 0;
  11. #X obj 15 296 cnv 15 750 200 empty empty Registering_variables 20 12
  12. 0 14 -204800 -66577 0;
  13. #N canvas 579 25 491 216 init 0;
  14. #X obj 44 -23 cnv 15 400 100 empty empty IMPORTANT 20 12 0 14 -261234
  15. -66577 0;
  16. #X text 49 -3 Such a declare object should always be in the main patch
  17. of your project \, to set the pathes to the abstractions.;
  18. #X obj 158 43 ev-main/ev_declare;
  19. #X obj 141 94 loadbang;
  20. #X obj 141 116 f \$0;
  21. #X msg 141 138 \; /ev/pro/\$1/grid/state 1 \;;
  22. #X connect 3 0 4 0;
  23. #X connect 4 0 5 0;
  24. #X restore 631 67 pd init;
  25. #X text 477 14 (c)2012 Peter Venus & Marian Weger \; /part of EXTENDED
  26. VIEW toolkit/ gpl v3;
  27. #X obj 41 93 ev_gemwin;
  28. #X obj 478 116 ev_pro_22easy \$0;
  29. #X obj 478 91 gemhead;
  30. #X text 257 76 Click "create" to start;
  31. #X text 22 329 New variables can be registered to a storage by the
  32. [osc_...] modules.;
  33. #X text 23 364 There are three types:;
  34. #X text 23 412 [osc_bi] registers a variable for BIDIRECTIONAL osc.
  35. ;
  36. #X text 76 426 It also includes feedback prevention.;
  37. #X text 23 384 [osc_r] registers a variable to RECEIVE osc;
  38. #X text 23 398 [osc_s] registers a variable to SEND osc;
  39. #X text 24 448 SYNTAX: [osc_r <domain> <variable_name>] \, where <domain>
  40. is the name of the storage you want to register to \, and <variable_name>
  41. is the complete name of your variable.;
  42. #X obj 395 426 cnv 15 370 70 empty empty Important_note_about_domains
  43. 20 12 0 14 -261234 -258113 0;
  44. #X text 403 455 In Extended View Toolkit \, the OSC domain is always
  45. the same as the storage domain!!!;
  46. #X obj 15 501 cnv 15 750 200 empty empty Example 20 12 0 14 -204800
  47. -66577 0;
  48. #X obj 613 595 hsl 128 15 0 127 0 0 /i/send/data /i/send/data /i/send/data
  49. -2 -8 0 10 -262144 -1 -1 0 1;
  50. #X obj 621 543 nbx 5 14 -1e+37 1e+37 0 0 /i/receive/data /i/receive/data
  51. /i/receive/data 0 -8 0 10 -262144 -1 -1 18 256;
  52. #X obj 28 541 osc_r 0 /i/receive/data;
  53. #X obj 32 603 osc_s 0 /i/send/data;
  54. #X text 189 540 This registers "/i/receive/data" to receive OSC from
  55. domain "0";
  56. #X text 181 597 This registers "/i/send/data" to send OSC from domain
  57. "0";
  58. #X obj 35 660 osc_bi 0 /i/do/both;
  59. #X text 186 659 This registers "/i/do/both" for bidirectional OSC communication
  60. with domain "0";
  61. #X obj 15 712 cnv 15 750 180 empty empty OSC_Output 20 12 0 14 -204786
  62. -66577 0;
  63. #X obj 151 739 r /0/osc/out;
  64. #X obj 151 839 print /0/osc/out;
  65. #X obj 184 790 tgl 15 0 empty empty print_osc_output 17 7 0 10 -262144
  66. -1 -1 0 1;
  67. #X text 538 788 [packOSC];
  68. #X text 538 798 |;
  69. #X text 538 808 |;
  70. #X text 538 818 [udpsend 127.0.0.1];
  71. #X text 538 778 |;
  72. #X text 538 768 |;
  73. #X text 538 758 [r /0/osc/out];
  74. #X obj 15 901 cnv 15 750 220 empty empty OSC_Input 20 12 0 14 -204786
  75. -66577 0;
  76. #X text 503 1069 |;
  77. #X text 503 1079 |;
  78. #X text 503 1049 |;
  79. #X text 503 1039 |;
  80. #X obj 145 1030 s /0/osc/in;
  81. #X text 503 1029 [udreceive 127.0.0.1];
  82. #X text 503 1059 [unpackOSC];
  83. #X text 503 1089 [s /0/osc/in];
  84. #X obj 21 938 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
  85. -262144 -1 -1 0 256;
  86. #X msg 21 957 /i/receive/data \$1;
  87. #X msg 145 957 /i/do/both \$1;
  88. #X obj 148 937 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144
  89. -1 -1 0 1;
  90. #X text 224 1028 <-- put your OSC input in here. Like this:;
  91. #X obj 15 189 cnv 15 750 100 empty empty About_OSC_communication_with_Extended_View_Toolkit
  92. 20 12 0 14 -228856 -66577 0;
  93. #X text 51 219 All modules of Extended View Toolkit are prepared for
  94. OSC communication. The names of all the parameters already fit the
  95. OSC standard. How to register new variables and how to access these
  96. OSC-streams is shown below.;
  97. #X obj 613 665 hsl 128 15 0 127 0 0 /i/do/both /i/do/both /i/do/both
  98. -2 -8 0 10 -262144 -1 -1 0 1;
  99. #X text 161 760 Connect this to your OSC externals \, i.e. mrpeach
  100. or iemnet:;
  101. #X text 128 717 The OSC output can be accessed und under "/<domain>/osc/out"
  102. ;
  103. #X text 124 907 The OSC input must be sent to "/<domain>/osc/out";
  104. #X text 22 861 Play around with the patch on top of the page \, and
  105. see what's going to be printed...;
  106. #X msg 296 961 /ev/gemwin/create bang;
  107. #X msg 296 985 /ev/gemwin/destroy bang;
  108. #X text 446 965 (For a list of accessable variables \, open a module's
  109. help-patch and look for the "parameter-list");
  110. #X text 293 936 Access any variable of the toolkit by its name:;
  111. #X obj 151 815 spigot;
  112. #X connect 7 0 6 0;
  113. #X connect 28 0 63 0;
  114. #X connect 30 0 63 1;
  115. #X connect 47 0 48 0;
  116. #X connect 48 0 43 0;
  117. #X connect 49 0 43 0;
  118. #X connect 50 0 49 0;
  119. #X connect 59 0 43 0;
  120. #X connect 60 0 43 0;
  121. #X connect 63 0 29 0;
  122. #X coords 0 756 1 755 85 60 0;