aboutsummaryrefslogtreecommitdiff
path: root/examples/3.syncro_jitter.pd
blob: fb617a38c2605a8e72b6ceb147d51958fb283737 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#N canvas 213 47 680 592 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 162 graph;
#X text 30 23 Basic sharing of memory data between two pd instances
;
#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 39 52 declare -path ..;
#X obj 104 215 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 279 437 t f f;
#X obj 306 462 ==;
#X obj 306 482 sel 1;
#X obj 306 504 print erreur de syncro;
#X obj 104 194 loadbang;
#X obj 252 417 sel 0;
#X msg 29 138 pd~ start 3.syncro_jitter-subprocess.pd;
#X obj 513 79 loadbang;
#X msg 513 98 memclear;
#X obj 513 117 shmem 1003 100;
#X msg 43 483 metro bang;
#X obj 29 510 pd~ -ninsig 0 -noutsig 0 -fifo 50;
#X obj 104 257 t b b;
#X msg 104 280 memread 0;
#X obj 104 327 t f b;
#X obj 104 445 tabwrite data;
#X obj 179 375 f;
#X obj 179 396 + 1;
#X obj 179 418 % 100;
#X floatatom 167 210 5 0 100 0 - - -;
#X text 312 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 text 312 315 At metro rate \, the first value of the shared memory
is read and written in the table. After 100 values \, the displayed
table should be constant;
#X connect 2 0 20 0;
#X connect 3 0 23 0;
#X connect 4 0 5 0;
#X connect 8 0 31 0;
#X connect 9 0 10 1;
#X connect 9 1 10 0;
#X connect 10 0 11 0;
#X connect 11 0 12 0;
#X connect 13 0 8 0;
#X connect 14 1 9 0;
#X connect 15 0 20 0;
#X connect 16 0 17 0;
#X connect 17 0 18 0;
#X connect 19 0 20 0;
#X connect 21 0 22 0;
#X connect 21 1 19 0;
#X connect 22 0 3 0;
#X connect 23 0 24 0;
#X connect 23 1 25 0;
#X connect 25 0 26 0;
#X connect 26 0 27 0;
#X connect 27 0 25 1;
#X connect 27 0 24 1;
#X connect 28 0 31 1;
#X connect 31 0 21 0;