aboutsummaryrefslogtreecommitdiff
path: root/doc/help/cyclone/coll.pd
blob: fa734651118e05e3c576b991ab9a55f735aa8e07 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
#N canvas 130 4 792 675 10;
#X text 11 625 cyclone is (c) Miller Puckette and others;
#X text 10 637 docs based on the MAX/MSP reference (c) cycling'74;
#X text 9 651 ___________________________________________________;
#X text 146 23 store and edit collections of messages;
#X obj 30 23 coll filename;
#C restore;
#X obj 243 501 coll /tmp/test.coll;
#C restore;
#X obj 244 61 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 255 124 next;
#X obj 243 590 print coll;
#X msg 266 147 prev;
#X msg 156 142 clear;
#X floatatom 285 567 5 0 0 0 - - -;
#X obj 328 547 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 371 529 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 274 170 dump;
#X msg 283 194 read /tmp/foo;
#X msg 290 220 read;
#X msg 316 291 length;
#X text 354 549 bang when we finished a load or save operation;
#X text 394 531 bang when finished with a dump operation;
#X text 329 569 index of the message sent out;
#X text 389 499 optional arg loads a file into coll;
#N canvas 79 76 329 260 loadsomeitems 0;
#X obj -44 53 inlet;
#X obj -13 220 outlet;
#X obj -44 75 t b b;
#X text -70 21 messages prefixed with an index are stored:;
#X msg -59 110 4 this is a message;
#X msg 7 180 1 10;
#X msg -40 132 3 and another one with 12345 in it;
#X msg -13 155 2 some_symbol;
#X connect 0 0 2 0;
#X connect 2 1 4 0;
#X connect 2 1 6 0;
#X connect 2 1 7 0;
#X connect 2 1 5 0;
#X connect 4 0 1 0;
#X connect 5 0 1 0;
#X connect 6 0 1 0;
#X connect 7 0 1 0;
#X restore 244 95 pd loadsomeitems;
#X text 276 61 load stuff;
#X text 153 96 look inside:;
#X text 305 148 previous;
#X text 314 171 dump them all;
#X text 383 195 read a file;
#X text 324 219 opens a dialog;
#X msg 298 244 write /tmp/foo;
#X text 404 246 write a file;
#X text 354 266 open a dialog;
#X msg 308 267 write;
#X floatatom 203 124 5 0 0 0 - - -;
#X text 85 123 output by index:;
#X text 46 142 clear contents:;
#X text 372 291 output nr. of messages stored;
#X text 295 123 output next =;
#X msg 392 122 bang;
#X msg 322 313 delete 2;
#X text 389 313 delete message \, and decrement larger indexes;
#X msg 326 359 goto 2;
#X text 379 361 goto item nr;
#X msg 332 382 end;
#X text 363 383 goto last item;
#X msg 333 404 filetype;
#X text 407 407 useless on unix it's a dummy function;
#X msg 338 427 flags 1 0;
#X text 412 429 save coll's contents with the patch;
#X msg 338 453 flags 0 0;
#X text 414 454 don't save (default);
#N canvas 98 103 484 259 more 0;
#X obj 129 205 outlet;
#X msg 50 37 store named_one this works too;
#X msg 95 67 named_one;
#X msg 129 112 nstore 5 foobar stored and associated;
#X msg 146 140 foobar;
#X text 198 141 =;
#X msg 214 141 5;
#X text 127 93 store and associate at once:;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 6 0 0 0;
#X restore 65 415 pd more ways to store;
#N canvas 27 85 907 412 complex 0;
#X obj 100 366 outlet;
#X msg 44 62 assoc bar 1;
#X msg 100 88 bar;
#X msg 118 119 subsym foo bar;
#X msg 131 149 foo;
#X msg 138 178 deassoc foo 1;
#X text 18 10 coll can associate indexes and symbols \, symbols;
#X text 17 22 can be used just like ints to operate on or re-;
#X text 16 35 trieve data:;
#X obj 131 251 r cout;
#X obj 500 372 s cout;
#X text 135 63 associate index 1 with 'bar';
#X text 138 91 retrieve it using association;
#X text 230 121 change association;
#X text 163 149 retrieve;
#X text 239 179 remove association;
#X msg 315 209 nth 4 3;
#X text 16 210 retrieve 3rd element of message at index 4;
#X msg 423 70 merge 2 and this was appended;
#X msg 448 96 2;
#X text 419 37 merge appends a message to an;
#X text 419 50 already stored one:;
#X msg 500 130 insert 2 a new two;
#X text 498 102 inserts new message at index;
#X text 499 113 and increments all indexes >=;
#X floatatom 520 160 5 0 0 0 - - -;
#X text 562 159 check it out ...;
#X text 543 220 or send it out immediately:;
#X text 536 181 replace an item (silently):;
#X msg 537 202 nsub 2 3 one;
#X msg 546 238 sub 2 2 newer;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 9 0 0 0;
#X connect 16 0 0 0;
#X connect 18 0 10 0;
#X connect 19 0 10 0;
#X connect 22 0 10 0;
#X connect 25 0 10 0;
#X connect 29 0 10 0;
#X connect 30 0 10 0;
#X restore 64 392 pd complex operations;
#X text 62 373 for more info:;
#X msg 120 166 open;
#X text 33 167 open editor:;
#X msg 469 193 readagain;
#X text 542 192 reopens last file read;
#X msg 325 335 remove 3;
#X text 391 334 delete message \, leave index alone;
#X msg 496 243 writeagain;
#X text 576 245 rewrite last file written;
#N canvas 116 68 589 315 even 0;
#X obj 32 207 coll /tmp/new.coll;
#C restore;
#X obj 32 236 print more_coll;
#X text 133 78 load ...;
#X msg 49 99 dump;
#X msg 77 146 renumber;
#X msg 78 169 dump;
#X msg 67 122 swap 1 2;
#X msg 32 76 1 100 \, 2 200;
#X text 21 32 this is not like in the reference \,;
#X text 22 45 renumber shouldn't be needed:;
#X text 135 123 swap 1 & 2;
#X msg 33 268 renumber;
#X text 30 289 doesn't quite work as expected ...;
#X obj 301 242 print more_coll;
#X obj 301 213 coll /tmp/new1.coll;
#C restore;
#X msg 301 80 2 2 3 4 \, 1 1 2 3 \, 3 3 4 5;
#X msg 318 106 sort 1;
#X msg 325 132 dump;
#X msg 412 106 sort -1;
#X text 299 49 sort by index or element \, up or down:;
#X text 468 108 up;
#X text 375 107 down;
#X msg 366 155 sort 1 3;
#X msg 442 153 sort -1 3;
#X text 371 137 sort by 3rd element:;
#X msg 379 182 dump;
#X text 141 147 order by index*;
#X text 17 259 *;
#X connect 0 0 1 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 0 0;
#X connect 7 0 0 0;
#X connect 14 0 13 0;
#X connect 15 0 14 0;
#X connect 16 0 14 0;
#X connect 17 0 14 0;
#X connect 18 0 14 0;
#X connect 22 0 14 0;
#X connect 23 0 14 0;
#X connect 25 0 14 0;
#X restore 577 93 pd even more things;
#X msg 111 191 wclose;
#X text 19 192 close & save:;
#N canvas 0 0 450 300 problems 0;
#X obj 121 205 outlet;
#X msg 93 86 min;
#X msg 121 114 max;
#X text 85 33 please look at coll.txt if you think;
#X text 85 46 you can help...;
#N canvas 63 144 658 284 refer 0;
#X msg 45 98 1 1 \, 2 2 \, 3 3;
#X floatatom 408 135 5 0 0 0 - - -;
#X floatatom 475 204 5 0 0 0 - - -;
#X obj 45 132 coll /tmp/1.coll;
#C restore;
#X obj 475 167 coll /tmp/2.coll;
#C restore;
#X msg 475 99 refer /tmp/1.coll;
#X text 43 71 load data into 1.coll:;
#X text 396 73 tell 2.coll to refer to 1.coll:;
#X text 215 135 retrieve 1.coll's contents:;
#X text 40 31 I once crashed* pd using this so please use with caution
...;
#X text 50 236 * can't reproduce it :(;
#X connect 0 0 3 0;
#X connect 1 0 4 0;
#X connect 4 0 2 0;
#X connect 5 0 4 0;
#X restore 302 250 pd refer;
#X text 324 100;
#X text 50 246 I don't consider this to be stable:;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X restore 25 484 pd problems;
#X text 573 75 swap \, sort \, renumber:;
#X connect 5 0 8 0;
#X connect 5 1 11 0;
#X connect 5 2 12 0;
#X connect 5 3 13 0;
#X connect 6 0 22 0;
#X connect 7 0 5 0;
#X connect 9 0 5 0;
#X connect 10 0 5 0;
#X connect 14 0 5 0;
#X connect 15 0 5 0;
#X connect 16 0 5 0;
#X connect 17 0 5 0;
#X connect 22 0 5 0;
#X connect 29 0 5 0;
#X connect 32 0 5 0;
#X connect 33 0 5 0;
#X connect 39 0 5 0;
#X connect 41 0 5 0;
#X connect 43 0 5 0;
#X connect 45 0 5 0;
#X connect 47 0 5 0;
#X connect 49 0 5 0;
#X connect 51 0 5 0;
#X connect 52 0 5 0;
#X connect 54 0 5 0;
#X connect 58 0 5 0;
#X connect 63 0 5 0;
#X connect 65 0 5 0;