#N canvas 490 70 558 539 10;
#X obj 2 296 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0
;
#X obj 2 408 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0
;
#X obj 2 479 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1
0;
#X obj 86 304 cnv 17 3 74 empty empty 0 5 9 0 16 -228856 -162280 0
;
#X obj 86 415 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0
;
#X obj 86 386 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0
;
#X obj 86 436 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0
;
#X obj 86 457 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0
;
#X obj 2 514 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289
0;
#X text 158 302 -;
#X text 125 302 bang;
#X text 158 320 -;
#X text 119 320 float;
#X text 158 366 -;
#X text 158 348 -;
#X text 125 348 list;
#X text 158 387 -;
#X text 119 387 float;
#X text 158 417 -;
#X text 119 417 float;
#X text 158 437 -;
#X text 119 437 float;
#X text 158 459 -;
#X text 125 459 bang;
#X obj 2 5 cnv 15 553 42 empty empty empty 20 12 0 14 -233017 -66577
0;
#N canvas 0 22 450 278 (subpatch) 0;
#X coords 0 1 100 -1 554 42 1 0 0;
#X restore 2 4 graph;
#X obj 305 5 cnv 15 250 40 empty empty empty 12 13 0 18 -128992 -233080
0;
#N canvas 382 141 749 319 (subpatch) 0;
#X coords 0 -1 1 1 252 42 2 100 100;
#X restore 304 4 pd;
#X text 173 387 y value of an x/y pair;
#X obj 291 267 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X text 173 437 on a "next" message \, the difference with the previous
x value, f 61;
#X text 173 459 when the end of the buffer is reached, f 60;
#X text 173 417 the y value of a pair;
#X obj 108 267 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 108 236 cyclone/funbuff;
#C restore;
#X obj 291 191 hradio 15 1 0 3 empty empty empty 0 -8 0 10 -228856
-1 -1 2;
#X floatatom 291 213 2 0 0 0 - - -;
#X text 277 189 x;
#X text 271 266 y;
#X text 180 204 y;
#X text 95 203 x;
#X obj 195 205 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 108 205 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#N canvas 564 29 795 446 examples 0;
#X obj 582 270 bng 15 250 50 0 empty empty empty 0 -6 0 8 -228856 -1
-1;
#X msg 481 186 next;
#X msg 470 161 goto 0;
#X obj 517 271 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 453 271 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X text 451 289 y value;
#X text 515 185 outputs and goes to next;
#X text 603 270 <= reached the end;
#X obj 453 247 cyclone/funbuff;
#C restore;
#X text 409 45 When using the next message \, the midle outlet outputs
the difference from the current 'x' value to the previous one. The
right outlet sends a bang when reaching the end of the buffer. The
next message needs a pointer position \, this can be set by giving
it an 'x' value or by the 'goto' message.;
#X msg 490 216 min;
#X msg 522 216 max;
#X text 548 216 outputs minimum/maximum 'y' value;
#N canvas 739 227 654 315 interpolation 0;
#X msg 158 130 interp 18;
#X obj 132 179 cyclone/funbuff;
#C restore;
#X text 350 80 stored pairs: "10 100" and "30 200";
#X obj 132 80 cyclone/loadmess set 10 100 30 200;
#X text 247 121 The value '18' is compared to 'x' values in funbuff
and is found in between the values 10 and 30 If you consider the difference
from 30 to 10 (which is 20) to 100% \, the value 18 is 40% over 10
and 60% under 30;
#X obj 132 214 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X text 247 184 The corresponding 'y' value from 18 is also an interpolated
value from the corresponding 'y' values of 10 and 30 \, which are 100
and 200 \, so it should be 140 (40% of the way from 100 to 200). Click
and check.;
#X obj 43 42 hsl 128 15 10 30 0 0 empty empty empty -2 -8 0 10 -228856
-1 -1 0 1;
#X obj 40 72 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X msg 40 105 interp \$1;
#X text 183 43 <= move the slider and check the interpolated values
;
#X connect 0 0 1 0;
#X connect 1 0 5 0;
#X connect 3 0 1 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 1 0;
#X restore 643 339 pd interpolation;
#X text 467 340 More examples:;
#N canvas 623 186 758 344 copy/paste 0;
#X msg 86 92 select 3 5;
#X msg 117 132 cut;
#X msg 148 132 copy;
#X msg 186 181 undo;
#X msg 185 132 paste;
#X obj 86 308 cyclone/funbuff;
#C restore;
#X msg 204 239 delete 5;
#X text 262 214 deletes matching pair;
#X text 219 179 or paste operation;
#X text 201 163 undoes the latest cut;
#X text 261 240 deletes the pair where x = 5;
#X msg 30 51 1 2 \, 2 3 \, 3 4 \, 4 5 \, 5 6 \, 6 7 \, 7 8 \, 8 9 \,
9 10 \, 10 11;
#X obj 206 272 bng 20 250 50 0 empty empty empty 17 7 0 10 -228856
-1 -1;
#X msg 575 178 paste;
#X obj 575 248 cyclone/funbuff;
#C restore;
#X msg 601 210 undo;
#X text 235 273 print information in Pd window;
#X obj 545 146 bng 20 250 50 0 empty empty empty 17 7 0 10 -228856
-1 -1;
#X text 228 132 clipboard operation;
#X obj 30 27 loadbang;
#X text 163 79 selects 5 elements staring from element 3 - the region
from pointer 3 to 3 + 5 (8). Used for clipboard operations: cut \,
copy and paste., f 47;
#X msg 193 213 delete 3 4;
#X text 508 93 A cut/copy operation can be pasted onto a different
[funbuff] object!, f 34;
#X connect 0 0 5 0;
#X connect 1 0 5 0;
#X connect 2 0 5 0;
#X connect 3 0 5 0;
#X connect 4 0 5 0;
#X connect 6 0 5 0;
#X connect 11 0 5 0;
#X connect 12 0 5 0;
#X connect 13 0 14 0;
#X connect 15 0 14 0;
#X connect 17 0 14 0;
#X connect 19 0 11 0;
#X connect 21 0 5 0;
#X restore 614 387 pd copy/paste & delete;
#X obj 70 134 cyclone/funbuff;
#C restore;
#X msg 70 79 4;
#X obj 70 165 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X text 203 93 the last sent message;
#X obj 172 398 print X;
#X obj 227 398 print Y;
#X obj 172 369 cyclone/funbuff;
#C restore;
#X msg 118 79 4 10 \, 4 4;
#X msg 133 100 4 5 \, 4 40;
#X text 409 15 'goto' \, 'next' & 'min'/'max' messages:;
#X obj 453 135 cyclone/loadmess set 1 1 3 2 5 3 6 2;
#X text 516 289 difference from previous 'x';
#X text 517 160 sets pointer to the first element;
#N canvas 812 273 425 303 find 0;
#X msg 82 90 find 4;
#X msg 117 150 0 4 \, 2 4 \, 1 1 \, 5 3 \, 7 4;
#X obj 117 127 loadbang;
#X obj 82 244 print find;
#X obj 82 185 cyclone/funbuff;
#C restore;
#X obj 82 215 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X text 132 89 find 'x' that correspond to '4';
#X text 40 28 The 'find' message looks for 'x' values that correspond
to the given 'y'.;
#X connect 0 0 4 0;
#X connect 1 0 4 0;
#X connect 2 0 1 0;
#X connect 4 0 5 0;
#X connect 5 0 3 0;
#X restore 570 340 pd find;
#X msg 172 311 set 1 2 3 4 5 6 7 8;
#X msg 192 339 dump;
#X msg 122 329 clear;
#X text 28 203 'set' \, 'clear' and 'dump' messages:;
#N canvas 378 115 809 371 read/write 0;
#X msg 544 160 write;
#X msg 502 160 read;
#X msg 587 161 write funbuff.txt;
#X msg 597 187 read funbuff.txt;
#X msg 181 149 embed \$1;
#X obj 181 125 tgl 15 0 empty empty empty 17 7 0 10 -228856 -1 -1 0
1;
#X obj 181 290 pack;
#X obj 181 261 cyclone/funbuff;
#C embed 1;
#C set 13 22 26 12 35 53;
#C restore;
#X msg 211 181 dump;
#X text 33 27 You can save the stored values of a [funbuff] into the
patch with the 'embed' message. If you send it 'embed 1' \, when you
save the patch \, it also save the currently stored values into [funbuff].
If you send it 'embed 0' and save the patch \, it won't save the contents
and also clear if it had its contents saved.;
#X msg 227 219 set 13 22 35 53 26 12;
#X obj 181 318 print pairs:;
#X msg 614 219 set 13 22 35 53 26 12;
#X msg 470 127 dump;
#X obj 522 323 print pairs:;
#X text 425 27 You can also save (with the 'write' message) and load
(with the 'read' message) from files. The argument sets a file name
to load and read from at startup. The 'read' and 'write' messages without
a filename symbol opens a dialog box to open/save files.;
#X obj 522 258 cyclone/funbuff funbuff.txt;
#C restore;
#X obj 522 295 pack;
#X connect 0 0 16 0;
#X connect 1 0 16 0;
#X connect 2 0 16 0;
#X connect 3 0 16 0;
#X connect 4 0 7 0;
#X connect 5 0 4 0;
#X connect 6 0 11 0;
#X connect 7 0 6 0;
#X connect 7 1 6 1;
#X connect 8 0 7 0;
#X connect 10 0 7 0;
#X connect 12 0 16 0;
#X connect 13 0 16 0;
#X connect 16 0 17 0;
#X connect 16 1 17 1;
#X connect 17 0 14 0;
#X restore 468 381 pd read/write files \; save contents (embed);
#X text 22 15 There can only be one 'x' value and a corresponding 'y'value.
So you can rewrite a 'y' value by sending another pair message.;
#X text 185 79 the value of 'y' is from;
#X text 29 233 The set message can add several pairs at once. The clear
message erases all set pairs from the memory. The dump message dumps
all pairs to the middle (y value) and left (x value) outlets;
#X floatatom 364 341 5 0 0 0 - - -;
#X connect 1 0 8 0;
#X connect 2 0 8 0;
#X connect 8 0 4 0;
#X connect 8 1 3 0;
#X connect 8 2 0 0;
#X connect 10 0 8 0;
#X connect 11 0 8 0;
#X connect 16 0 18 0;
#X connect 17 0 16 0;
#X connect 22 0 20 0;
#X connect 22 1 21 0;
#X connect 23 0 16 0;
#X connect 24 0 16 0;
#X connect 26 0 8 0;
#X connect 30 0 22 0;
#X connect 31 0 22 0;
#X connect 32 0 22 0;
#X connect 38 0 22 1;
#X restore 472 265 pd examples;
#X text 101 366 messages;
#X text 87 144 If there's no matching 'x' \, [funbuff] uses the closest
smaller 'x' and outputs its corresponding 'y' value., f 60;
#X text 94 265 y;
#X text 433 212 sets x/y pairs;
#X text 172 348 two elements stores a x/y number pair in the buffer
;
#X text 173 302 prints object's information in the Pd main window,
f 60;
#X obj 265 213 bng 15 250 50 0 empty empty empty 17 7 0 10 -228856
-1 -1;
#X text 173 366 see complete list of messages:;
#X msg 51 203 clear;
#X text 85 85 [funbuff] stores \, manages and recalls x/y pairs of
integers.;
#N canvas 834 117 536 397 All_Messages 0;
#X text 120 317 prints status information in Pd main window, f 68
;
#X text 120 115 undoes the latest cut or paste operation, f 68;
#X text 67 22 clear -;
#X text 73 66 copy -;
#X text 79 82 cut -;
#X text 73 161 dump -;
#X text 79 285 min -;
#X text 79 301 max -;
#X text 73 209 next -;
#X text 67 98 paste -;
#X text 67 317 print -;
#X text 19 333 read <symbol> -;
#X text 73 115 undo -;
#X text 25 193 goto <float> -;
#X text 19 177 embed <float> -;
#X text 25 226 find <float> -;
#X text 13 242 interp <float> -;
#X text 37 6 set <list> -;
#X text 13 361 write <symbol> -;
#X text 120 132 if one float is given \, deletes a pair for a matching
'x' value \, if two floats are given \, deletes a matching x/y pair
, f 68;
#X text 19 132 delete <f \, f> -;
#X text 19 38 select <f \, f> -;
#X text 120 66 copies the selected x/y pair to the clipboard, f 68
;
#X text 120 82 copies the selected x/y pair to the clipboard and deletes
it, f 68;
#X text 120 98 adds the cut or copied x/y pairs, f 68;
#X text 120 177 non-0 value saves the contents of the buffer when the
patch is saved, f 68;
#X text 120 161 dumps all pairs to the middle (y value) and left (x
value) outlets, f 68;
#X text 120 193 sets the buffer pointer to the specified <float> buffer
element, f 68;
#X text 120 242 if a given 'x' doesn't exist \, interpolates the 'y'
value from 2 neighbouring x/y pair, f 68;
#X text 1 269 interptab <f \, s> -;
#X text 120 285 sends the lowest 'y' value in the buffer to the left
outlet, f 68;
#X text 120 302 sends the highest 'y' value in the buffer to the left
outlet, f 68;
#X text 120 333 reads buffer contents from the file name specified by
the symbol. If no symbol is given \, a file open box is shown, f 68
;
#X text 120 360 writes buffer contents to the file name specified by
the symbol. If no symbol is given \, a file open box is shown, f 68
;
#X text 120 5 sets x/y pairs in the buffer (more than one pair is allowed)
, f 68;
#X text 120 22 erases all pairs from the buffer, f 68;
#X text 120 209 outputs the y value of the buffer element and goes
to next pointer, f 68;
#X text 120 226 finds the 'x' values which have a 'y' that matches
the given number, f 68;
#X text 120 270 same as interp \, but uses the table specified by the
symbol <s>, f 68;
#X text 120 38 selects a number of x/y pairs (specified by the 2nd
float) starting from an index (specified by the 1st float) - for copy/cut/paste
, f 68;
#X restore 359 367 pd All_Messages;
#X text 158 489 1) symbol - sets a file name to load in the buffer
;
#X msg 346 212 0 1 \, 1 2 \, 2 3;
#X obj 346 190 loadbang;
#X text 86 101 If a 'y' value is sent to the right inlet \, the next
input to the left inlet sets the value of 'x' and the pair is stored
\, otherwise an 'x' input does output its corresponding 'y'.;
#X text 173 320 x value of a x/y pair - saves the x/y pair if a y value
was sent before to the right inlet \, outputs a y value otherwise,
f 60;
#X obj 291 239 cyclone/funbuff;
#C restore;
#X obj 19 57 cyclone/comment 0 14 DejaVu\ Sans\ Mono empty 0 0 0 0
0 255 255 255 0 0 Stores pairs of integers;
#X obj 16 5 cyclone/comment 0 33 DejaVu\ Sans\ Mono empty 0 0 0 0 0
255 255 255 0 0 funbuff;
#X obj 322 29 cyclone/comment 0 13 DejaVu\ Sans\ Mono empty 0 224 228
220 0 255 255 255 0 0 Objects cloned from Max/MSP;
#X obj 363 5 cyclone/comment 0 24 DejaVu\ Sans\ Mono empty 0 224 228
220 0 255 255 255 0 0 cyclone;
#X connect 34 0 33 0;
#X connect 35 0 36 0;
#X connect 36 0 60 0;
#X connect 41 0 34 1;
#X connect 42 0 34 0;
#X connect 50 0 60 0;
#X connect 52 0 34 0;
#X connect 56 0 60 0;
#X connect 57 0 56 0;
#X connect 60 0 29 0;
