abstractions and objects WAS: Re: [PD-dev] [Fwd: PD-cvs Digest, Vol 2, Issue 5]

cyrille cyrille.henry at la-kitchen.fr
Tue Apr 26 12:42:11 CEST 2005



Hans-Christoph Steiner a écrit :
> 
> The more code in CVS, the better as far as I am concerned.  We can  
> figure out how to distribute and organize it separately.
> 
it's also my feeling.

> But that reminds me of another, related idea.  I think we should be  
> trying to implement Pd objects in Pd as much as possible, and therefore  
> making a distinction between objects written in Pd, which are basically  
> "externals", and patches that are more like a finished application  
> (performance patches, examples, etc.).
> 
> Though I know that "abstractions" is an old, established term in  
> regards to the Max family of languages, I think that with Pd it is  
> somewhat misleading.  Ideally there should be no distinction between Pd  
> objects written in C, C++, python, Tcl, TK, and even Pd itself.
> 
the difference i see is that the patch i commit in the abstraction 
folder should not be include by default in the -path...
it's more a place to look at when you want to do something...


cyrille

> That leads me to: is having a separate area for "abstractions" useful?   
> Personally, I have been putting the objects written in Pd into my  
> directory in "externals",
> but maybe it makes sense to have the objects  
> written in Pd all in the "abstractions" section.  But I think there  
> should be a separate section for applications, performance patches,  
> examples, etc. 
> So objects would go into "extra" and apps, examples,  
> etc. would go somewhere else, perhaps an entirely separate distro, or  
> even a separate CVS repository so that we can freely grant CVS access  
> to that distro without having to grant access to the core pure-data  
> CVS.  We could also just use ACLs is that's a problem too...   
> Thinking out loud...
> 
> .hc
> 
> On Apr 25, 2005, at 10:43 AM, cyrille wrote:
> 
>> hello,
>>
>> i'm tring to clean my pd directory, in order to share all abstraction  
>> i made that can be usefull for others.
>> i don't have lot's of time now, so it's quite slow, but in the future  
>> you'll find in the abstraction/nusmuk folder a set of simple but  
>> usefull abstractions.
>>
>> the first one is another granular synthesys exemple.
>>
>> i hope it's ok for everybody.
>>
>> cyrille
>>
>>
>> -------- Message original --------
>> Sujet: PD-cvs Digest, Vol 2, Issue 5
>> Date: Sat, 23 Apr 2005 12:00:03 +0200
>> De: pd-cvs-request at iem.at
>> Répondre à: pd-cvs at iem.at
>> Pour: pd-cvs at iem.at
>>
>> Send PD-cvs mailing list submissions to
>>     pd-cvs at iem.at
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>     http://lists.puredata.info/listinfo/pd-cvs
>> or, via email, send a message with subject or body 'help' to
>>     pd-cvs-request at iem.at
>>
>> You can reach the person managing the list at
>>     pd-cvs-owner at iem.at
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of PD-cvs digest..."
>>
>>
>> Today's Topics:
>>
>>    1. abstractions/La-kitchen autocal-help.pd,1.1.1.1,1.2 (cyrille)
>>    2. abstractions/La-kitchen autocal.pd,1.1.1.1,1.2 (cyrille)
>>    3. abstractions/nusmuk - New directory (cyrille)
>>    4. abstractions/nusmuk/gran - New directory (cyrille)
>>    5. abstractions/nusmuk/gran granulator.pd, NONE,    1.1
>>       hanning.wav, NONE, 1.1 help-granulator.pd, NONE, 1.1 (cyrille)
>>    6. externals/grill/flext/buildsys version.inc,1.2,1.3 (Thomas Grill)
>>    7. externals/grill/flext/source flmap.cpp,1.2,1.3 (Thomas Grill)
>>    8. externals/grill/flext/source flsupport.cpp,1.50,1.51
>>       (Thomas Grill)
>>    9. externals/grill/flext/source flsupport.cpp,1.51,1.52
>>       (Thomas Grill)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Fri, 22 Apr 2005 11:43:34 +0000
>> From: cyrille <nusmuk at users.sourceforge.net>
>> Subject: [PD-cvs] abstractions/La-kitchen autocal-help.pd,1.1.1.1,1.2
>> To: pd-cvs at iem.at
>> Message-ID: <E1DOwZL-0002C3-1B at sc8-pr-cvs1.sourceforge.net>
>>
>> Update of /cvsroot/pure-data/abstractions/La-kitchen
>> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8364
>>
>> Modified Files:
>>     autocal-help.pd
>> Log Message:
>> bugfix + new fonction for the autocal abstraction
>>
>>
>>
>> Index: autocal-help.pd
>> ===================================================================
>> RCS file: /cvsroot/pure-data/abstractions/La-kitchen/autocal-help.pd,v
>> retrieving revision 1.1.1.1
>> retrieving revision 1.2
>> diff -C2 -d -r1.1.1.1 -r1.2
>> *** autocal-help.pd    27 Jan 2005 12:23:02 -0000    1.1.1.1
>> --- autocal-help.pd    22 Apr 2005 11:43:32 -0000    1.2
>> ***************
>> *** 1,57 ****
>>   #N canvas 252 177 643 533 10;
>>   #X obj 18 133 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
>> ! -1 -1 6200 1;
>>   #X obj 18 309 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
>> ! -1 -1 7844 1;
>> ! #X floatatom 39 321 5 0 0 0 - - -;
>> ! #X floatatom 61 340 5 0 0 0 - - -;
>> ! #X floatatom 69 202 5 0 0 0 - - -;
>> ! #X floatatom 52 183 5 0 0 0 - - -;
>> ! #X obj 18 277 autocal 0 127;
>> ! #X floatatom 82 360 5 0 0 0 - - -;
>> ! #X floatatom 104 380 5 0 0 0 - - -;
>> ! #X floatatom 104 241 5 0 0 0 - - -;
>> ! #X floatatom 86 222 5 0 0 0 - - -;
>> ! #X obj 35 154 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
>>   ;
>> ! #N canvas 495 236 547 477 save 0;
>> ! #X obj 66 219 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
>> ! -1 -1 11461 1;
>> ! #X obj 66 29 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
>> ! -1 -1 7600 1;
>> ! #X obj 102 119 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
>> ! 1;
>> ! #X msg 87 218 set \$1;
>> ! #X msg 87 240 21;
>> ! #X msg 109 268 set \$1;
>> ! #X msg 109 290 80;
>> ! #X obj 146 217 loadbang;
>>   #X text 128 42 This is just an exemple of saving the calibration on
>>   message box.;
>> ! #X floatatom 155 132 5 0 0 0 - - -;
>> ! #X obj 66 187 autocal 0 127;
>> ! #X connect 1 0 10 0;
>> ! #X connect 2 0 10 1;
>>   #X connect 3 0 4 0;
>> ! #X connect 4 0 10 2;
>> ! #X connect 5 0 6 0;
>> ! #X connect 6 0 10 3;
>> ! #X connect 7 0 4 0;
>> ! #X connect 7 0 6 0;
>> ! #X connect 9 0 10 2;
>> ! #X connect 10 0 0 0;
>> ! #X connect 10 1 3 0;
>> ! #X connect 10 2 5 0;
>> ! #X restore 15 479 pd save calibration;
>> ! #X text 53 155 learn;
>>   #X text 35 129 Data input;
>> ! #X text 148 277 argument = output range (default = 0..1);
>> ! #X text 150 317 minimum of the input;
>> ! #X text 150 338 maximum of the input;
>> ! #X text 150 360 center of the input;
>>   #X text 43 424 calibrated output;
>> ! #X text 148 178 manual change the input minimum;
>> ! #X text 149 197 manual change the input maximum;
>> ! #X text 150 379 variation amplitude;
>>   #X text 195 45 autocal is an abstraction dedicated to calibrated  
>> sensors
>>   value. (auto calibration);
>> --- 1,55 ----
>>   #N canvas 252 177 643 533 10;
>>   #X obj 18 133 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
>> ! -1 -1 10100 1;
>>   #X obj 18 309 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
>> ! -1 -1 3800 1;
>> ! #X floatatom 53 321 5 0 0 0 - - -;
>> ! #X floatatom 89 340 5 0 0 0 - - -;
>> ! #X floatatom 89 202 5 0 0 0 - - -;
>> ! #X floatatom 65 183 5 0 0 0 - - -;
>> ! #X floatatom 124 360 5 0 0 0 - - -;
>> ! #X floatatom 160 380 5 0 0 0 - - -;
>> ! #X floatatom 136 241 5 0 0 0 - - -;
>> ! #X floatatom 112 222 5 0 0 0 - - -;
>> ! #X obj 41 154 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
>>   ;
>> ! #N canvas 62 435 547 477 save 0;
>> ! #X obj 67 222 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
>> ! -1 -1 9005 1;
>> ! #X obj 67 35 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
>> ! -1 -1 6800 1;
>> ! #X obj 87 150 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
>> ! ;
>> ! #X msg 99 231 set \$1;
>> ! #X msg 99 253 29;
>> ! #X msg 164 271 set \$1;
>> ! #X obj 164 213 loadbang;
>>   #X text 128 42 This is just an exemple of saving the calibration on
>>   message box.;
>> ! #X msg 164 293 84;
>> ! #X obj 67 189 autocal 0 127 0 12;
>> ! #X text 127 75 Calibration is then saved automaticaly with the patch
>> ! ;
>> ! #X connect 1 0 9 0;
>> ! #X connect 2 0 9 1;
>>   #X connect 3 0 4 0;
>> ! #X connect 4 0 9 2;
>> ! #X connect 5 0 8 0;
>> ! #X connect 6 0 4 0;
>> ! #X connect 6 0 8 0;
>> ! #X connect 8 0 9 3;
>> ! #X connect 9 0 0 0;
>> ! #X connect 9 1 3 0;
>> ! #X connect 9 2 5 0;
>> ! #X restore 15 506 pd save calibration;
>> ! #X text 59 155 learn;
>>   #X text 35 129 Data input;
>> ! #X text 206 317 minimum of the input;
>> ! #X text 206 338 maximum of the input;
>> ! #X text 206 360 center of the input;
>>   #X text 43 424 calibrated output;
>> ! #X text 191 178 manual change the input minimum;
>> ! #X text 191 197 manual change the input maximum;
>> ! #X text 206 379 variation amplitude;
>>   #X text 195 45 autocal is an abstraction dedicated to calibrated  
>> sensors
>>   value. (auto calibration);
>> ***************
>> *** 61,78 ****
>>   while "learn" is 1 \, and scale this input to the specified range.
>>   ;
>> ! #X text 148 220 manual change the input center (jitter);
>> ! #X text 149 239 manual change the input amplitude (change sensibility
>>   of the sensors);
>>   #X text 296 9 autocal;
>> ! #X text 328 482 cyrille.henry at la-kitchen.fr 12/2004;
>> ! #X connect 0 0 6 0;
>> ! #X connect 4 0 6 3;
>> ! #X connect 5 0 6 2;
>> ! #X connect 6 0 1 0;
>> ! #X connect 6 1 2 0;
>> ! #X connect 6 2 3 0;
>> ! #X connect 6 3 7 0;
>> ! #X connect 6 4 8 0;
>> ! #X connect 9 0 6 5;
>> ! #X connect 10 0 6 4;
>> ! #X connect 11 0 6 1;
>> --- 59,112 ----
>>   while "learn" is 1 \, and scale this input to the specified range.
>>   ;
>> ! #X text 190 220 manual change the input center (jitter);
>> ! #X text 191 239 manual change the input amplitude (change sensibility
>>   of the sensors);
>>   #X text 296 9 autocal;
>> ! #N canvas 0 0 885 432 non-linear 0;
>> ! #X obj 17 28 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
>> ! -1 -1 8200 1;
>> ! #X obj 17 204 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
>> ! -1 -1 10205 1;
>> ! #X floatatom 159 148 5 0 0 0 - - -;
>> ! #X text 196 248 float is for the rest...;
>> ! #X text 201 214 1 is for square;
>> ! #X text 194 229 -1 is for square root;
>> ! #X text 184 176 last parametter control the shape of the transfer  
>> fonction
>> ! ;
>> ! #X text 200 199 O (default) is for linear;
>> ! #X obj 17 172 autocal 0 127 0 127 1;
>> ! #X connect 0 0 8 0;
>> ! #X connect 2 0 8 6;
>> ! #X connect 8 0 1 0;
>> ! #X restore 15 487 pd non-linear;
>> ! #X text 172 278 argument = output range (default = 0..1) \, input  
>> range
>> ! (default = 0 1) \, curve (default = linear);
>> ! #N canvas 0 0 525 500 clip 0;
>> ! #X obj 50 28 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
>> ! -1 -1 2000 1;
>> ! #X obj 50 207 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
>> ! -1 -1 2000 1;
>> ! #X obj 104 72 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
>> ! ;
>> ! #X msg 104 94 clip \$1;
>> ! #X text 133 72 clik output to limit value or not;
>> ! #X obj 50 175 autocal 30 80 30 80;
>> ! #X text 176 93 (default = 1);
>> ! #X connect 0 0 5 0;
>> ! #X connect 2 0 3 0;
>> ! #X connect 3 0 5 0;
>> ! #X connect 5 0 1 0;
>> ! #X restore 15 468 pd clip;
>> ! #X text 325 498 cyrille.henry at la-kitchen.fr 04_2005;
>> ! #X obj 18 277 autocal 10 80 0 127 2;
>> ! #X connect 0 0 31 0;
>> ! #X connect 4 0 31 3;
>> ! #X connect 5 0 31 2;
>> ! #X connect 8 0 31 5;
>> ! #X connect 9 0 31 4;
>> ! #X connect 10 0 31 1;
>> ! #X connect 31 0 1 0;
>> ! #X connect 31 1 2 0;
>> ! #X connect 31 2 3 0;
>> ! #X connect 31 3 6 0;
>> ! #X connect 31 4 7 0;
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Fri, 22 Apr 2005 11:43:49 +0000
>> From: cyrille <nusmuk at users.sourceforge.net>
>> Subject: [PD-cvs] abstractions/La-kitchen autocal.pd,1.1.1.1,1.2
>> To: pd-cvs at iem.at
>> Message-ID: <E1DOwZp-0002Dg-HM at sc8-pr-cvs1.sourceforge.net>
>>
>> Update of /cvsroot/pure-data/abstractions/La-kitchen
>> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8497
>>
>> Modified Files:
>>     autocal.pd
>> Log Message:
>>
>>
>> Index: autocal.pd
>> ===================================================================
>> RCS file: /cvsroot/pure-data/abstractions/La-kitchen/autocal.pd,v
>> retrieving revision 1.1.1.1
>> retrieving revision 1.2
>> diff -C2 -d -r1.1.1.1 -r1.2
>> *** autocal.pd    27 Jan 2005 12:23:02 -0000    1.1.1.1
>> --- autocal.pd    22 Apr 2005 11:43:47 -0000    1.2
>> ***************
>> *** 1,130 ****
>> ! #N canvas 474 99 794 740 10;
>> ! #X msg 305 236 0;
>> ! #X obj 223 300 f;
>> ! #X obj 343 302 f;
>> ! #X obj 186 300 min;
>> ! #X obj 305 301 max;
>> ! #X obj 186 177 select 1;
>> ! #X obj 186 259 t f f;
>> ! #X obj 305 262 t f f;
>> ! #X obj 80 107 spigot;
>> ! #X obj 46 683 outlet;
>> ! #X obj 92 460 loadbang;
>> ! #X obj 46 483 max 0;
>> ! #N canvas 0 0 312 427 range_0_1 0;
>>   #X obj 16 45 inlet;
>> ! #X obj 77 46 inlet;
>> ! #X obj 161 49 inlet;
>> ! #X obj 16 198 -;
>> ! #X obj 16 284 outlet;
>> ! #X obj 77 77 t f b f;
>> ! #X obj 67 185 -;
>> ! #X obj 16 234 / 127;
>>   #X connect 0 0 3 0;
>> ! #X connect 1 0 5 0;
>> ! #X connect 2 0 6 0;
>> ! #X connect 3 0 7 0;
>> ! #X connect 5 0 3 1;
>> ! #X connect 5 1 6 0;
>> ! #X connect 5 2 6 1;
>>   #X connect 6 0 7 1;
>>   #X connect 7 0 4 0;
>> ! #X restore 46 425 pd range_0_1;
>> ! #X obj 46 460 min 1;
>> ! #X obj 46 651 + \$1;
>> ! #X obj 117 507 \$1;
>> ! #X obj 92 507 \$2;
>> ! #X obj 92 532 -;
>> ! #X obj 92 554 sel 0;
>> ! #X obj 46 607 * 1;
>> ! #X obj 92 483 t b b;
>> ! #X obj 46 23 inlet in;
>> ! #X obj 186 23 inlet learn;
>> ! #X obj 324 21 inlet min;
>> ! #X obj 491 18 inlet max;
>> ! #X obj 566 45 inlet center;
>> ! #X obj 208 358 f;
>> ! #X obj 332 362 f;
>> ! #X obj 80 237 t f f;
>> ! #X obj 316 397 -;
>> ! #X obj 208 404 +;
>> ! #X obj 208 427 / 2;
>> ! #X obj 208 464 f;
>> ! #X obj 316 458 f;
>> ! #X obj 316 422 * -1;
>> ! #X obj 316 493 / 2;
>> ! #X obj 208 599 +;
>> ! #X obj 224 577 * -1;
>> ! #X obj 300 601 +;
>> ! #X obj 668 70 t b b f;
>> ! #X obj 208 684 outlet min;
>> ! #X obj 300 685 outlet max;
>> ! #X obj 456 685 outlet center;
>> ! #X obj 583 684 outlet amplitude;
>> ! #X obj 669 46 inlet amplitude;
>> ! #X msg 186 233 1e+09;
>> ! #X obj 208 506 t f f;
>> ! #X obj 491 42 t b f;
>> ! #X connect 0 0 7 0;
>>   #X connect 1 0 3 1;
>> ! #X connect 2 0 4 1;
>>   #X connect 3 0 1 0;
>> ! #X connect 3 0 26 0;
>> ! #X connect 4 0 2 0;
>> ! #X connect 4 0 27 0;
>> ! #X connect 5 0 0 0;
>> ! #X connect 5 0 45 0;
>>   #X connect 6 0 3 0;
>>   #X connect 6 1 3 1;
>> ! #X connect 7 0 4 0;
>> ! #X connect 7 1 4 1;
>> ! #X connect 8 0 28 0;
>> ! #X connect 10 0 20 0;
>> ! #X connect 11 0 19 0;
>> ! #X connect 12 0 13 0;
>> ! #X connect 13 0 11 0;
>> ! #X connect 14 0 9 0;
>> ! #X connect 15 0 17 1;
>> ! #X connect 16 0 17 0;
>> ! #X connect 17 0 18 0;
>> ! #X connect 18 1 19 1;
>> ! #X connect 19 0 14 0;
>> ! #X connect 20 0 16 0;
>> ! #X connect 20 1 15 0;
>> ! #X connect 21 0 8 0;
>> ! #X connect 21 0 12 0;
>> ! #X connect 22 0 8 1;
>> ! #X connect 22 0 5 0;
>> ! #X connect 23 0 26 0;
>> ! #X connect 24 0 47 0;
>> ! #X connect 25 0 32 0;
>> ! #X connect 26 0 29 0;
>> ! #X connect 26 0 30 0;
>> ! #X connect 27 0 29 1;
>> ! #X connect 27 0 30 1;
>> ! #X connect 28 0 3 0;
>> ! #X connect 28 1 4 0;
>> ! #X connect 29 0 34 0;
>> ! #X connect 30 0 31 0;
>> ! #X connect 31 0 32 0;
>> ! #X connect 32 0 42 0;
>> ! #X connect 32 0 46 0;
>> ! #X connect 33 0 35 0;
>> ! #X connect 33 0 43 0;
>> ! #X connect 34 0 33 0;
>> ! #X connect 35 0 38 1;
>> ! #X connect 35 0 37 0;
>> ! #X connect 36 0 40 0;
>> ! #X connect 36 0 12 1;
>> ! #X connect 37 0 36 1;
>> ! #X connect 38 0 41 0;
>> ! #X connect 38 0 12 2;
>> ! #X connect 39 0 36 0;
>> ! #X connect 39 1 38 0;
>> ! #X connect 39 2 33 0;
>> ! #X connect 44 0 39 0;
>> ! #X connect 45 0 6 0;
>> ! #X connect 46 0 36 0;
>> ! #X connect 46 1 38 0;
>> ! #X connect 47 0 26 0;
>> ! #X connect 47 1 27 0;
>> --- 1,229 ----
>> ! #N canvas 494 63 973 740 10;
>> ! #X obj 224 311 f;
>> ! #X obj 344 313 f;
>> ! #X obj 187 311 min;
>> ! #X obj 306 312 max;
>> ! #X obj 187 188 select 1;
>> ! #X obj 187 270 t f f;
>> ! #X obj 306 273 t f f;
>> ! #X obj 81 118 spigot;
>> ! #X obj 47 546 max 0;
>> ! #N canvas 218 182 467 408 range_0_1 0;
>>   #X obj 16 45 inlet;
>> ! #X obj 76 46 inlet;
>> ! #X obj 171 43 inlet;
>> ! #X obj 16 340 outlet;
>> ! #X obj 76 163 t f b f;
>> ! #X obj 16 254 -;
>> ! #X obj 76 138 \$3;
>> ! #X obj 98 249 -;
>> ! #X obj 98 223 \$4;
>> ! #X obj 16 290 /;
>> ! #X obj 254 103 \$3;
>> ! #X obj 254 126 || \$4;
>> ! #X text 234 203 if \$0 = \$4 = 0 then \$4=127;
>> ! #X obj 224 45 r \$0-loadbang;
>> ! #X obj 254 150 sel 0;
>> ! #X obj 224 73 t b b;
>> ! #X msg 254 173 1;
>> ! #X connect 0 0 5 0;
>> ! #X connect 1 0 6 0;
>> ! #X connect 2 0 8 0;
>> ! #X connect 4 0 5 1;
>> ! #X connect 4 1 8 0;
>> ! #X connect 4 2 7 1;
>> ! #X connect 5 0 9 0;
>> ! #X connect 6 0 4 0;
>> ! #X connect 7 0 9 1;
>> ! #X connect 8 0 7 0;
>> ! #X connect 9 0 3 0;
>> ! #X connect 10 0 11 0;
>> ! #X connect 11 0 14 0;
>> ! #X connect 13 0 15 0;
>> ! #X connect 14 0 16 0;
>> ! #X connect 15 0 6 0;
>> ! #X connect 15 1 10 0;
>> ! #X connect 16 0 8 0;
>> ! #X restore 47 436 pd range_0_1;
>> ! #X obj 47 523 min 1;
>> ! #X obj 47 679 + \$1;
>> ! #X obj 167 546 \$1;
>> ! #X obj 142 546 \$2;
>> ! #X obj 142 571 -;
>> ! #X obj 142 593 sel 0;
>> ! #X obj 47 657 * 1;
>> ! #X obj 142 522 t b b;
>> ! #X obj 8 7 inlet in;
>> ! #X obj 187 34 inlet learn;
>> ! #X obj 361 34 inlet min;
>> ! #X obj 457 32 inlet max;
>> ! #X obj 567 56 inlet center;
>> ! #X obj 81 248 t f f;
>> ! #X obj 457 630 / 2;
>> ! #X obj 565 627 * -1;
>> ! #X obj 699 165 / 2;
>> ! #X obj 567 249 +;
>> ! #X obj 583 227 * -1;
>> ! #X obj 683 250 +;
>> ! #X obj 308 699 outlet min;
>> ! #X obj 373 723 outlet max;
>> ! #X obj 457 699 outlet center;
>> ! #X obj 565 699 outlet amplitude;
>> ! #X obj 669 56 inlet amplitude;
>> ! #X msg 187 244 1e+09;
>> ! #X obj 567 170 t f f;
>> ! #X obj 457 601 +;
>> ! #X obj 47 701 outlet data;
>> ! #X obj 826 65 inlet NL;
>> ! #X text 834 82 O is for linear;
>> ! #X text 793 132 float is for the rest...;
>> ! #X obj 826 188 \$5;
>> ! #X obj 565 602 -;
>> ! #X obj 457 579 t f f;
>> ! #X obj 308 524 f;
>> ! #X obj 373 521 f;
>> ! #X obj 567 134 f;
>> ! #X obj 669 81 t b f;
>> ! #X obj 457 554 f;
>> ! #X obj 457 447 t b f;
>> ! #X text 835 97 1 is for square;
>> ! #X text 828 112 -1 is for square root;
>> ! #X msg 306 247 1e-09;
>> ! #X obj 334 107 spigot 1;
>> ! #X msg 400 135 0;
>> ! #X obj 351 164 loadbang;
>> ! #X obj 142 499 r \$0-loadbang;
>> ! #X obj 840 164 r \$0-loadbang;
>> ! #X obj 47 62 t f b;
>> ! #X text 340 212 fake loadbang;
>> ! #X obj 418 167 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
>> ! -1;
>> ! #X obj 334 190 s \$0-loadbang;
>> ! #X obj 8 32 route clip;
>> ! #N canvas 0 0 450 300 gate2 0;
>> ! #X obj 30 20 inlet;
>> ! #X obj 30 215 outlet;
>> ! #X obj 193 22 inlet;
>> ! #X obj 156 132 spigot;
>> ! #X obj 156 218 outlet;
>> ! #X obj 193 59 * -1;
>> ! #X obj 193 87 + 1;
>> ! #X obj 30 129 spigot 1;
>>   #X connect 0 0 3 0;
>> ! #X connect 0 0 7 0;
>> ! #X connect 2 0 5 0;
>> ! #X connect 2 0 7 1;
>> ! #X connect 3 0 4 0;
>> ! #X connect 5 0 6 0;
>> ! #X connect 6 0 3 1;
>> ! #X connect 7 0 1 0;
>> ! #X restore 47 498 pd gate2;
>> ! #X floatatom 70 464 5 0 0 0 - - -;
>> ! #N canvas 0 0 631 664 pow 0;
>> ! #X obj 106 238 pow 1;
>> ! #X obj 62 49 inlet;
>> ! #X obj 271 44 inlet;
>> ! #X obj 106 405 outlet;
>> ! #X obj 271 193 exp;
>> ! #X msg 287 123 2;
>> ! #X obj 287 148 log;
>> ! #X obj 271 171 *;
>> ! #X obj 287 99 r \$0-loadbang;
>> ! #X obj 62 178 moses 0;
>> ! #X obj 62 283 * -1;
>> ! #X obj 62 325 pow 1;
>> ! #X obj 62 352 * -1;
>> ! #X connect 0 0 3 0;
>> ! #X connect 1 0 9 0;
>> ! #X connect 2 0 7 0;
>> ! #X connect 4 0 0 1;
>> ! #X connect 4 0 11 1;
>> ! #X connect 5 0 6 0;
>>   #X connect 6 0 7 1;
>>   #X connect 7 0 4 0;
>> ! #X connect 8 0 5 0;
>> ! #X connect 9 0 10 0;
>> ! #X connect 9 1 0 0;
>> ! #X connect 10 0 11 0;
>> ! #X connect 11 0 12 0;
>> ! #X connect 12 0 3 0;
>> ! #X restore 47 627 pd pow;
>> ! #X connect 0 0 2 1;
>>   #X connect 1 0 3 1;
>> ! #X connect 2 0 0 0;
>> ! #X connect 2 0 45 0;
>>   #X connect 3 0 1 0;
>> ! #X connect 3 0 46 0;
>> ! #X connect 4 0 53 0;
>> ! #X connect 4 0 35 0;
>> ! #X connect 5 0 2 0;
>> ! #X connect 5 1 2 1;
>>   #X connect 6 0 3 0;
>>   #X connect 6 1 3 1;
>> ! #X connect 7 0 23 0;
>> ! #X connect 8 0 66 0;
>> ! #X connect 9 0 64 0;
>> ! #X connect 9 0 65 0;
>> ! #X connect 10 0 8 0;
>> ! #X connect 11 0 38 0;
>> ! #X connect 12 0 14 1;
>> ! #X connect 13 0 14 0;
>> ! #X connect 14 0 15 0;
>> ! #X connect 15 1 16 1;
>> ! #X connect 16 0 11 0;
>> ! #X connect 17 0 13 0;
>> ! #X connect 17 1 12 0;
>> ! #X connect 18 0 63 0;
>> ! #X connect 19 0 7 1;
>> ! #X connect 19 0 4 0;
>> ! #X connect 20 0 45 0;
>> ! #X connect 21 0 50 0;
>> ! #X connect 22 0 47 0;
>> ! #X connect 23 0 2 0;
>> ! #X connect 23 1 3 0;
>> ! #X connect 24 0 32 0;
>> ! #X connect 25 0 33 0;
>> ! #X connect 26 0 29 1;
>> ! #X connect 26 0 28 0;
>> ! #X connect 27 0 45 0;
>> ! #X connect 28 0 27 1;
>> ! #X connect 29 0 46 0;
>> ! #X connect 34 0 48 0;
>> ! #X connect 35 0 5 0;
>> ! #X connect 36 0 27 0;
>> ! #X connect 36 1 29 0;
>> ! #X connect 37 0 24 0;
>> ! #X connect 39 0 42 0;
>> ! #X connect 42 0 66 1;
>> ! #X connect 43 0 25 0;
>> ! #X connect 44 0 37 0;
>> ! #X connect 44 1 43 0;
>> ! #X connect 45 0 30 0;
>> ! #X connect 45 0 49 0;
>> ! #X connect 45 0 9 1;
>> ! #X connect 46 0 31 0;
>> ! #X connect 46 0 43 1;
>> ! #X connect 46 0 37 1;
>> ! #X connect 46 0 9 2;
>> ! #X connect 47 0 36 0;
>> ! #X connect 48 0 47 0;
>> ! #X connect 48 1 26 0;
>> ! #X connect 49 0 44 0;
>> ! #X connect 50 0 49 0;
>> ! #X connect 50 1 46 0;
>> ! #X connect 53 0 6 0;
>> ! #X connect 54 0 55 0;
>> ! #X connect 54 0 62 0;
>> ! #X connect 55 0 54 1;
>> ! #X connect 56 0 62 0;
>> ! #X connect 57 0 17 0;
>> ! #X connect 58 0 42 0;
>> ! #X connect 59 0 7 0;
>> ! #X connect 59 0 9 0;
>> ! #X connect 59 1 54 0;
>> ! #X connect 61 0 62 0;
>> ! #X connect 63 0 64 1;
>> ! #X connect 63 1 59 0;
>> ! #X connect 64 0 10 0;
>> ! #X connect 64 1 66 0;
>> ! #X connect 66 0 16 0;
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Fri, 22 Apr 2005 13:24:29 +0000
>> From: cyrille <nusmuk at users.sourceforge.net>
>> Subject: [PD-cvs] abstractions/nusmuk - New directory
>> To: pd-cvs at iem.at
>> Message-ID: <E1DOy8z-0008Px-SC at sc8-pr-cvs1.sourceforge.net>
>>
>> Update of /cvsroot/pure-data/abstractions/nusmuk
>> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32295/nusmuk
>>
>> Log Message:
>> Directory /cvsroot/pure-data/abstractions/nusmuk added to the  repository
>>
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Fri, 22 Apr 2005 13:25:22 +0000
>> From: cyrille <nusmuk at users.sourceforge.net>
>> Subject: [PD-cvs] abstractions/nusmuk/gran - New directory
>> To: pd-cvs at iem.at
>> Message-ID: <E1DOy9q-0000DS-Bu at sc8-pr-cvs1.sourceforge.net>
>>
>> Update of /cvsroot/pure-data/abstractions/nusmuk/gran
>> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv765/gran
>>
>> Log Message:
>> Directory /cvsroot/pure-data/abstractions/nusmuk/gran added to the  
>> repository
>>
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 5
>> Date: Fri, 22 Apr 2005 13:26:42 +0000
>> From: cyrille <nusmuk at users.sourceforge.net>
>> Subject: [PD-cvs] abstractions/nusmuk/gran granulator.pd, NONE,    1.1
>>     hanning.wav, NONE, 1.1 help-granulator.pd, NONE, 1.1
>> To: pd-cvs at iem.at
>> Message-ID: <E1DOyB8-0000R7-SJ at sc8-pr-cvs1.sourceforge.net>
>>
>> Update of /cvsroot/pure-data/abstractions/nusmuk/gran
>> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1504
>>
>> Added Files:
>>     granulator.pd hanning.wav help-granulator.pd
>> Log Message:
>> an other granulator synthesys abstraction...
>>
>>
>>
>> --- NEW FILE: granulator.pd ---
>> #N canvas 51 92 1066 445 10;
>> #X obj 223 392 outlet;
>> #X obj 44 388 outlet~;
>> #X obj 220 14 inlet;
>> #X obj 513 25 inlet;
>> #X msg 514 351 \; \$1 \$2 \;;
>> #X obj 513 239 t b f;
>> #X obj 514 284 f;
>> #X obj 514 328 pack s f;
>> #N canvas 0 0 1139 604 choix_table 0;
>> #X obj 26 18 inlet;
>> #X obj 26 526 outlet;
>> #X obj 26 196 t f f;
>> #X obj 123 527 outlet;
>> #X obj 134 286 r \$0-table0;
>> #X msg 134 312 set \$1;
>> #X obj 123 258 sel 0 1 2 3 4 5 6 7;
>> #X msg 123 338 1024;
>> #X msg 226 313 set \$1;
>> [...6960 lines suppressed...]
>> #X connect 18 5 19 6;
>> #X connect 18 6 19 7;
>> #X connect 18 7 19 8;
>> #X connect 18 8 19 9;
>> #X connect 19 0 14 0;
>> #X connect 21 0 7 0;
>> #X connect 22 0 11 0;
>> #X connect 22 1 24 0;
>> #X connect 23 0 37 0;
>> #X connect 23 1 6 1;
>> #X connect 23 1 38 0;
>> #X connect 24 0 35 0;
>> #X connect 34 0 23 0;
>> #X connect 34 1 22 0;
>> #X connect 34 2 8 1;
>> #X connect 34 3 18 0;
>> #X connect 35 0 25 0;
>> #X connect 36 0 0 0;
>> #X connect 37 0 36 0;
>> #X connect 38 0 37 1;
>>
>> --- NEW FILE: hanning.wav ---
>> (This appears to be a binary file; contents omitted.)
>>
>> --- NEW FILE: help-granulator.pd ---
>> #N canvas 145 74 1000 707 10;
>> #X obj 115 575 soundfiler;
>> #X msg 34 171 open \$1 \$2;
>> #X obj 85 91 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
>> -1 0;
>> #X obj 34 67 openpanel;
>> #X obj 34 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
>> -1;
>> #X obj 34 147 pack s f;
>> #X obj 530 48 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
>> ;
>> #X floatatom 581 50 5 0 0 0 - - -;
>> #X obj 530 118 f;
>> #X floatatom 596 176 5 0 0 0 - - -;
>> #X floatatom 607 195 5 0 0 0 - - -;
>> #X floatatom 654 216 5 0 0 0 - - -;
>> #X floatatom 668 236 5 0 0 0 - - -;
>> #X floatatom 717 255 5 0 0 0 - - -;
>> #X floatatom 728 272 5 0 0 0 - - -;
>> #X obj 33 576 *~ 0.1;
>> #X obj 34 614 dac~;
>> #X obj 596 150 line;
>> #X obj 546 96 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
>> -1 0;
>> #X obj 530 363 pack f 0 0 50 0 69 0 1 0;
>> #X floatatom 749 312 5 0 0 0 - - -;
>> #X floatatom 760 329 5 0 0 0 - - -;
>> #X text 286 24 ch 2005_04_10;
>> #X msg 105 352 window cos;
>> #X msg 105 374 window hanning.wav;
>> #X msg 65 199 table foo 44100;
>> #X text 74 216 use a specific table for the audio source;
>> #X msg 84 257 table reset;
>> #X obj 530 71 metro 25;
>> #X msg 596 127 0 \, 1 1000;
>> #N canvas 148 50 1061 709 help 0;
>> #X obj 216 107 table realtime 441000;
>> #X obj 49 161 tabwrite~ realtime;
>> #X obj 49 131 adc~;
>> #X obj 29 102 metro 10000;
>> #X obj 29 51 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
>> ;
>> #X text 54 51 loop recording on a table;
>> #X obj 29 75 t f f;
>> #X msg 29 190 0 \, 1 10000;
>> #X text 122 193 position of the recording in the table;
>> #X obj 29 386 f;
>> #X text 195 161 record something in a table;
>> #X msg 43 500 table realtime 441000;
>> #X obj 43 478 loadbang;
>> #X obj 29 423 t b f;
>> #X obj 29 449 pack 0 0 0.1 300 0 69 0 1 0;
>> #X obj 29 271 line 0 150;
>> #X text 42 293 change the line time grain to adjust to played grain
>> size;
>> #X text 60 388 center of the reding position (0.1 * 10s after writing
>> in the table);
>> #X obj 569 383 f;
>> #X msg 583 497 table realtime 441000;
>> #X obj 583 475 loadbang;
>> #X obj 569 420 t b f;
>> #X obj 569 247 spigot 0;
>> #X obj 620 209 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
>> 1;
>> #X text 398 208 add an other granulator latter;
>> #X obj 569 446 pack 0 0 0.5 60 0 69 5 1 0;
>> #X obj 569 272 line 0 30;
>> #X obj 29 315 - 0.1;
>> #X obj 29 339 moses 0;
>> #X obj 29 361 + 1;
>> #X text 88 315 10% before the position of the writing index;
>> #X text 93 342 to keep the number from 0 to 1;
>> #X obj 569 520 granulator;
>> #X obj 29 523 granulator;
>> #X obj 569 312 - 0.5;
>> #X obj 569 337 moses 0;
>> #X obj 569 360 + 1;
>> #X text 631 360 float modulo;
>> #X connect 2 0 1 0;
>> #X connect 2 1 1 0;
>> #X connect 3 0 1 0;
>> #X connect 3 0 7 0;
>> #X connect 4 0 6 0;
>> #X connect 6 0 3 0;
>> #X connect 7 0 15 0;
>> #X connect 7 0 22 0;
>> #X connect 9 0 13 0;
>> #X connect 11 0 33 0;
>> #X connect 12 0 11 0;
>> #X connect 13 0 14 0;
>> #X connect 13 1 14 1;
>> #X connect 14 0 33 0;
>> #X connect 15 0 27 0;
>> #X connect 18 0 21 0;
>> #X connect 19 0 32 0;
>> #X connect 20 0 19 0;
>> #X connect 21 0 25 0;
>> #X connect 21 1 25 1;
>> #X connect 22 0 26 0;
>> #X connect 23 0 22 1;
>> #X connect 25 0 32 0;
>> #X connect 26 0 34 0;
>> #X connect 27 0 28 0;
>> #X connect 28 0 29 0;
>> #X connect 28 1 9 0;
>> #X connect 29 0 9 0;
>> #X connect 34 0 35 0;
>> #X connect 35 0 36 0;
>> #X connect 35 1 18 0;
>> #X connect 36 0 18 0;
>> #X restore 34 664 pd help RealTime Granulator;
>> #X obj 34 552 granulator;
>> #X text 260 7 granular synthesys with pd;
>> #X text 65 46 open a sound file;
>> #X text 8 111 table number (8 diferents files can be open in the same
>> time);
>> #X text 689 95 table to read;
>> #X text 722 236 Random;
>> #X text 776 272 Random;
>> #X text 810 330 Random;
>> #X text 645 175 grain position in the sound file (0 - 1);
>> #X text 655 196 Random on this position;
>> #X text 704 215 grain size (ms);
>> #X text 766 254 pich (midi);
>> #X text 798 311 amplitude (0 - 1);
>> #X text 539 383 Table number \, position \, Random \, size \, random
>> \, frequency \, random \, ampitude \, random;
>> #X text 224 353 default windowing for the grain;
>> #X text 240 373 load a soundfile for the windowing;
>> #X text 196 572 always connect a soundfiler here : it help locating
>> the sound relatively to the patch folder \, and not to the abstraction
>> folder;
>> #X text 95 279 to get back to the internal tables;
>> #X text 74 232 (user has to fill it manually : used for live  
>> granulation)
>> ;
>> #X connect 0 0 31 1;
>> #X connect 1 0 31 0;
>> #X connect 2 0 5 1;
>> #X connect 3 0 5 0;
>> #X connect 4 0 3 0;
>> #X connect 5 0 1 0;
>> #X connect 6 0 28 0;
>> #X connect 7 0 28 1;
>> #X connect 8 0 19 0;
>> #X connect 9 0 19 1;
>> #X connect 10 0 19 2;
>> #X connect 11 0 19 3;
>> #X connect 12 0 19 4;
>> #X connect 13 0 19 5;
>> #X connect 14 0 19 6;
>> #X connect 15 0 16 0;
>> #X connect 15 0 16 1;
>> #X connect 17 0 9 0;
>> #X connect 18 0 8 1;
>> #X connect 19 0 31 0;
>> #X connect 20 0 19 7;
>> #X connect 21 0 19 8;
>> #X connect 23 0 31 0;
>> #X connect 24 0 31 0;
>> #X connect 25 0 31 0;
>> #X connect 27 0 31 0;
>> #X connect 28 0 8 0;
>> #X connect 29 0 17 0;
>> #X connect 31 0 15 0;
>> #X connect 31 1 0 0;
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 6
>> Date: Sat, 23 Apr 2005 08:58:07 +0000
>> From: Thomas Grill <xovo at users.sourceforge.net>
>> Subject: [PD-cvs] externals/grill/flext/buildsys version.inc,1.2,1.3
>> To: pd-cvs at iem.at
>> Message-ID: <E1DPGSl-0004AR-R8 at sc8-pr-cvs1.sourceforge.net>
>>
>> Update of /cvsroot/pure-data/externals/grill/flext/buildsys
>> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15990/buildsys
>>
>> Added Files:
>>     version.inc
>> Log Message:
>> added profiling flags for OSX
>> small fixes
>> more correct library versioning
>>
>>
>> --- NEW FILE: version.inc ---
>> FLEXTMAJOR=0
>> FLEXTMINOR=5
>> FLEXTMICRO=0
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 7
>> Date: Sat, 23 Apr 2005 08:58:07 +0000
>> From: Thomas Grill <xovo at users.sourceforge.net>
>> Subject: [PD-cvs] externals/grill/flext/source flmap.cpp,1.2,1.3
>> To: pd-cvs at iem.at
>> Message-ID: <E1DPGSm-0004AZ-0Q at sc8-pr-cvs1.sourceforge.net>
>>
>> Update of /cvsroot/pure-data/externals/grill/flext/source
>> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15990/source
>>
>> Added Files:
>>     flmap.cpp
>> Log Message:
>> added profiling flags for OSX
>> small fixes
>> more correct library versioning
>>
>>
>> --- NEW FILE: flmap.cpp ---
>> /*
>>
>> flext - C++ layer for Max/MSP and pd (pure data) externals
>>
>> Copyright (c) 2001-2005 Thomas Grill (gr at grrrr.org)
>> For information on usage and redistribution, and for a DISCLAIMER OF  ALL
>> WARRANTIES, see the file, "license.txt," in this distribution.
>>
>> */
>>
>> /*! \file flmap.cpp
>>     \brief flext container classes.
>> */
>>
>> #include "flext.h"
>> #include "flmap.h"
>>
>> TableAnyMap::~TableAnyMap() { clear(); }
>>
>> void TableAnyMap::clear()
>> {
>>     if(left) { _delmap(left); left = NULL; }
>>     if(right) { _delmap(right); right = NULL; }
>>     n = 0;
>> }
>>
>>
>> void *TableAnyMap::_set(int tsize,size_t k,void *t)
>> {
>>     FLEXT_ASSERT(n);
>>
>>     if(n < tsize) {
>>         // fall through
>>     }
>>     else if(k < data[0].key)
>>         return _toleft(tsize,k,t);
>>     else if(k > data[tsize-1].key)
>>         return _toright(tsize,k,t);
>>
>>     int ix = _tryix(k);
>>     if(ix >= n) {
>>         FLEXT_ASSERT(ix == n);
>>         // after last entry
>>         data[n++](k,t);
>>         return NULL;
>>     }
>>
>>     size_t dk = data[ix].key;
>>     if(k == dk) {
>>         // update data in existing slot (same key)
>>         void *a = data[ix].value;
>>         data[ix] = t;
>>         return a;
>>     }
>>     else {
>>         // insert new slot by shifting the higher ones
>>         FLEXT_ASSERT(k < dk);
>>         void *a;
>>         if(n == tsize)
>>             a = _toright(tsize,data[tsize-1]);
>>         else {
>>             ++n;
>>             a = NULL;
>>         }
>>
>>         Data *tg = data+ix;
>>         for(Data *d = data+n-1; d > tg; d--) d[0] = d[-1];
>>         (*tg)(k,t);
>>         return a;
>>     }
>> }
>>
>> void *TableAnyMap::_find(int tsize,size_t k) const
>> {
>>     FLEXT_ASSERT(n);
>>     if(n < tsize) {
>>         // fall through
>>     }
>>     else if(k < data[0].key)
>>         return left?left->_find(tsize,k):NULL;
>>     else if(k > data[n-1].key)
>>         return right?right->_find(tsize,k):NULL;
>>
>>     const int ix = _tryix(k);
>>     return ix < n && data[ix].key == k?data[ix].value:NULL;
>> }
>>
>> #ifdef FLEXT_DEBUG
>> void TableAnyMap::_check(int tsize)
>> {
>>     FLEXT_ASSERT(n);
>>
>>     size_t k = data[0].key;
>>     for(int i = 1; i < n; ++i) {
>>         size_t k2 = data[i].key;
>>         FLEXT_ASSERT(k < k2);
>>         k = k2;
>>     }
>>
>>     if(left || right) FLEXT_ASSERT(n == tsize);
>>
>>     if(left) {
>>         FLEXT_ASSERT(flext::MemCheck(left));
>>         left->_check(tsize);
>>     }
>>     if(right) {
>>         FLEXT_ASSERT(flext::MemCheck(right));
>>         right->_check(tsize);
>>     }
>> }
>> #endif
>>
>> void *TableAnyMap::_remove(int tsize,size_t k)
>> {
>>     FLEXT_ASSERT(n);
>>     if(n < tsize) {
>>         // fall through
>>     }
>>     else if(k < data[0].key) {
>>         void *r = left?left->_remove(tsize,k):NULL;
>>         if(r) _eraseempty(left);
>>         return r;
>>     }
>>     else if(k > data[n-1].key) {
>>         void *r = right?right->_remove(tsize,k):NULL;
>>         if(r) _eraseempty(right);
>>         return r;
>>     }
>>
>>     const int ix = _tryix(k);
>>     if(ix >= n || data[ix].key != k)
>>         return NULL;
>>     else {
>>         // found key in this map
>>         void *ret = data[ix].value;
>>
>>         Data dt;
>>         bool fnd,ins = false;
>>         if(n >= tsize) {
>>             // if this table is full get fill-in elements from branches
>>             if(left) {
>>                 // try to get biggest element from left branch
>>                 left->_getbig(dt);
>>                 _eraseempty(left);
>>                 fnd = true,ins = true;
>>             }
>>             else if(right) {
>>                 // try to get smallest element from right branch
>>                 right->_getsmall(dt);
>>                 _eraseempty(right);
>>                 fnd = true;
>>             }
>>             else
>>                 fnd = false;
>>         }
>>         else fnd = false;
>>
>>         if(ins) {
>>             // insert smaller element from left
>>             for(int i = ix; i; --i) data[i] = data[i-1];
>>             data[0] = dt;
>>         }
>>         else {
>>             // shift elements
>>             for(int i = ix+1; i < n; ++i) data[i-1] = data[i];
>>             // insert bigger element from right or reduce table size
>>             if(fnd)
>>                 data[n-1] = dt;
>>             else
>>                 --n;
>>         }
>>
>>         return ret;
>>     }
>> }
>>
>> void TableAnyMap::_getbig(Data &dt)
>> {
>>     FLEXT_ASSERT(n);
>>
>>     if(right) {
>>         right->_getbig(dt);
>>         _eraseempty(right);
>>     }
>>     else {
>>         dt = data[n-1];
>>         if(left) {
>>             for(int i = n-1; i; --i) data[i] = data[i-1];
>>             left->_getbig(data[0]);
>>             _eraseempty(left);
>>         }
>>         else
>>             --n;
>>     }
>> }
>>
>> void TableAnyMap::_getsmall(Data &dt)
>> {
>>     FLEXT_ASSERT(n);
>>
>>     if(left) {
>>         left->_getsmall(dt);
>>         _eraseempty(left);
>>     }
>>     else {
>>         dt = data[0];
>>         for(int i = 1; i < n; ++i) data[i-1] = data[i];
>>         if(right) {
>>             right->_getsmall(data[n-1]);
>>             _eraseempty(right);
>>         }
>>         else
>>             --n;
>>     }
>> }
>>
>> void TableAnyMap::iterator::forward()
>> {
>>     if(map || ix >= map->n) {
>>         if(++ix >= map->n) {
>>             TableAnyMap *nmap;
>>
>>             // we reached the end of the slots
>>             if(map->right) {
>>                 // climb up one
>>                 map = map->right;
>>                 leftmost();
>>                 ix = 0;
>>             }
>>             else {
>>                 // fall back
>>                 for(;;) {
>>                     nmap = map->parent;
>>                     if(!nmap) break; // no parent
>>                     if(nmap->left == map) {
>>                         // ok, we are in front of the slots now
>>                         ix = 0;
>>                         map = nmap;
>>                         break;
>>                     }
>>                     else {
>>                         FLEXT_ASSERT(nmap->right == map);
>>                         ix = (map = nmap)->n;
>>                     }
>>                 }
>>             }
>>         }
>>     }
>> }
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 8
>> Date: Sat, 23 Apr 2005 09:06:27 +0000
>> From: Thomas Grill <xovo at users.sourceforge.net>
>> Subject: [PD-cvs] externals/grill/flext/source flsupport.cpp,1.50,1.51
>> To: pd-cvs at iem.at
>> Message-ID: <E1DPGap-0005Cu-Bn at sc8-pr-cvs1.sourceforge.net>
>>
>> Update of /cvsroot/pure-data/externals/grill/flext/source
>> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20005/source
>>
>> Modified Files:
>>     flsupport.cpp
>> Log Message:
>>
>>
>> Index: flsupport.cpp
>> ===================================================================
>> RCS file:  
>> /cvsroot/pure-data/externals/grill/flext/source/flsupport.cpp,v
>> retrieving revision 1.50
>> retrieving revision 1.51
>> diff -C2 -d -r1.50 -r1.51
>> *** flsupport.cpp    18 Apr 2005 22:05:53 -0000    1.50
>> --- flsupport.cpp    23 Apr 2005 09:06:25 -0000    1.51
>> ***************
>> *** 560,561 ****
>> --- 560,562 ----
>>       }
>>   }
>> +
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 9
>> Date: Sat, 23 Apr 2005 09:14:22 +0000
>> From: Thomas Grill <xovo at users.sourceforge.net>
>> Subject: [PD-cvs] externals/grill/flext/source flsupport.cpp,1.51,1.52
>> To: pd-cvs at iem.at
>> Message-ID: <E1DPGiU-0006Ah-FS at sc8-pr-cvs1.sourceforge.net>
>>
>> Update of /cvsroot/pure-data/externals/grill/flext/source
>> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23666/source
>>
>> Modified Files:
>>     flsupport.cpp
>> Log Message:
>>
>>
>> Index: flsupport.cpp
>> ===================================================================
>> RCS file:  
>> /cvsroot/pure-data/externals/grill/flext/source/flsupport.cpp,v
>> retrieving revision 1.51
>> retrieving revision 1.52
>> diff -C2 -d -r1.51 -r1.52
>> *** flsupport.cpp    23 Apr 2005 09:06:25 -0000    1.51
>> --- flsupport.cpp    23 Apr 2005 09:14:20 -0000    1.52
>> ***************
>> *** 327,562 ****
>>   }
>>
>> -
>> - TableAnyMap::~TableAnyMap() { clear(); }
>> -
>> - void TableAnyMap::clear()
>> - {
>> -     if(left) { _delmap(left); left = NULL; }
>> -     if(right) { _delmap(right); right = NULL; }
>> -     n = 0;
>> - }
>> -
>> -
>> - void *TableAnyMap::_set(int tsize,size_t k,void *t)
>> - {
>> -     FLEXT_ASSERT(n);
>> -
>> -     if(n < tsize) {
>> -         // fall through
>> -     }
>> -     else if(k < data[0].key)
>> -         return _toleft(tsize,k,t);
>> -     else if(k > data[tsize-1].key)
>> -         return _toright(tsize,k,t);
>> -
>> -     int ix = _tryix(k);
>> -     if(ix >= n) {
>> -         FLEXT_ASSERT(ix == n);
>> -         // after last entry
>> -         data[n++](k,t);
>> -         return NULL;
>> -     }
>> -
>> -     size_t dk = data[ix].key;
>> -     if(k == dk) {
>> -         // update data in existing slot (same key)
>> -         void *a = data[ix].value;
>> -         data[ix] = t;
>> -         return a;
>> -     }
>> -     else {
>> -         // insert new slot by shifting the higher ones
>> -         FLEXT_ASSERT(k < dk);
>> -         void *a;
>> -         if(n == tsize)
>> -             a = _toright(tsize,data[tsize-1]);
>> -         else {
>> -             ++n;
>> -             a = NULL;
>> -         }
>> -
>> -         Data *tg = data+ix;
>> -         for(Data *d = data+n-1; d > tg; d--) d[0] = d[-1];
>> -         (*tg)(k,t);
>> -         return a;
>> -     }
>> - }
>> -
>> - void *TableAnyMap::_find(int tsize,size_t k) const
>> - {
>> -     FLEXT_ASSERT(n);
>> -     if(n < tsize) {
>> -         // fall through
>> -     }
>> -     else if(k < data[0].key)
>> -         return left?left->_find(tsize,k):NULL;
>> -     else if(k > data[n-1].key)
>> -         return right?right->_find(tsize,k):NULL;
>> -
>> -     const int ix = _tryix(k);
>> -     return ix < n && data[ix].key == k?data[ix].value:NULL;
>> - }
>> -
>> - #ifdef FLEXT_DEBUG
>> - void TableAnyMap::_check(int tsize)
>> - {
>> -     FLEXT_ASSERT(n);
>> -
>> -     size_t k = data[0].key;
>> -     for(int i = 1; i < n; ++i) {
>> -         size_t k2 = data[i].key;
>> -         FLEXT_ASSERT(k < k2);
>> -         k = k2;
>> -     }
>> -
>> -     if(left || right) FLEXT_ASSERT(n == tsize);
>> -
>> -     if(left) {
>> -         FLEXT_ASSERT(flext::MemCheck(left));
>> -         left->_check(tsize);
>> -     }
>> -     if(right) {
>> -         FLEXT_ASSERT(flext::MemCheck(right));
>> -         right->_check(tsize);
>> -     }
>> - }
>> - #endif
>> -
>> - void *TableAnyMap::_remove(int tsize,size_t k)
>> - {
>> -     FLEXT_ASSERT(n);
>> -     if(n < tsize) {
>> -         // fall through
>> -     }
>> -     else if(k < data[0].key) {
>> -         void *r = left?left->_remove(tsize,k):NULL;
>> -         if(r) _eraseempty(left);
>> -         return r;
>> -     }
>> -     else if(k > data[n-1].key) {
>> -         void *r = right?right->_remove(tsize,k):NULL;
>> -         if(r) _eraseempty(right);
>> -         return r;
>> -     }
>> -
>> -     const int ix = _tryix(k);
>> -     if(ix >= n || data[ix].key != k)
>> -         return NULL;
>> -     else {
>> -         // found key in this map
>> -         void *ret = data[ix].value;
>> -
>> -         Data dt;
>> -         bool fnd,ins = false;
>> -         if(n >= tsize) {
>> -             // if this table is full get fill-in elements from  
>> branches
>> -             if(left) {
>> -                 // try to get biggest element from left branch
>> -                 left->_getbig(dt);
>> -                 _eraseempty(left);
>> -                 fnd = true,ins = true;
>> -             }
>> -             else if(right) {
>> -                 // try to get smallest element from right branch
>> -                 right->_getsmall(dt);
>> -                 _eraseempty(right);
>> -                 fnd = true;
>> -             }
>> -             else
>> -                 fnd = false;
>> -         }
>> -         else fnd = false;
>> -
>> -         if(ins) {
>> -             // insert smaller element from left
>> -             for(int i = ix; i; --i) data[i] = data[i-1];
>> -             data[0] = dt;
>> -         }
>> -         else {
>> -             // shift elements
>> -             for(int i = ix+1; i < n; ++i) data[i-1] = data[i];
>> -             // insert bigger element from right or reduce table size
>> -             if(fnd)
>> -                 data[n-1] = dt;
>> -             else
>> -                 --n;
>> -         }
>> -
>> -         return ret;
>> -     }
>> - }
>> -
>> - void TableAnyMap::_getbig(Data &dt)
>> - {
>> -     FLEXT_ASSERT(n);
>> -
>> -     if(right) {
>> -         right->_getbig(dt);
>> -         _eraseempty(right);
>> -     }
>> -     else {
>> -         dt = data[n-1];
>> -         if(left) {
>> -             for(int i = n-1; i; --i) data[i] = data[i-1];
>> -             left->_getbig(data[0]);
>> -             _eraseempty(left);
>> -         }
>> -         else
>> -             --n;
>> -     }
>> - }
>> -
>> - void TableAnyMap::_getsmall(Data &dt)
>> - {
>> -     FLEXT_ASSERT(n);
>> -
>> -     if(left) {
>> -         left->_getsmall(dt);
>> -         _eraseempty(left);
>> -     }
>> -     else {
>> -         dt = data[0];
>> -         for(int i = 1; i < n; ++i) data[i-1] = data[i];
>> -         if(right) {
>> -             right->_getsmall(data[n-1]);
>> -             _eraseempty(right);
>> -         }
>> -         else
>> -             --n;
>> -     }
>> - }
>> -
>> - void TableAnyMap::iterator::forward()
>> - {
>> -     if(map || ix >= map->n) {
>> -         if(++ix >= map->n) {
>> -             TableAnyMap *nmap;
>> -
>> -             // we reached the end of the slots
>> -             if(map->right) {
>> -                 // climb up one
>> -                 map = map->right;
>> -                 leftmost();
>> -                 ix = 0;
>> -             }
>> -             else {
>> -                 // fall back
>> -                 for(;;) {
>> -                     nmap = map->parent;
>> -                     if(!nmap) break; // no parent
>> -                     if(nmap->left == map) {
>> -                         // ok, we are in front of the slots now
>> -                         ix = 0;
>> -                         map = nmap;
>> -                         break;
>> -                     }
>> -                     else {
>> -                         FLEXT_ASSERT(nmap->right == map);
>> -                         ix = (map = nmap)->n;
>> -                     }
>> -                 }
>> -             }
>> -         }
>> -     }
>> - }
>> -
>> --- 327,328 ----
>>
>>
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> PD-cvs mailing list
>> PD-cvs at iem.at
>> http://lists.puredata.info/listinfo/pd-cvs
>>
>>
>> End of PD-cvs Digest, Vol 2, Issue 5
>> ************************************
>>
>>
>>
>> _______________________________________________
>> PD-dev mailing list
>> PD-dev at iem.at
>> http://lists.puredata.info/listinfo/pd-dev
>>
> 
> ________________________________________________________________________ 
> ____
> 
> "Information wants to be free."
>                              -Stewart Brand
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev




More information about the Pd-dev mailing list