On 11/7/2018 1:07 PM, Joseph Larralde wrote:
I'd be glad to hear any kind of feedback if you give it a try.

Hi Joseph,

Some feedback:

I tried compiling the .dek sources for windows64bit and found trouble and 
solution:

On "Makefile" line 69 I changed "=" to "+=" :

cflags = -std=c++11

to

cflags += -std=c++11

Now all objects compile fine.

Now when I open "gbend~-help.pd" i get this error on the console:

An operation on the array 'flatten-table' in the patch 'flatten-table'
failed since it uses garray_getfloatarray while running 64-bit!
An operation on the array 'aaa' in the patch 'aaa'
failed since it uses garray_getfloatarray while running 64-bit!


I think this is somehow the same problem that happened to CXC and there is a 
debian patch file (attached) that might give you clues on how to fix it. i.e:

-  float    *x_vec;
+  t_word   *x_vec;

-    else if (!garray_getfloatarray(a, &x->x_nsampsintab, &x->x_vec))
+    else if (!garray_getfloatwords(a, &x->x_nsampsintab, &x->x_vec))



:)

Mensaje telepatico asistido por maquinas.

Description: make array-access 64bit safe
Author: IOhannes m zmölnig
Forwarded: no
Last-Update: 2018-02-01
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- pd-cxc.orig/mean~.c
+++ pd-cxc/mean~.c
@@ -19,7 +19,7 @@
   t_object  x_obj;
   t_symbol *x_arrayname;
   t_float   x_mean;
-  float    *x_vec;
+  t_word   *x_vec;
   t_float   f;
   int       x_nsampsintab;
 } t_cxmean;
@@ -44,7 +44,7 @@
            x->x_arrayname->s_name);
        x->x_vec = 0;
     }
-    else if (!garray_getfloatarray(a, &x->x_nsampsintab, &x->x_vec))
+    else if (!garray_getfloatwords(a, &x->x_nsampsintab, &x->x_vec))
     {
        error("%s: bad template for mean~", x->x_arrayname->s_name);
        x->x_vec = 0;
@@ -62,20 +62,21 @@
   // t_float *bl;
   t_garray *a;
   int cnt;
-  t_float *fp;
+  t_word *fp;
   t_float xz = 0.;
 
   cnt = 0;
   if(!(a = (t_garray *)pd_findbyclass(x->x_arrayname,garray_class))) {
     pd_error(x, "%s: no such table", x->x_arrayname->s_name);
   }
-  garray_getfloatarray(a,&x->x_nsampsintab,&x->x_vec);
+  garray_getfloatwords(a,&x->x_nsampsintab,&x->x_vec);
 
   fp = x->x_vec;
 
   while(cnt < x->x_nsampsintab) {
     //post("cxc/mean.c: %f",*fp++);
-    xz += *fp++;
+    xz += fp->w_float;
+    fp++;
     cnt++;
   }
 #ifdef DEBUG
@@ -118,7 +119,7 @@
   t_object  x_obj;
   t_symbol *x_arrayname;
   t_float   x_avgdev;
-  float    *x_vec;
+  t_word   *x_vec;
   t_float   f;
   int       x_nsampsintab;
 } t_cxavgdev;
@@ -143,7 +144,7 @@
            x->x_arrayname->s_name);
        x->x_vec = 0;
     }
-    else if (!garray_getfloatarray(a, &x->x_nsampsintab, &x->x_vec))
+    else if (!garray_getfloatwords(a, &x->x_nsampsintab, &x->x_vec))
     {
        error("%s: bad template for mean~", x->x_arrayname->s_name);
        x->x_vec = 0;
@@ -161,7 +162,7 @@
   // t_float *bl;
   t_garray *a;
   int cnt;
-  t_float *fp;
+  t_word *fp;
   t_float xz = 0.;
   t_float tz = 0.;
 
@@ -169,12 +170,13 @@
   if(!(a = (t_garray *)pd_findbyclass(x->x_arrayname,garray_class))) {
     pd_error(x, "%s: no such table", x->x_arrayname->s_name);
   }
-  garray_getfloatarray(a,&x->x_nsampsintab,&x->x_vec);
+  garray_getfloatwords(a,&x->x_nsampsintab,&x->x_vec);
 
   fp = x->x_vec;
 
   while(cnt < x->x_nsampsintab) {
-    tz = *fp++;
+    tz = fp->w_float;
+    fp++;
     tz = fabs(tz - f);
     xz += tz;
 #ifdef DEBUG
@@ -222,7 +224,7 @@
   t_object  x_obj;
   t_symbol *x_arrayname;
   t_float   x_stddev;
-  float    *x_vec;
+  t_word   *x_vec;
   t_float   f;
   int       x_nsampsintab;
 } t_cxstddev;
@@ -247,7 +249,7 @@
            x->x_arrayname->s_name);
        x->x_vec = 0;
     }
-    else if (!garray_getfloatarray(a, &x->x_nsampsintab, &x->x_vec))
+    else if (!garray_getfloatwords(a, &x->x_nsampsintab, &x->x_vec))
     {
        error("%s: bad template for mean~", x->x_arrayname->s_name);
        x->x_vec = 0;
@@ -265,7 +267,7 @@
   // t_float *bl;
   t_garray *a;
   int cnt;
-  t_float *fp;
+  t_word *fp;
   t_float xz = 0.;
   t_float tz = 0.;
 
@@ -273,12 +275,13 @@
   if(!(a = (t_garray *)pd_findbyclass(x->x_arrayname,garray_class))) {
     pd_error(x, "%s: no such table", x->x_arrayname->s_name);
   }
-  garray_getfloatarray(a,&x->x_nsampsintab,&x->x_vec);
+  garray_getfloatwords(a,&x->x_nsampsintab,&x->x_vec);
 
   fp = x->x_vec;
 
   while(cnt < x->x_nsampsintab) {
-    tz = *fp++;
+    tz = fp->w_float;
+    fp++;
     tz = pow(tz - f,2); // power of 2
     xz += tz;
 #ifdef DEBUG
@@ -323,7 +326,7 @@
   t_object  x_obj;
   t_symbol *x_arrayname;
   t_float   x_mean;
-  float    *x_vec;
+  t_word   *x_vec;
   t_float   f;
   int       x_nsampsintab;
 } t_mean_tilde;
@@ -341,14 +344,15 @@
 {
   t_mean_tilde *x = (t_mean_tilde *)(w[1]);
   //t_float *out = (t_float *)(w[3]), 
-  t_float *fp;
+  t_word *fp;
   //// t_float *in  = (t_float *)(w[2]);
   //// *out = *in;
   int n = (int)(w[2]);
   t_float xz = 0.;
   fp = x->x_vec;
   while(n--) {
-    xz += abs(*fp++);
+    xz += abs(fp->w_float);
+    fp++;
     //post("cxc/mean.c: %d : %f : %f",n,xz,fp);
   }
   x->x_mean = (t_float)(xz / n);
@@ -368,7 +372,7 @@
            x->x_arrayname->s_name);
        x->x_vec = 0;
     }
-    else if (!garray_getfloatarray(a, &x->x_nsampsintab, &x->x_vec))
+    else if (!garray_getfloatwords(a, &x->x_nsampsintab, &x->x_vec))
     {
        error("%s: bad template for mean~", x->x_arrayname->s_name);
        x->x_vec = 0;
@@ -394,20 +398,21 @@
   // t_float *bl;
   t_garray *a;
   int cnt;
-  t_float *fp;
+  t_word *fp;
   t_float xz = 0.;
 
   cnt = 0;
   if(!(a = (t_garray *)pd_findbyclass(x->x_arrayname,garray_class))) {
     pd_error(x, "%s: no such table", x->x_arrayname->s_name);
   }
-  garray_getfloatarray(a,&x->x_nsampsintab,&x->x_vec);
+  garray_getfloatwords(a,&x->x_nsampsintab,&x->x_vec);
 
   fp = x->x_vec;
 
   while(cnt < x->x_nsampsintab) {
     //post("cxc/mean.c: %f",*fp++);
-    xz += *fp++;
+    xz += fp->w_float;
+    fp++;
     cnt++;
   }
 #ifdef DEBUG
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to