aboutsummaryrefslogtreecommitdiff
path: root/examples/3.synchro_jitter.pd
diff options
context:
space:
mode:
Diffstat (limited to 'examples/3.synchro_jitter.pd')
-rw-r--r--examples/3.synchro_jitter.pd74
1 files changed, 74 insertions, 0 deletions
diff --git a/examples/3.synchro_jitter.pd b/examples/3.synchro_jitter.pd
new file mode 100644
index 0000000..7d5c0b5
--- /dev/null
+++ b/examples/3.synchro_jitter.pd
@@ -0,0 +1,74 @@
+#N canvas 213 47 802 587 10;
+#X declare -path ..;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array data 100 float 2;
+#X coords 0 1 99 -1 200 140 1;
+#X restore 374 160 graph;
+#X msg 48 160 pd~ stop;
+#X obj 104 300 shmem 1003 100;
+#X obj 512 20 loadbang;
+#X msg 512 41 \; pd dsp 1;
+#X text 44 116 launch subprocess;
+#X obj 29 62 declare -path ..;
+#X obj 104 215 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+1;
+#X obj 275 355 t f f;
+#X obj 302 380 ==;
+#X obj 302 400 sel 1;
+#X obj 104 194 loadbang;
+#X obj 248 335 sel 0;
+#X obj 513 79 loadbang;
+#X msg 513 98 memclear;
+#X obj 513 117 shmem 1003 100;
+#X msg 131 483 metro bang;
+#X obj 29 510 pd~ -ninsig 0 -noutsig 0 -fifo 50;
+#X obj 104 257 t b b;
+#X obj 104 327 t f b;
+#X obj 227 375 f;
+#X obj 227 396 + 1;
+#X obj 227 418 % 100;
+#X floatatom 167 210 5 0 100 0 - - -;
+#X text 426 359 It is not due to syncronisation jitter between pd and
+pd~ \, (specially since metro is fast and round trip buffer is high).
+;
+#X text 208 210 change this value;
+#X obj 104 234 metro 3;
+#X obj 302 422 print synchro_error;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array data_history 100 float 2;
+#X coords 0 1 99 -1 200 140 1;
+#X restore 580 160 graph;
+#X obj 104 445 tabwrite data_history;
+#X text 426 315 At metro rate \, the first value of the shared memory
+is read and written in the table. After 100 values \, "data_history"
+should be constant.;
+#X msg 104 280 memdump 0 data \, memread 0;
+#X msg 29 138 pd~ start synchro_jitter-subprocess.pd;
+#X text 30 23 Synchronisation problem demonstration between two pd
+instances;
+#X connect 1 0 17 0;
+#X connect 2 0 19 0;
+#X connect 2 0 12 0;
+#X connect 3 0 4 0;
+#X connect 7 0 26 0;
+#X connect 8 0 9 1;
+#X connect 8 1 9 0;
+#X connect 9 0 10 0;
+#X connect 10 0 27 0;
+#X connect 11 0 7 0;
+#X connect 12 1 8 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 16 0 17 0;
+#X connect 18 0 31 0;
+#X connect 18 1 16 0;
+#X connect 19 0 29 0;
+#X connect 19 1 20 0;
+#X connect 20 0 21 0;
+#X connect 21 0 22 0;
+#X connect 22 0 20 1;
+#X connect 22 0 29 1;
+#X connect 23 0 26 1;
+#X connect 26 0 18 0;
+#X connect 31 0 2 0;
+#X connect 32 0 17 0;