aboutsummaryrefslogtreecommitdiff
path: root/shmem-help.pd
blob: 6e7287662ca23545ef938a03194fd97c5aae1ecc (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
#N canvas 271 434 821 482 10;
#N canvas 1 89 450 300 (subpatch) 0;
#X array array2 100 float 3;
#A 0 0.257142 0.285713 0.314285 0.357142 0.371428 0.385714 0.4 0.414285
0.428571 0.442857 0.457143 0.457143 0.471429 0.485714 0.5 0.514286
0.514286 0.528572 0.542858 0.557143 0.557143 0.557143 0.571429 0.571429
0.585715 0.585715 0.585715 0.585715 0.585715 0.585715 0.585715 0.585715
0.557143 0.557143 0.542858 0.528572 0.514286 0.5 0.485714 0.485714
0.457143 0.457143 0.442857 0.414285 0.4 0.385714 0.371428 0.357142
0.328571 0.328571 0.314285 0.285713 0.257142 0.242856 0.22857 0.214284
0.185713 0.171427 0.157141 0.142855 0.114284 0.0999978 0.0714262 0.0428545
0.0428545 0.0142829 -0.0142887 -0.0285745 -0.0571461 -0.0857177 -0.100003
-0.128575 -0.171432 -0.171432 -0.21429 -0.242862 -0.257147 -0.300005
-0.314291 -0.328576 -0.357148 -0.371434 -0.38572 -0.400005 -0.428577
-0.442863 -0.471434 -0.471434 -0.514292 -0.528578 -0.542863 -0.557149
-0.571435 -0.600007 -0.614292 -0.628578 -0.628578 -0.628578 -0.642864
-0.642864;
#X coords 0 1 99 -1 200 140 1;
#X restore 580 194 graph;
#X floatatom 62 382 5 0 0 0 - - -;
#X msg 93 128 memset 0 1 1 1 1 1;
#X text 225 122 write a list (or a float) to the shared memory : 1st
value is index \, other are data to store;
#X msg 147 288 memdump \$1;
#X floatatom 147 269 5 0 0 0 - - -;
#X msg 62 63 memset 0 array1;
#N canvas 0 22 450 300 (subpatch) 0;
#X array array1 100 float 3;
#A 0 -0.87857 -0.864284 -0.849998 -0.835713 -0.835713 -0.807141 -0.792856
-0.77857 -0.749998 -0.749998 -0.735713 -0.707141 -0.692856 -0.67857
-0.664284 -0.649999 -0.621427 -0.592856 -0.592856 -0.564285 -0.549999
-0.535713 -0.521428 -0.492856 -0.47857 -0.464285 -0.449999 -0.435713
-0.421428 -0.407142 -0.378571 -0.349999 -0.349999 -0.335714 -0.307142
-0.307142 -0.278571 -0.278571 -0.264285 -0.235714 -0.221428 -0.207142
-0.192857 -0.178571 -0.15 -0.135714 -0.121428 -0.107143 -0.092857 -0.05
-0.0357143 -0.0214286 -0.0071429 0.0214285 0.0357141 0.0499998 0.0499998
0.0785712 0.0928569 0.121428 0.135714 0.164285 0.164285 0.192857 0.207142
0.235714 0.249999 0.264285 0.292856 0.307142 0.335714 0.349999 0.378571
0.392856 0.421428 0.435713 0.47857 0.492856 0.521427 0.549999 0.592856
0.592856 0.607141 0.635713 0.649999 0.664284 0.692856 0.707141 0.749998
0.749998 0.77857 0.807141 0.821427 0.849998 0.878569 0.878569 0.907141
0.907141 0.921427 0.964284;
#X coords 0 1 99 -1 200 140 1;
#X restore 579 31 graph;
#X msg 114 159 memset 100 5 5 5 1 1 0.1 0.2 0.3 0.4 0.5 0.6 0.7;
#X text 176 63 set shared memory from index 0 with array1;
#X msg 78 93 memset 0 array1 50;
#X text 206 93 set shared memory from index 0 with array1 from index
50;
#X obj 62 355 shmem 1214 250;
#X text 218 288 read one float of the table send value to the outlet
;
#X text 61 421 You can read / write in the same share memory using
diferent pd instances;
#X text 61 15 shmem allow share memory manipulation;
#X text 172 355 1st argument : Identifiant of the memory segment;
#X text 172 371 2nd argument : size of the segment;
#X msg 131 237 memdump 0 array2;
#X text 251 237 write share memory (index 0) to a table;
#X connect 2 0 12 0;
#X connect 4 0 12 0;
#X connect 5 0 4 0;
#X connect 6 0 12 0;
#X connect 8 0 12 0;
#X connect 10 0 12 0;
#X connect 12 0 1 0;
#X connect 18 0 12 0;