From 37ef6d993986138d145bb50457a41a1db1714c1e Mon Sep 17 00:00:00 2001 From: George Rappel Date: Mon, 23 Nov 2015 09:11:43 -0200 Subject: [PATCH] Update PD basic send and receive --- Exemplos/PD/basic/osc-receive.pd | 14 +++++---- Exemplos/PD/basic/osc-send.pd | 52 +++++++++++++++++--------------- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/Exemplos/PD/basic/osc-receive.pd b/Exemplos/PD/basic/osc-receive.pd index a94d899..b19fc15 100644 --- a/Exemplos/PD/basic/osc-receive.pd +++ b/Exemplos/PD/basic/osc-receive.pd @@ -6,11 +6,13 @@ #X obj 139 11 unpackOSC; #X obj 139 -21 udpreceive 22244; #X obj 175 51 print rede; -#X text 146 88 Prints only this route; -#X text 176 35 Prints every message; -#X obj 139 103 route /hiperbot/temp; -#X obj 139 136 print Hiperbot; +#X floatatom 272 139 5 0 0 0 - - -; +#X obj 139 103 route /shast/temp; +#X text 176 35 Print all messages; +#X text 146 88 Filter only this route; +#X obj 139 136 print Filtered; #X connect 3 0 5 0; -#X connect 3 0 8 0; +#X connect 3 0 7 0; #X connect 4 0 3 0; -#X connect 8 0 9 0; +#X connect 7 0 6 0; +#X connect 7 0 10 0; diff --git a/Exemplos/PD/basic/osc-send.pd b/Exemplos/PD/basic/osc-send.pd index f800080..dc9770e 100644 --- a/Exemplos/PD/basic/osc-send.pd +++ b/Exemplos/PD/basic/osc-send.pd @@ -1,32 +1,36 @@ #N canvas 233 0 932 691 10; #X declare -lib mrpeach; -#X msg 230 255 disconnect; -#X text 229 164 clique nos botoes "connect localhost "; -#X text 230 182 para ligar os envios de Osc; -#X floatatom 171 28 5 0 0 0 - - -; +#X msg 87 57 disconnect; +#X floatatom 171 40 5 0 0 0 - - -; #X obj 171 67 change; -#X text 220 64 só enviar quando o valor for diferente; -#X text 358 98 nome da mensagem; -#X text 229 138 OSC; -#X obj 171 284 udpsend; +#X obj 171 176 udpsend; #X obj -3 -58 import mrpeach; #X obj 171 138 packOSC; #X obj 171 -56 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 171 -10 random 1000; -#X msg 230 239 connect localhost 22243; -#X obj 171 -35 metro 2000; -#X msg 171 98 send /meulogin/meuprocesso \$1; -#X text 200 -57 numeros randomicos só para teste; -#X text 212 48; -#X text 243 -38 metro executa a cada N milisegundos; -#X text 229 217 enviar para a rede; -#X connect 0 0 8 0; -#X connect 3 0 4 0; -#X connect 4 0 15 0; -#X connect 10 0 8 0; -#X connect 11 0 14 0; -#X connect 12 0 3 0; -#X connect 13 0 8 0; -#X connect 14 0 12 0; -#X connect 15 0 10 0; +#X msg 8 -5 connect localhost 22243; +#X msg 171 98 send /george/random \$1; +#X obj 171 17 / 1000; +#X obj 171 -35 metro 300; +#X text 243 -38 Every n miliseconds sends a "bang"; +#X text 250 -8 Generates a random number from 0 to the number.; +#X text 214 17 Divides the random number by 1000; +#X text 211 40 Number generated; +#X text 214 68 When the value above change; +#X text 318 97 Send a value for that adress and 1 parameter; +#X text 223 138 Pack the OSC Message; +#X text 200 -57 Click connect then click here to activate; +#X text 6 -23 IP and port to send; +#X text 227 144; +#X text 223 174 Sends the message if connected; +#X connect 0 0 3 0; +#X connect 1 0 2 0; +#X connect 2 0 9 0; +#X connect 5 0 3 0; +#X connect 6 0 11 0; +#X connect 7 0 10 0; +#X connect 8 0 3 0; +#X connect 9 0 5 0; +#X connect 10 0 1 0; +#X connect 11 0 7 0;