[PD-dev] Re: corrections to the external boids2d.c

jasch jasch at kat.ch
Tue Feb 20 10:07:09 CET 2007


bonjour monsieur quessy,

my theory: it runs under i386 under max with doubles internally, the  
problem is the method binding to PD and it's not a problem with the  
rest of the struct members. having them as doubles shouldn't prevent  
compiling AND the results are different if run as 32bit floats or  
64bit doubles.

i say try to change just the function definitions: for example
void Flock_mode(t_boids *x, double arg);
to:
void Flock_mode(t_boids *x, t_float arg);

i just did so myself and it compiles and runs fine on Mac OS X/PD  
extended 0.39-4

i'm attaching the two source files for you to try.

there will be a new version of the boids in Max shortly adding a few  
features: when that's ready i'll update the PD version and submit it  
to CVS.

cheers

/*j


-------------- next part --------------
A non-text attachment was scrubbed...
Name: boids2d.c
Type: application/applefile
Size: 491 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20070220/ed13c8f8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boids2d.c
Type: application/octet-stream
Size: 28965 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20070220/ed13c8f8/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boids3d.c
Type: application/octet-stream
Size: 28657 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20070220/ed13c8f8/attachment-0001.obj>
-------------- next part --------------


> Thomas Ouellet Fredericks has found a bug in the [boids2d] external
> for pd which makes its compilation under GNU/Linux i386 impossible. To
> fix it, one only needs to replace all the "double" by "float". It
> might be the same thing for the [boids3d] external. Can I submit this
> major bugfix in the CVS or will you do it ?
>
> Thanks !
> Very nice contribution, by the way.

well, it's not my work exclusively. there have been a few people  
involved, namely eric singer and andre sier. the original max-object  
goes way back, it must be at least 10 years old. what andre and i did  
was adapt it to 3D and make it run in floating point space. my main  
interest has been to use this as a spatialisation algorithm for  
multichannel audio: it's very effective.




More information about the Pd-dev mailing list