XML Feeds

.

[pluggo] Saving buffer's contents with preset - weird behaviour on recall

Roald Baudoux roald.baudoux at brutele.be
Wed Feb 6 07:27:05 MST 2008


In order to save a curve drawn in a short buffer into a preset, I try  
to save buffer's data using a coll and plugmultiparam.

Globally it works fine but the first sample's value is often not  
correctly recalled.

Any help would be highly appreciated!

Roald Baudoux


max v2;
#N vpatcher 101 48 1203 765;
#P origin 10 -142;
#P window setfont "Sans Serif" 9.;
#P comment 572 604 44 196617 RECALL;
#P newex 297 575 51 196617 pack 0 0.;
#P newex 656 551 34 196617 defer;
#P newex 656 336 34 196617 defer;
#P newex 24 476 40 196617 change;
#P newex 24 451 72 196617 loadmess 111;
#P message 80 561 43 196617 size \$1;
#P flonum 80 541 71 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 24 506 66 196617 sampstoms~;
#P newex 80 589 117 196617 buffer~ filtrageLog 0. 1;
#P newex 796 529 88 196617 print RECORDING!;
#P button 297 456 15 0;
#P newex 364 509 60 196617 print -----;
#P newex 297 597 110 196617 print ACTUAL_ VALUE;
#P newex 331 510 27 196617 - 1;
#P newex 297 486 44 196617 uzi 111;
#P newex 331 544 88 196617 peek~ filtrageLog;
#P message 736 69 108 196617 capture 2 FullyClosed;
#P message 614 70 116 196617 capture 1 FullyOpened;
#P message 564 70 45 196617 recall 2;
#P message 513 70 45 196617 recall 1;
#P newex 752 664 123 196617 print RECALLED_SAMPLE;
#P newex 656 617 27 196617 - 1;
#P newex 656 595 61 196617 unpack 0 0.;
#P newex 656 636 61 196617 pack 0 0.;
#P newex 656 572 64 196617 route select;
#P newex 656 665 88 196617 peek~ filtrageLog;
#P newex 656 528 133 196617 plugmultiparam 0 111 0. 1.;
#P newex 656 315 20 196617 t b;
#P newex 765 448 85 196617 prepend merge 1;
#P newex 656 358 160 196617 t 1 b clear;
#N coll gzDFGRS4_V;
#P newobj 656 505 86 196617 coll gzDFGRS4_V;
#P newex 765 400 27 196617 - 1;
#P newex 731 380 44 196617 uzi 111;
#P newex 765 424 88 196617 peek~ filtrageLog;
#P newex 664 112 106 196617 bgcolor 200 200 200;
#N plugconfig;
#C useviews 0 1 1 1;
#C numprograms 64;
#C preempt 1;
#C sigvschange 1;
#C sigvsdefault 32;
#C setsize 1007 301;
#C defaultview Interface 0 0 0;
#C dragscroll 1;
#C noinfo;
#C package ????;
#C setprogram 1 FullyOpened 0 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.  
1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.  
1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.  
1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.  
1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.  
1. 1. 1. 1. 1.;
#C setprogram 2 FullyClosed 0 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.  
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.  
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.  
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.  
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.  
0. 0. 0. 0. 0.;
#C uniqueid 68 228 128;
#C initialpgm 1;
#P newobj 605 112 55 196617 plugconfig;
#P comment 221 283 34 196617 10.77;
#P comment 819 283 42 196617 11025.;
#P comment 757 283 42 196617 5512.5;
#P comment 705 283 49 196617 2756.25;
#P comment 648 283 51 196617 1378.13;
#P comment 591 283 51 196617 689.06;
#P comment 532 283 42 196617 344.53;
#P comment 458 283 42 196617 172.27;
#P comment 395 283 42 196617 86.13;
#P comment 335 283 33 196617 43.07;
#P comment 277 283 36 196617 21.53;
#P comment 116 144 73 196617 amplitude 1.;
#P message 192 119 302 196617 set filtrageLog 1 \, mode draw \,  
clipdraw 1 \, vzoom 0.5 \, voffset 1.;
#P comment 892 283 54 196617 22050 Hz;
#P newex 192 97 48 196617 loadbang;
#P user waveform~ 192 139 734 138 3 9;
#W mode draw;
#W mouseoutput continuous;
#W clipdraw 1;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 1;
#W vzoom 0.5;
#W voffset 1.;
#W bpm 120. 4.;
#W frgb 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P comment 179 283 30 196617 O Hz;
#P comment 116 267 73 196617 amplitude 0.;
#P window linecount 2;
#P comment 117 322 449 196617 Any time a sample is modified in  
waveform~ with the mouse \, all the poins form buffer are stored in a  
coll using uzi and peek~ \, then coll's contents is sent to  
plugmultiparam.;
#P window linecount 1;
#P comment 317 457 152 196617 check current's buffer contents;
#P comment 116 306 446 196617 Purpose : saving buffer's contents with  
presets. Samples in the buffer are drawn with the mouse.;
#P comment 119 355 322 196617 When a preset is recalled \, each  
position+value tuplet is sent to peek~;
#P window linecount 4;
#P comment 115 375 366 196617 PROBLEM : sometimes \, 1st sample's  
value is not correctly recalled. It appears to be stored corretly in  
plugconfig but is modified/lost (?) upon preset's recall. I thought  
it was because of uzi but inserting defer should have solved the  
problem.;
#P window linecount 1;
#P comment 570 418 52 196617 STORAGE;
#P comment 533 531 120 196617 DATA ARE STORED HERE;
#P window linecount 2;
#P comment 116 427 321 196617 TRY THIS : set all samples to 0. \,  
save a preset \, set all samples to 1. \, store another preset.  
Recall first preset \, then second preset.;
#P window linecount 5;
#P comment 39 612 146 196617 Note : this will not work with buffers  
longer than 256 samples (maybe Javascript or Java would allow to  
override this limit).;
#P window linecount 1;
#P comment 266 635 100 196617 Roald Baudoux 2008;
#P connect 59 0 60 0;
#P connect 60 0 56 0;
#P connect 56 1 57 0;
#P connect 57 0 58 0;
#P connect 58 0 55 0;
#P connect 13 0 15 0;
#P connect 15 0 12 0;
#P connect 53 0 49 0;
#P connect 50 0 63 0;
#P connect 63 0 51 0;
#P connect 49 2 50 0;
#P connect 50 0 48 0;
#P connect 48 0 63 1;
#P connect 53 0 52 0;
#P connect 47 0 28 0;
#P connect 46 0 28 0;
#P connect 45 0 28 0;
#P connect 44 0 28 0;
#P connect 12 4 36 0;
#P connect 36 0 61 0;
#P connect 61 0 34 0;
#P connect 34 0 33 0;
#P connect 34 2 33 0;
#P connect 35 0 33 0;
#P connect 33 0 37 0;
#P connect 37 0 62 0;
#P connect 62 0 39 0;
#P connect 39 0 41 0;
#P connect 41 0 42 0;
#P connect 42 0 40 0;
#P connect 40 0 38 0;
#P connect 41 1 40 1;
#P connect 34 1 31 0;
#P connect 40 0 43 0;
#P connect 31 2 32 0;
#P connect 32 0 30 0;
#P connect 30 0 35 0;
#P connect 34 0 54 0;
#P pop;



More information about the pluggo mailing list