aboutsummaryrefslogtreecommitdiff
path: root/doc/help/cyclone/funbuff-help.pd
blob: 6c20c41a58baf9a1551c56e504d75af113303393 (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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
#N canvas 497 82 571 531 10;
#X obj 0 997 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289
0;
#X obj 1 340 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0
;
#N canvas 957 577 382 257 META 0;
#X text 0 20 LICENSE SIBSD;
#X text 0 173 LIBRARY cyclone;
#X text 0 193 VERSION 0.1-alpha57;
#X text 0 211 AUTHOR Krzysztof Czaja;
#X text 1 229 RELEASE_DATE 2002;
#X text 2 248 WEBSITE http://suita.chopin.edu.pl/~czaja/miXed/externs/cyclone.html
;
#X text 2 280 HELP_PATCH_AUTHORS Christoph Kummerer. Revised by Jonathan
Wilkes for Pd-extended 0.42 to conform to the PDDP template. Alex Cleveland
updated this patch for Pd-l2ork version 2013.05.28. Fred Jan Kraan
adapted the patch to pd-extended 2015-02-02;
#X text 0 0 KEYWORDS control storage max_compatible;
#X text 0 102 INLET_1 float;
#X text 0 120 OUTLET_0 float;
#X text 0 136 OUTLET_1 float;
#X text 0 153 OUTLET_2 bang;
#X text 0 59 INLET_0 bang float list clear copy delete embed dump find
goto interp interptab min next paste print read select set undo write
;
#X text 0 40 DESCRIPTION store x \, y pairs of numbers together;
#X restore 500 999 pd META;
#X obj 1 842 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0
;
#X obj 1 958 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1
0;
#X obj 85 351 cnv 17 3 450 empty empty 0 5 9 0 16 -228856 -162280 0
;
#X obj 1 0 cnv 15 552 40 empty empty funbuff 3 12 0 18 -204280 -1 0
;
#X obj 85 851 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0
;
#N canvas 90 529 428 109 Related_objects 0;
#X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0;
#X text 6 1 Related Objects;
#X obj 13 33 clip~;
#X obj 56 33 -~;
#X obj 87 33 +~;
#X restore 197 999 pd Related_objects;
#X obj 85 814 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0
;
#X text 13 23 store x \, y pairs of numbers together;
#X obj 500 9 funbuff;
#C restore;
#N canvas 424 299 618 472 more 0;
#X msg 22 30 1 10 \, 2 20 \, 3 3.33;
#X floatatom 137 124 5 0 0 0 - - -;
#X obj 136 469 print funbuff;
#X msg 69 59 4 4.4;
#X text 165 47 store x y pairs;
#X msg 90 85 4 44.4;
#X text 163 86 replace a previously stored y value;
#X text 185 122 retrieve corresponding y value;
#X msg 25 264 clear;
#X text -7 245 erase contents;
#X msg 180 177 embed \$1;
#X obj 180 157 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X text 249 171 with nonzero arg the contents of the object are;
#X text 248 182 saved with the patch \, this is the default behaviour
;
#X msg 193 232 goto \$1;
#X floatatom 193 212 5 0 0 0 - - -;
#X text 255 216 jump to x position;
#X msg 194 254 next;
#X text 255 256 and output y val;
#X text 255 227 or next x > num;
#X msg 218 298 min;
#X msg 218 322 max;
#X text 259 300 output smallest;
#X text 259 323 or largest stored y val;
#X msg 22 319 write;
#X text -7 302 save contents;
#X msg 10 379 read;
#X text -8 362 load contents;
#X msg 282 396 read /tmp/test.funbuff;
#X msg 282 375 write /tmp/test.funbuff;
#X text 253 357 with filename as arg no dialog appears:;
#X text 344 443 arg sets initial filename to load;
#X obj 136 443 cyclone/funbuff /tmp/test.funbuff;
#C restore;
#X obj -20 3 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0
;
#X text -15 4 More funbuff messages;
#X connect 0 0 32 0;
#X connect 1 0 32 0;
#X connect 3 0 32 0;
#X connect 5 0 32 0;
#X connect 8 0 32 0;
#X connect 10 0 32 0;
#X connect 11 0 10 0;
#X connect 14 0 32 0;
#X connect 15 0 14 0;
#X connect 17 0 32 0;
#X connect 20 0 32 0;
#X connect 21 0 32 0;
#X connect 24 0 32 0;
#X connect 26 0 32 0;
#X connect 28 0 32 0;
#X connect 29 0 32 0;
#X connect 32 0 2 0;
#X restore 419 289 pd more funbuff;
#N canvas 480 405 678 590 even 0;
#X msg 45 330 set 1 2 4 5 7 8 11 12 13 14;
#X text 41 313 load some values:;
#X msg 121 355 goto 0;
#X msg 143 386 next;
#X text 176 356 goto start;
#X floatatom 121 541 5 0 0 0 - - -;
#X text 168 540 y value;
#X floatatom 164 521 5 0 0 0 - - -;
#X text 212 520 diff between current and prev x vla;
#X obj 208 498 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X text 237 498 we reached the end ...;
#X floatatom 594 382 5 0 0 0 - - -;
#X floatatom 507 420 5 0 0 0 - - -;
#X floatatom 507 534 5 0 0 0 - - -;
#X text 400 398 then x \, and use x to retrieve y:;
#X text 554 363 set y value first:;
#X text 40 294 the other outlets make sense too:;
#X text 401 311 and again another way to load data:;
#X text 187 387 hit this a couple of times;
#X obj 438 240 print funbuff2;
#X msg 400 64 bang;
#X text 440 64 print status info;
#X msg 358 39 set 1 1 2 2.2 3 3.5;
#X text 308 21 another way to store pairs:;
#X msg 450 86 delete 1 1;
#X text 526 87 delete matching pair;
#X msg 457 111 delete 2;
#X text 520 113 delete pair where x=2;
#X msg 547 144 delete 3 4;
#X text 476 127 no! we don't have it:;
#X obj 144 204 print funbuffY;
#X obj 101 231 print funbuffX;
#X msg 59 50 1 2 \, 3 4 \, 5 6 \, 7 8;
#X msg 108 78 dump;
#X text 205 49 load some vals;
#X text 155 78 and dump them;
#X obj 101 142 cyclone/funbuff;
#C restore;
#X obj 121 440 cyclone/funbuff;
#C restore;
#X obj 507 479 cyclone/funbuff;
#C restore;
#X obj 438 200 cyclone/funbuff;
#C restore;
#X obj 6 3 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0;
#X text 8 3 More demonstrations of fun with funbuff;
#X connect 0 0 37 0;
#X connect 2 0 37 0;
#X connect 3 0 37 0;
#X connect 11 0 38 1;
#X connect 12 0 38 0;
#X connect 20 0 39 0;
#X connect 22 0 39 0;
#X connect 24 0 39 0;
#X connect 26 0 39 0;
#X connect 28 0 39 0;
#X connect 32 0 36 0;
#X connect 33 0 36 0;
#X connect 36 0 31 0;
#X connect 36 1 30 0;
#X connect 37 0 5 0;
#X connect 37 1 7 0;
#X connect 37 2 9 0;
#X connect 38 0 13 0;
#X connect 39 0 19 0;
#X restore 420 310 pd even more funbuff;
#X obj 126 245 cyclone/funbuff;
#C restore;
#X msg 175 88 1;
#X msg 204 88 2;
#X msg 233 88 3;
#X msg 226 138 clear;
#X msg 225 116 delete 2;
#X obj 213 317 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 85 896 cnv 17 3 25 empty empty 1 5 9 0 16 -228856 -162280 0
;
#X obj 85 926 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0
;
#X text 116 351 bang;
#X text 180 351 - prints status information in console.;
#X text 180 365 - x value of a x-y pair.;
#X text 116 365 float x;
#X text 116 379 list x y;
#X text 180 379 - defines the pair x y in the funbuff buffer. More
than one pair is allowed.;
#X text 116 405 clear;
#X text 180 405 - erases all x-y pairs.;
#X text 116 448 delete x [y];
#X text 192 448 - with two numbers \, delete the pair if both x and
y match. with one number \, deletes the pair when x matches.;
#X text 116 421 copy;
#X text 116 489 embed n;
#X text 116 475 dump;
#X text 116 514 goto x;
#X text 115 528 find y;
#X text 115 542 interp x;
#X text 114 595 interptab x t;
#X text 115 622 next;
#X text 180 672 - prints status information in console.;
#X text 116 816 float y;
#X text 115 609 min;
#X text 116 647 paste;
#X text 116 672 print;
#X text 116 710 select s e;
#X text 116 738 set x y;
#X text 117 778 write [fn];
#X text 180 421 - copies the x-y pair selected by the select message
to the global funbuff clipboard.;
#X text 180 489 - a non-zero n will make the buffer contents persistent
in the patch.;
#X text 180 475 - dumps al x-y pairs to the middle and left outlets.
;
#X text 180 514 - sets the buffer pointer to the specified x.;
#X text 179 528 - finds the x values which have y as their y value.
;
#X text 179 542 - if a x-y pair with the specified x exists \, send
the y value to the left outlet. If the x does not exist \, interpolate
the y value from the two neigbouring x-y pair y values and send this
value.;
#X text 196 595 - same as interp \, but uses the table t as buffer.
;
#X text 179 622 - finds the y value matching the buffer pointer to
x (or greater) and sends it to the left outlet.;
#X text 179 609 - sends the lowest y value in the bugger to the left
outlet.;
#X text 180 647 - adds the x-y pairs from the global funbuff clipboard
to the funbuff buffer.;
#X text 116 685 read [fn];
#X text 180 685 - read buffer contens from a file fn. If no filename
is provided \, a file open box is shown.;
#X text 180 710 - selects 'e' x-y pairs \, starting with 's' for copy
\, cut and past operations.;
#X text 116 763 undo;
#X text 180 737 - defines the pair x y in the funbuff buffer. More
than one pair is allowed.;
#X text 180 762 - undoes the latest cut or paste operation.;
#X text 181 778 - writes buffer contents to a file fn. If no filename
is provided \, a file open box is shown.;
#X text 179 816 - y value of an x-y pair;
#X text 116 851 float;
#X text 179 851 - the y value corresponding with the x (or a lower
x) received on the left inlet. On a next message the y value of the
next greater x is send.;
#X text 116 896 float;
#X text 116 926 bang;
#X text 179 926 - when the end of the buffer is reached.;
#X text 116 969 the default filename;
#X obj 126 316 print y;
#X msg 226 160 bang;
#X obj 169 296 print diff;
#X msg 226 182 next;
#X msg 226 204 goto 1;
#X text 179 896 - on a next message the difference with the previous
x value is send;
#X msg 126 66 1 11 \, 2 22 \, 4 44 \, 8 88;
#X connect 14 0 73 0;
#X connect 14 1 75 0;
#X connect 14 2 20 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 19 0 14 0;
#X connect 74 0 14 0;
#X connect 76 0 14 0;
#X connect 77 0 14 0;
#X connect 79 0 14 0;