Commit be325c22 authored by Roman Haefeli's avatar Roman Haefeli

implement latency measurement (working, though no bells and whistles)

parent 615bb6ec
#N canvas 1123 388 357 401 10;
#X obj 20 20 cnv 32 32 32 empty \$0.led.r 64 14 10 0 14 -233017 -262144
0;
#X obj 25 326 s \$0.led.r;
#X msg 25 306 color \$1 0 30;
#X obj 25 225 << 8;
#X obj 25 246 * -1;
#X obj 25 267 - 1;
#X obj 198 246 s \$0.led.r;
#X msg 198 226 label \$1;
#X obj 198 201 makefilename %2d;
#X obj 198 120 loadbang;
#X obj 198 140 f \$2;
#X obj 198 160 * 8;
#X obj 198 180 + \$3;
#X obj 87 96 loadbang;
#X obj 25 70 r \$1.latency.measurement.state;
#X msg 87 120 0;
#X obj 25 202 * 255;
#X msg 25 177 1;
#X obj 25 156 sel 1 0;
#X msg 104 196 10;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 2 0;
#X connect 7 0 6 0;
#X connect 8 0 7 0;
#X connect 9 0 10 0;
#X connect 10 0 11 0;
#X connect 11 0 12 0;
#X connect 12 0 8 0;
#X connect 13 0 15 0;
#X connect 14 0 18 0;
#X connect 15 0 18 0;
#X connect 16 0 3 0;
#X connect 17 0 16 0;
#X connect 18 0 17 0;
#X connect 18 1 19 0;
#X connect 19 0 2 0;
#X coords 0 -1 1 1 32 32 2 20 20;
#N canvas 0 53 978 384 10;
#N canvas 0 53 968 388 10;
#X declare -stdpath iemnet -stdpath osc -stdpath slip -path include
;
#X obj 39 38 cnv 24 311 24 empty empty PEERNODES 5 13 0 16 -228856
-1 0;
#N canvas 1020 178 769 522 code 0;
#N canvas 0 497 806 372 code 0;
#N canvas 966 53 664 577 communication 0;
#X obj 9 38 packOSC;
#X obj 9 17 r \$0.send;
......@@ -79,7 +79,7 @@
#X connect 38 0 37 1;
#X restore 8 41 pd communication;
#X obj 189 149 nbx 5 14 -1e+37 1e+37 0 0 \$0.bla \$0.id empty 0 -8
0 10 -262144 -1 -1 4 256;
0 10 -262144 -1 -1 5 256;
#N canvas 358 93 314 294 tpf.initialization 0;
#X obj 17 10 r \$0.id;
#X obj 17 51 b;
......@@ -755,17 +755,42 @@ include;
#X connect 14 0 10 0;
#X connect 15 0 13 0;
#X restore 8 7 pd connect;
#N canvas 854 838 343 302 latency.switch 0;
#X obj 43 23 r \$0.latency.switch;
#X obj 136 206 s \$0.latency.switch.r;
#X msg 136 178 color \$1 \$2 \$3;
#X msg 136 149 0 0 0;
#X msg 185 149 0 0 255;
#X obj 43 57 == 0;
#X obj 43 78 t a a a;
#X obj 136 118 sel 0 1;
#X obj 185 29 loadbang;
#X msg 185 50 0;
#X obj 43 237 s \$0.latency.measurement.state;
#X connect 0 0 5 0;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
#X connect 6 0 10 0;
#X connect 6 1 7 0;
#X connect 6 2 5 1;
#X connect 7 0 3 0;
#X connect 7 1 4 0;
#X connect 8 0 9 0;
#X connect 9 0 6 0;
#X restore 8 143 pd latency.switch;
#X restore 8 122 pd gui.code;
#X obj 184 192 s \$0.to.tpf;
#X obj 337 152 r \$0.from.tpf;
#X obj 337 191 print FROM;
#X obj 337 172 spigot;
#X obj 337 232 spigot;
#X obj 337 212 r \$0.to.tpf;
#X obj 337 251 print TO;
#X obj 426 217 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
#X obj 191 203 s \$0.to.tpf;
#X obj 352 172 r \$0.from.tpf;
#X obj 352 211 print FROM;
#X obj 352 192 spigot;
#X obj 451 189 spigot;
#X obj 451 169 r \$0.to.tpf;
#X obj 451 208 print TO;
#X obj 430 153 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 184 172 /reset/clients;
#X msg 191 183 /reset/clients;
#X obj 359 11 loadbang;
#X obj 359 31 f \$0;
#X obj 447 25 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
......@@ -1101,16 +1126,123 @@ symbol telematic.zhdk.ch \; \$1.channels 2 \; \$1.bitres 16 \; \$1.queue
#X obj 9 263 tpf-client-chatline \$0.msgs \$0.scb.msgs.s 2;
#X obj 9 286 tpf-client-chatline \$0.msgs \$0.scb.msgs.s 1;
#X restore 8 222 pd errors;
#X obj 162 334 r \$0.send;
#X obj 162 394 print SEND;
#X obj 271 335 r \$0.receive;
#X obj 271 397 print RECEIVE;
#X obj 162 365 spigot;
#X obj 271 365 spigot;
#X obj 374 370 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
#X obj 554 175 r \$0.send;
#X obj 554 216 print SEND;
#X obj 633 175 r \$0.receive;
#X obj 633 216 print RECEIVE;
#X obj 554 196 spigot;
#X obj 633 196 spigot;
#X obj 621 137 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 160 478 ---------------------------------;
#X obj 160 499 print -n;
#X msg 472 279 ---------------------------------;
#X obj 472 300 print -n;
#N canvas 319 522 578 588 latency.code 0;
#X obj 75 122 osc~;
#X obj 75 248 *~;
#X obj 12 51 t b b;
#X obj 75 98 vline~;
#X obj 74 379 sigmund~ -npts 4096 -hop 1024 pitch;
#X obj 74 400 mtof;
#X obj 12 449 f;
#X obj 12 30 metro 2000;
#X text 165 144 -6dB;
#X msg 75 77 1000 \, 9000 2000;
#X obj 12 470 / 4;
#X obj 74 272 lop~ 4000;
#X obj 74 302 lop~ 4000;
#X obj 74 329 lop~ 4000;
#X obj 74 359 lop~ 4000;
#X obj 90 202 dac~ 65;
#X obj 343 107 t a a;
#X obj 343 128 div 8;
#X obj 383 128 mod 8;
#X obj 343 151 pack f f;
#X msg 343 172 set \$1.channel.\$2;
#X obj 343 195 r~ 0.channel.0;
#X obj 12 429 delay 1900;
#X obj 343 266 env~ 8192 8192;
#X obj 343 290 int;
#X obj 343 311 makefilename %3d;
#X msg 343 333 label \$1dB;
#X obj 343 356 s \$0.lat.ret.level;
#X obj 12 7 r \$0.latency.measurement.state;
#X obj 343 84 r \$0.lat.ret.ch;
#X obj 129 121 r \$0.latency.measurement.state;
#X obj 75 173 *~ 0;
#X obj 129 142 * 0.5;
#X obj 12 492 int;
#X msg 12 535 label \$1ms;
#X obj 12 558 s \$0.latency.label;
#X obj 12 513 makefilename %3d;
#X obj 199 466 r \$0.latency.measurement.state;
#X msg 199 519 color -1 -1 \$1;
#X obj 199 487 - 1;
#X msg 347 34 vis 1;
#X obj 347 13 r \$0.display.latency;
#X obj 347 55 s pd-latency;
#X connect 0 0 31 0;
#X connect 1 0 11 0;
#X connect 2 0 22 0;
#X connect 2 1 9 0;
#X connect 3 0 0 0;
#X connect 4 0 5 0;
#X connect 5 0 6 1;
#X connect 6 0 10 0;
#X connect 7 0 2 0;
#X connect 9 0 3 0;
#X connect 10 0 33 0;
#X connect 11 0 12 0;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 14 0 4 0;
#X connect 16 0 17 0;
#X connect 16 1 18 0;
#X connect 17 0 19 0;
#X connect 18 0 19 1;
#X connect 19 0 20 0;
#X connect 20 0 21 0;
#X connect 21 0 1 1;
#X connect 21 0 23 0;
#X connect 22 0 6 0;
#X connect 23 0 24 0;
#X connect 24 0 25 0;
#X connect 25 0 26 0;
#X connect 26 0 27 0;
#X connect 28 0 7 0;
#X connect 29 0 16 0;
#X connect 30 0 32 0;
#X connect 31 0 1 0;
#X connect 31 0 15 0;
#X connect 32 0 31 1;
#X connect 33 0 36 0;
#X connect 34 0 35 0;
#X connect 36 0 34 0;
#X connect 37 0 39 0;
#X connect 38 0 35 0;
#X connect 39 0 38 0;
#X connect 40 0 42 0;
#X connect 41 0 40 0;
#X restore 8 242 pd latency.code;
#N canvas 658 501 310 153 latency 0;
#X obj 138 43 cnv 32 70 32 empty empty empty 8 16 0 20 -1 -262144 0
;
#X obj 138 48 nbx 2 20 0 64 0 0 \$0.lat.ret.ch \$0.let.ret.ch.r empty
0 -8 0 20 -1 -262144 -1 3 256;
#X obj 138 8 tpf-client-button32x32 \$0.latency.switch \$0.latency.switch.r
;
#X obj 7 8 cnv 32 128 32 empty \$0.button.fg ON/OFF 8 16 0 20 -233017
-1 0;
#X obj 7 43 cnv 32 128 32 empty empty RET/CHAN 8 16 0 20 -233017 -1
0;
#X obj 7 78 cnv 32 128 32 empty empty RET/LEVEL 8 16 0 20 -233017 -1
0;
#X obj 138 78 cnv 32 70 32 empty \$0.lat.ret.level 0dB 8 16 0 20
-1 -262144 0;
#X obj 7 113 cnv 32 128 32 empty empty LATENCY 8 16 0 20 -233017 -1
0;
#X obj 138 113 cnv 32 70 32 empty \$0.latency.label 0ms 8 16 0 20
-1 -1 0;
#X restore 8 262 pd latency;
#X connect 12 0 14 0;
#X connect 14 0 13 0;
#X connect 15 0 17 0;
......@@ -1128,7 +1260,7 @@ symbol telematic.zhdk.ch \; \$1.channels 2 \; \$1.bitres 16 \; \$1.queue
#X connect 35 0 34 1;
#X connect 35 0 33 1;
#X connect 36 0 37 0;
#X restore 764 346 pd code;
#X restore 875 346 pd code;
#X obj 4 65 tpf-client-link \$0 0;
#X obj 353 38 cnv 24 32 24 empty empty RX 5 13 0 16 -228856 -1 0;
#X obj 4 38 cnv 24 32 24 empty empty TX 5 13 0 16 -228856 -1 0;
......@@ -1142,18 +1274,18 @@ symbol telematic.zhdk.ch \; \$1.channels 2 \; \$1.bitres 16 \; \$1.queue
0;
#X obj 353 20 cnv 15 98 15 empty \$0.sr.label sr=44100Hz 4 7 0 13 -1
-195568 0;
#X obj 819 346 namecanvas \$0.main.cnv;
#X obj 737 346 namecanvas \$0.main.cnv;
#X obj 388 38 cnv 24 70 24 empty empty DELAY 5 13 0 16 -228856 -1 0
;
#X obj 353 3 cnv 15 44 16 empty empty host= 4 8 0 13 -1 -262144 0;
#X obj 398 3 symbolatom_203x17 \$0 \$0.host \$0.host.r 500 15;
#X obj 605 3 nbx 7 16 6 34 0 0 \$0.channels.nb \$0.channels.nb.r empty
0 8 0 10 -262144 -1 -1 8 256;
#X obj 602 3 cnv 15 75 16 empty \$0.channels.label ch=2 4 8 0 13 -1
0 8 0 10 -262144 -1 -1 34 256;
#X obj 602 3 cnv 15 75 16 empty \$0.channels.label ch=8 4 8 0 13 -1
-195568 0;
#X obj 610 19 nbx 6 16 10 398 0 0 \$0.queue.nb \$0.queue.nb.r empty
0 8 0 10 -262144 -1 -1 16 256;
#X obj 610 20 cnv 15 67 15 empty \$0.queue.label q=4 4 7 0 13 -1 -195568
0 8 0 10 -262144 -1 -1 32 256;
#X obj 610 20 cnv 15 67 15 empty \$0.queue.label q=8 4 7 0 13 -1 -195568
0;
#X obj 540 19 nbx 6 16 2 26 0 0 \$0.bs.nb \$0.bs.nb.r empty 0 8 0 10
-262144 -1 -1 8 256;
......@@ -1176,9 +1308,7 @@ symbol telematic.zhdk.ch \; \$1.channels 2 \; \$1.bitres 16 \; \$1.queue
#X obj 890 3 tpf-client-inchannel \$0 6;
#X obj 925 3 tpf-client-inchannel \$0 7;
#X obj 4 345 tpf-client-button Chat \$0.display.chat;
#X obj 135 345 tpf-client-button Errors \$0.display.errors;
#X obj 764 345 cnv 15 192 32 empty empty empty 20 12 0 14 -262144 -66577
0;
#X obj 266 345 tpf-client-button Errors \$0.display.errors;
#X obj 4 3 tpf-client-button32x32 \$0.connect.switch \$0.connect.switch.r
;
#X obj 4 100 tpf-client-link \$0 1;
......@@ -1188,3 +1318,7 @@ symbol telematic.zhdk.ch \; \$1.channels 2 \; \$1.bitres 16 \; \$1.queue
#X obj 4 240 tpf-client-link \$0 5;
#X obj 4 275 tpf-client-link \$0 6;
#X obj 4 310 tpf-client-link \$0 7;
#X obj 925 345 tpf-client-testsignal-outchannel \$0 8 0;
#X obj 135 345 tpf-client-button Latency \$0.display.latency;
#X obj 730 345 cnv 15 192 32 empty empty empty 20 12 0 14 -262144 -66577
0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment