aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormusil <tmusil@users.sourceforge.net>2009-02-01 05:25:21 +0000
committermusil <tmusil@users.sourceforge.net>2009-02-01 05:25:21 +0000
commitbb04075ca94cfbb8391e3bbb0e693d2ebd079e95 (patch)
tree32f4367b8587b533724b2b04c2060d815415efa1
parent0c2bbab79dd04ed75310ae10358b613c20179fc5 (diff)
changed for 64 bit array access
svn path=/trunk/externals/iem/iem_tab/; revision=10706
-rw-r--r--src/iem_tab.c10
-rw-r--r--src/iem_tab.h4
-rw-r--r--src/iemlib.h16
-rw-r--r--src/makefile_d_fat1
-rw-r--r--src/makefile_d_ppc1
-rw-r--r--src/makefile_darwin1
-rw-r--r--src/makefile_linux1
-rw-r--r--src/makefile_win1
-rw-r--r--src/tab_abs.c16
-rw-r--r--src/tab_add.c18
-rw-r--r--src/tab_add_scalar.c15
-rw-r--r--src/tab_carth2polar.c35
-rw-r--r--src/tab_complex_inv.c37
-rw-r--r--src/tab_complex_mul.c49
-rw-r--r--src/tab_const.c21
-rw-r--r--src/tab_conv.c34
-rw-r--r--src/tab_copy.c15
-rw-r--r--src/tab_counter.c33
-rw-r--r--src/tab_cross_corr.c52
-rw-r--r--src/tab_div.c26
-rw-r--r--src/tab_eq.c29
-rw-r--r--src/tab_eq_scalar.c27
-rw-r--r--src/tab_fft.c81
-rw-r--r--src/tab_find_exact_peaks.c29
-rw-r--r--src/tab_find_peaks.c29
-rw-r--r--src/tab_ge.c27
-rw-r--r--src/tab_ge_scalar.c27
-rw-r--r--src/tab_gt.c29
-rw-r--r--src/tab_gt_scalar.c27
-rw-r--r--src/tab_ifft.c89
-rw-r--r--src/tab_le.c29
-rw-r--r--src/tab_le_scalar.c27
-rw-r--r--src/tab_lt.c29
-rw-r--r--src/tab_lt_scalar.c27
-rw-r--r--src/tab_max_index.c16
-rw-r--r--src/tab_min_index.c16
-rw-r--r--src/tab_min_max.c24
-rw-r--r--src/tab_mls.c15
-rw-r--r--src/tab_mul.c18
-rw-r--r--src/tab_mul_scalar.c12
-rw-r--r--src/tab_ne.c29
-rw-r--r--src/tab_ne_scalar.c27
-rw-r--r--src/tab_reverse.c34
-rw-r--r--src/tab_rfft.c93
-rw-r--r--src/tab_rifft.c106
-rw-r--r--src/tab_sqrt.c61
-rw-r--r--src/tab_sub.c18
-rw-r--r--src/tab_sum.c19
-rw-r--r--tab_abs-help.pd12
-rw-r--r--tab_add-help.pd20
-rw-r--r--tab_add_scalar-help.pd12
-rw-r--r--tab_carth2polar-help.pd160
-rw-r--r--tab_complex_inv-help.pd144
-rw-r--r--tab_complex_mul-help.pd46
-rw-r--r--tab_const-help.pd14
-rw-r--r--tab_conv-help.pd206
-rw-r--r--tab_copy-help.pd24
-rw-r--r--tab_counter-help.pd38
-rw-r--r--tab_cross_corr-help.pd123
-rw-r--r--tab_div-help.pd46
-rw-r--r--tab_eq-help.pd46
-rw-r--r--tab_eq_scalar-help.pd42
-rw-r--r--tab_fft-help.pd424
-rw-r--r--tab_find_exact_peaks-help.pd178
-rw-r--r--tab_find_peaks-help.pd28
-rw-r--r--tab_ifft-help.pd426
-rw-r--r--tab_rfft-help.pd227
-rw-r--r--tab_rifft-help.pd374
-rw-r--r--tab_sum-help.pd11
69 files changed, 2227 insertions, 1754 deletions
diff --git a/src/iem_tab.c b/src/iem_tab.c
index 08b0ca9..9ea084b 100644
--- a/src/iem_tab.c
+++ b/src/iem_tab.c
@@ -1,12 +1,12 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
-int iem_tab_check_arrays(t_symbol *obj_name, t_symbol *array_name, t_float **beg_mem, int *array_size, int max_index)
+int iem_tab_check_arrays(t_symbol *obj_name, t_symbol *array_name, iemarray_t **beg_mem, int *array_size, int max_index)
{
int ok=1;
t_garray *a;
@@ -16,7 +16,7 @@ int iem_tab_check_arrays(t_symbol *obj_name, t_symbol *array_name, t_float **beg
error("%s: no such array", array_name->s_name);
ok = 0;
}
- else if(!garray_getfloatarray(a, array_size, beg_mem))
+ else if(!iemarray_getarray(a, array_size, beg_mem))
{
error("%s: bad template for %s", array_name->s_name, obj_name->s_name);
ok = 0;
@@ -64,6 +64,7 @@ void tab_find_exact_peaks_setup(void);
void tab_find_peaks_setup(void);
void tab_ge_setup(void);
void tab_ge_scalar_setup(void);
+void tab_get_size_setup(void);
void tab_gt_setup(void);
void tab_gt_scalar_setup(void);
void tab_ifft_setup(void);
@@ -114,6 +115,7 @@ void iem_tab_setup(void)
tab_ge_scalar_setup();
tab_gt_setup();
tab_gt_scalar_setup();
+ tab_get_size_setup();
tab_ifft_setup();
tab_le_setup();
tab_le_scalar_setup();
@@ -134,7 +136,7 @@ void iem_tab_setup(void)
tab_sub_setup();
tab_sum_setup();
- post("iem_tab (R-1.17) library loaded! (c) Thomas Musil 11.2006");
+ post("iem_tab (R-1.18) library loaded! (c) Thomas Musil 01.2009");
post(" musil%ciem.at iem KUG Graz Austria", '@');
}
diff --git a/src/iem_tab.h b/src/iem_tab.h
index 76027ef..2b38f05 100644
--- a/src/iem_tab.h
+++ b/src/iem_tab.h
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#ifndef __IEMTAB_H__
#define __IEMTAB_H__
@@ -13,6 +13,6 @@ typedef struct
}
TAB_COMPLEX;
-int iem_tab_check_arrays(t_symbol *obj_name, t_symbol *array_name, t_float **beg_mem, int *array_size, int max_index);
+int iem_tab_check_arrays(t_symbol *obj_name, t_symbol *array_name, iemarray_t **beg_mem, int *array_size, int max_index);
#endif
diff --git a/src/iemlib.h b/src/iemlib.h
index 973bfeb..97b088b 100644
--- a/src/iemlib.h
+++ b/src/iemlib.h
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2007 */
+iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#ifndef __IEMLIB_H__
#define __IEMLIB_H__
@@ -99,4 +99,18 @@ union tabfudge_f
#endif
+/* on 64bit systems we cannot use garray_getfloatarray... */
+#if (defined __x86_64__)
+# define iemarray_t t_word
+# define iemarray_getarray garray_getfloatwords
+# define iemarray_getfloat(pointer, index) (pointer[index].w_float)
+# define iemarray_setfloat(pointer, index, fvalue) (pointer[index].w_float = fvalue)
+#else
+# define iemarray_t t_float
+# define iemarray_getarray garray_getfloatarray
+# define iemarray_getfloat(pointer, index) (pointer[index])
+# define iemarray_setfloat(pointer, index, fvalue) (pointer[index] = fvalue)
+#endif
+
+
#endif
diff --git a/src/makefile_d_fat b/src/makefile_d_fat
index 31266aa..9b51221 100644
--- a/src/makefile_d_fat
+++ b/src/makefile_d_fat
@@ -34,6 +34,7 @@ SRC = tab_abs.c \
tab_ge_scalar.c \
tab_gt.c \
tab_gt_scalar.c \
+ tab_get_size.c \
tab_ifft.c \
tab_le.c \
tab_le_scalar.c \
diff --git a/src/makefile_d_ppc b/src/makefile_d_ppc
index 51a228b..22ef78b 100644
--- a/src/makefile_d_ppc
+++ b/src/makefile_d_ppc
@@ -34,6 +34,7 @@ SRC = tab_abs.c \
tab_ge_scalar.c \
tab_gt.c \
tab_gt_scalar.c \
+ tab_get_size.c \
tab_ifft.c \
tab_le.c \
tab_le_scalar.c \
diff --git a/src/makefile_darwin b/src/makefile_darwin
index daf1039..8ab9beb 100644
--- a/src/makefile_darwin
+++ b/src/makefile_darwin
@@ -39,6 +39,7 @@ SRC = tab_abs.c \
tab_ge_scalar.c \
tab_gt.c \
tab_gt_scalar.c \
+ tab_get_size.c \
tab_ifft.c \
tab_le.c \
tab_le_scalar.c \
diff --git a/src/makefile_linux b/src/makefile_linux
index 0291159..373e9b7 100644
--- a/src/makefile_linux
+++ b/src/makefile_linux
@@ -38,6 +38,7 @@ SRC = tab_abs.c \
tab_ge_scalar.c \
tab_gt.c \
tab_gt_scalar.c \
+ tab_get_size.c \
tab_ifft.c \
tab_le.c \
tab_le_scalar.c \
diff --git a/src/makefile_win b/src/makefile_win
index 0585aa8..8af5af9 100644
--- a/src/makefile_win
+++ b/src/makefile_win
@@ -41,6 +41,7 @@ SRC = tab_abs.c \
tab_ge_scalar.c \
tab_gt.c \
tab_gt_scalar.c \
+ tab_get_size.c \
tab_ifft.c \
tab_le.c \
tab_le_scalar.c \
diff --git a/src/tab_abs.c b/src/tab_abs.c
index 42fc453..8e4043c 100644
--- a/src/tab_abs.c
+++ b/src/tab_abs.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
@@ -11,6 +11,7 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
/* -------------------------- tab_abs ------------------------------ */
+/* x_beg_mem_dst[i] = abs(x_beg_mem_src1[i]) */
typedef struct _tab_abs
{
@@ -19,8 +20,8 @@ typedef struct _tab_abs
int x_size_dst;
int x_offset_src1;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_dst;
} t_tab_abs;
@@ -41,7 +42,7 @@ static void tab_abs_bang(t_tab_abs *x)
{
int i, n;
int ok_src, ok_dst;
- t_float *vec_src, *vec_dst;
+ iemarray_t *vec_src, *vec_dst;
ok_src = iem_tab_check_arrays(gensym("tab_abs"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_abs"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -59,7 +60,8 @@ static void tab_abs_bang(t_tab_abs *x)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = fabs(vec_src[i]);
+ iemarray_setfloat(vec_dst, i, fabs(iemarray_getfloat(vec_src, i)));
+
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -72,7 +74,7 @@ static void tab_abs_list(t_tab_abs *x, t_symbol *s, int argc, t_atom *argv)
int beg_src, beg_dst;
int i, n;
int ok_src, ok_dst;
- t_float *vec_src, *vec_dst;
+ iemarray_t *vec_src, *vec_dst;
if((argc >= 3) &&
IS_A_FLOAT(argv,0) &&
@@ -101,7 +103,7 @@ static void tab_abs_list(t_tab_abs *x, t_symbol *s, int argc, t_atom *argv)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = fabs(vec_src[i]);
+ iemarray_setfloat(vec_dst, i, fabs(iemarray_getfloat(vec_src, i)));
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
diff --git a/src/tab_add.c b/src/tab_add.c
index c2e2945..4f3fa88 100644
--- a/src/tab_add.c
+++ b/src/tab_add.c
@@ -1,13 +1,14 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_add ------------------------------ */
+/* x_beg_mem_dst[i] = x_beg_mem_src1[i] + x_beg_mem_src2[i] */
typedef struct _tab_add
{
@@ -18,9 +19,9 @@ typedef struct _tab_add
int x_offset_src1;
int x_offset_src2;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_src2;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src2;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_scr2;
t_symbol *x_sym_dst;
@@ -47,7 +48,7 @@ static void tab_add_bang(t_tab_add *x)
{
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_add"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_src2 = iem_tab_check_arrays(gensym("tab_add"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0);
@@ -70,7 +71,7 @@ static void tab_add_bang(t_tab_add *x)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = vec_src1[i] + vec_src2[i];
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src1, i) + iemarray_getfloat(vec_src2, i));
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -83,7 +84,7 @@ static void tab_add_list(t_tab_add *x, t_symbol *s, int argc, t_atom *argv)
int beg_src1, beg_src2, beg_dst;
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -118,7 +119,7 @@ static void tab_add_list(t_tab_add *x, t_symbol *s, int argc, t_atom *argv)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = vec_src1[i] + vec_src2[i];
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src1, i) + iemarray_getfloat(vec_src2, i));
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -140,7 +141,6 @@ static void *tab_add_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_add *x = (t_tab_add *)pd_new(tab_add_class);
t_symbol *src1, *src2, *dst;
- t_float time;
if((argc >= 3) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_add_scalar.c b/src/tab_add_scalar.c
index 508d370..3f9fbba 100644
--- a/src/tab_add_scalar.c
+++ b/src/tab_add_scalar.c
@@ -1,13 +1,14 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_add_scalar ------------------------------ */
+/* x_beg_mem_dst[i] = x_beg_mem_src1[i] + add */
typedef struct _tab_add_scalar
{
@@ -16,8 +17,8 @@ typedef struct _tab_add_scalar
int x_size_dst;
int x_offset_src1;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_dst;
} t_tab_add_scalar;
@@ -33,7 +34,7 @@ static void tab_add_scalar_float(t_tab_add_scalar *x, t_floatarg add)
{
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst;
+ iemarray_t *vec_src1, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_add_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_add_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -52,7 +53,7 @@ static void tab_add_scalar_float(t_tab_add_scalar *x, t_floatarg add)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = vec_src1[i] + add;
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src1, i) + add);
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -70,7 +71,7 @@ static void tab_add_scalar_list(t_tab_add_scalar *x, t_symbol *s, int argc, t_at
int beg_src1, beg_dst;
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst, add;
+ iemarray_t *vec_src1, *vec_dst, add;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -101,7 +102,7 @@ static void tab_add_scalar_list(t_tab_add_scalar *x, t_symbol *s, int argc, t_at
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = vec_src1[i] + add;
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src1, i) + add);
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
diff --git a/src/tab_carth2polar.c b/src/tab_carth2polar.c
index 7f76088..e70d2b8 100644
--- a/src/tab_carth2polar.c
+++ b/src/tab_carth2polar.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -9,6 +9,8 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
#include <math.h>
/* -------------------------- tab_carth2polar ------------------------------ */
+/* x_beg_mem_dst_mag[i] = sqrt(x_beg_mem_src_re[i]*x_beg_mem_src_re[i] + x_beg_mem_src_im[i]*x_beg_mem_src_im[i]) */
+/* x_beg_mem_dst_arg[i] = atan2(x_beg_mem_src_im[i], x_beg_mem_src_re[i]) */
typedef struct _tab_carth2polar
{
@@ -21,10 +23,10 @@ typedef struct _tab_carth2polar
int x_offset_dst_mag;
int x_offset_src_im;
int x_offset_dst_arg;
- t_float *x_beg_mem_src_re;
- t_float *x_beg_mem_dst_mag;
- t_float *x_beg_mem_src_im;
- t_float *x_beg_mem_dst_arg;
+ iemarray_t *x_beg_mem_src_re;
+ iemarray_t *x_beg_mem_dst_mag;
+ iemarray_t *x_beg_mem_src_im;
+ iemarray_t *x_beg_mem_dst_arg;
t_symbol *x_sym_src_re;
t_symbol *x_sym_dst_mag;
t_symbol *x_sym_src_im;
@@ -58,8 +60,8 @@ static void tab_carth2polar_bang(t_tab_carth2polar *x)
int i, n;
int ok_src_re, ok_dst_mag;
int ok_src_im, ok_dst_arg;
- t_float *vec_src_re, *vec_dst_mag;
- t_float *vec_src_im, *vec_dst_arg;
+ iemarray_t *vec_src_re, *vec_dst_mag;
+ iemarray_t *vec_src_im, *vec_dst_arg;
ok_src_re = iem_tab_check_arrays(gensym("tab_carth2polar"), x->x_sym_src_re, &x->x_beg_mem_src_re, &x->x_size_src_re, 0);
ok_dst_mag = iem_tab_check_arrays(gensym("tab_carth2polar"), x->x_sym_dst_mag, &x->x_beg_mem_dst_mag, &x->x_size_dst_mag, 0);
@@ -90,12 +92,14 @@ static void tab_carth2polar_bang(t_tab_carth2polar *x)
{
t_float re, im, mag, arg;
- re = vec_src_re[i];
- im = vec_src_im[i];
+ re = iemarray_getfloat(vec_src_re, i);
+ im = iemarray_getfloat(vec_src_im, i);
mag = sqrt(re*re + im*im);
arg = atan2(im, re) * rcp_two_pi;
vec_dst_mag[i] = mag;
vec_dst_arg[i] = arg;
+ iemarray_setfloat(vec_dst_mag, i, mag);
+ iemarray_setfloat(vec_dst_arg, i, arg);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst_mag, garray_class);
@@ -113,8 +117,8 @@ static void tab_carth2polar_list(t_tab_carth2polar *x, t_symbol *s, int argc, t_
int beg_src_im, beg_dst_arg;
int ok_src_re, ok_dst_mag;
int ok_src_im, ok_dst_arg;
- t_float *vec_src_re, *vec_dst_mag;
- t_float *vec_src_im, *vec_dst_arg;
+ iemarray_t *vec_src_re, *vec_dst_mag;
+ iemarray_t *vec_src_im, *vec_dst_arg;
if((argc >= 5) &&
IS_A_FLOAT(argv,0) &&
@@ -160,12 +164,12 @@ static void tab_carth2polar_list(t_tab_carth2polar *x, t_symbol *s, int argc, t_
{
t_float re, im, mag, arg;
- re = vec_src_re[i];
- im = vec_src_im[i];
+ re = iemarray_getfloat(vec_src_re, i);
+ im = iemarray_getfloat(vec_src_im, i);
mag = sqrt(re*re + im*im);
arg = atan2(im, re) * rcp_two_pi;
- vec_dst_mag[i] = mag;
- vec_dst_arg[i] = arg;
+ iemarray_setfloat(vec_dst_mag, i, mag);
+ iemarray_setfloat(vec_dst_arg, i, arg);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst_mag, garray_class);
@@ -190,7 +194,6 @@ static void *tab_carth2polar_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_carth2polar *x = (t_tab_carth2polar *)pd_new(tab_carth2polar_class);
t_symbol *src_re, *dst_mag, *src_im, *dst_arg;
- t_float time;
if((argc >= 4) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_complex_inv.c b/src/tab_complex_inv.c
index 4abd447..3b14af6 100644
--- a/src/tab_complex_inv.c
+++ b/src/tab_complex_inv.c
@@ -1,13 +1,15 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_complex_inv ------------------------------ */
+/* x_beg_mem_dst_re[i] = x_beg_mem_src1_re[i] / (x_beg_mem_src1_re[i]*x_beg_mem_src1_re[i] + x_beg_mem_src1_im[i]*x_beg_mem_src1_im[i]) */
+/* x_beg_mem_dst_im[i] = -x_beg_mem_src1_im[i] / (x_beg_mem_src1_re[i]*x_beg_mem_src1_re[i] + x_beg_mem_src1_im[i]*x_beg_mem_src1_im[i]) */
typedef struct _tab_complex_inv
{
@@ -20,10 +22,10 @@ typedef struct _tab_complex_inv
int x_offset_dst_re;
int x_offset_src1_im;
int x_offset_dst_im;
- t_float *x_beg_mem_src1_re;
- t_float *x_beg_mem_dst_re;
- t_float *x_beg_mem_src1_im;
- t_float *x_beg_mem_dst_im;
+ iemarray_t *x_beg_mem_src1_re;
+ iemarray_t *x_beg_mem_dst_re;
+ iemarray_t *x_beg_mem_src1_im;
+ iemarray_t *x_beg_mem_dst_im;
t_symbol *x_sym_scr1_re;
t_symbol *x_sym_dst_re;
t_symbol *x_sym_scr1_im;
@@ -57,8 +59,8 @@ static void tab_complex_inv_bang(t_tab_complex_inv *x)
int i, n;
int ok_src1_re, ok_dst_re;
int ok_src1_im, ok_dst_im;
- t_float *vec_src1_re, *vec_dst_re;
- t_float *vec_src1_im, *vec_dst_im;
+ iemarray_t *vec_src1_re, *vec_dst_re;
+ iemarray_t *vec_src1_im, *vec_dst_im;
ok_src1_re = iem_tab_check_arrays(gensym("tab_complex_inv"), x->x_sym_scr1_re, &x->x_beg_mem_src1_re, &x->x_size_src1_re, 0);
ok_dst_re = iem_tab_check_arrays(gensym("tab_complex_inv"), x->x_sym_dst_re, &x->x_beg_mem_dst_re, &x->x_size_dst_re, 0);
@@ -88,11 +90,11 @@ static void tab_complex_inv_bang(t_tab_complex_inv *x)
{
t_float re, im, abs;
- re = vec_src1_re[i];
- im = vec_src1_im[i];
+ re = iemarray_getfloat(vec_src1_re, i);
+ im = iemarray_getfloat(vec_src1_im, i);
abs = 1.0f / (re*re + im*im);
- vec_dst_re[i] = re*abs;
- vec_dst_im[i] = -im*abs;
+ iemarray_setfloat(vec_dst_re, i, re*abs);
+ iemarray_setfloat(vec_dst_im, i, -im*abs);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class);
@@ -110,8 +112,8 @@ static void tab_complex_inv_list(t_tab_complex_inv *x, t_symbol *s, int argc, t_
int beg_src1_im, beg_dst_im;
int ok_src1_re, ok_dst_re;
int ok_src1_im, ok_dst_im;
- t_float *vec_src1_re, *vec_dst_re;
- t_float *vec_src1_im, *vec_dst_im;
+ iemarray_t *vec_src1_re, *vec_dst_re;
+ iemarray_t *vec_src1_im, *vec_dst_im;
if((argc >= 5) &&
IS_A_FLOAT(argv,0) &&
@@ -156,11 +158,11 @@ static void tab_complex_inv_list(t_tab_complex_inv *x, t_symbol *s, int argc, t_
{
t_float re, im, abs;
- re = vec_src1_re[i];
- im = vec_src1_im[i];
+ re = iemarray_getfloat(vec_src1_re, i);
+ im = iemarray_getfloat(vec_src1_im, i);
abs = 1.0f / (re*re + im*im);
- vec_dst_re[i] = re*abs;
- vec_dst_im[i] = -im*abs;
+ iemarray_setfloat(vec_dst_re, i, re*abs);
+ iemarray_setfloat(vec_dst_im, i, -im*abs);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class);
@@ -185,7 +187,6 @@ static void *tab_complex_inv_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_complex_inv *x = (t_tab_complex_inv *)pd_new(tab_complex_inv_class);
t_symbol *src1_re, *src2_re, *dst_re, *src1_im, *src2_im, *dst_im;
- t_float time;
if((argc >= 4) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_complex_mul.c b/src/tab_complex_mul.c
index 7bf7b0e..da6e256 100644
--- a/src/tab_complex_mul.c
+++ b/src/tab_complex_mul.c
@@ -1,13 +1,15 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_complex_mul ------------------------------ */
+/* x_beg_mem_dst_re[i] = x_beg_mem_src1_re[i]*x_beg_mem_src2_re[i] - x_beg_mem_src1_im[i]*x_beg_mem_src2_im[i] */
+/* x_beg_mem_dst_im[i] = x_beg_mem_src1_re[i]*x_beg_mem_src2_im[i] + x_beg_mem_src1_im[i]*x_beg_mem_src2_re[i] */
typedef struct _tab_complex_mul
{
@@ -24,12 +26,12 @@ typedef struct _tab_complex_mul
int x_offset_src1_im;
int x_offset_src2_im;
int x_offset_dst_im;
- t_float *x_beg_mem_src1_re;
- t_float *x_beg_mem_src2_re;
- t_float *x_beg_mem_dst_re;
- t_float *x_beg_mem_src1_im;
- t_float *x_beg_mem_src2_im;
- t_float *x_beg_mem_dst_im;
+ iemarray_t *x_beg_mem_src1_re;
+ iemarray_t *x_beg_mem_src2_re;
+ iemarray_t *x_beg_mem_dst_re;
+ iemarray_t *x_beg_mem_src1_im;
+ iemarray_t *x_beg_mem_src2_im;
+ iemarray_t *x_beg_mem_dst_im;
t_symbol *x_sym_scr1_re;
t_symbol *x_sym_scr2_re;
t_symbol *x_sym_dst_re;
@@ -75,8 +77,8 @@ static void tab_complex_mul_bang(t_tab_complex_mul *x)
int i, n;
int ok_src1_re, ok_src2_re, ok_dst_re;
int ok_src1_im, ok_src2_im, ok_dst_im;
- t_float *vec_src1_re, *vec_src2_re, *vec_dst_re;
- t_float *vec_src1_im, *vec_src2_im, *vec_dst_im;
+ iemarray_t *vec_src1_re, *vec_src2_re, *vec_dst_re;
+ iemarray_t *vec_src1_im, *vec_src2_im, *vec_dst_im;
ok_src1_re = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_scr1_re, &x->x_beg_mem_src1_re, &x->x_size_src1_re, 0);
ok_src2_re = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_scr2_re, &x->x_beg_mem_src2_re, &x->x_size_src2_re, 0);
@@ -114,12 +116,12 @@ static void tab_complex_mul_bang(t_tab_complex_mul *x)
{
t_float re1, re2, im1, im2;
- re1 = vec_src1_re[i];
- re2 = vec_src2_re[i];
- im1 = vec_src1_im[i];
- im2 = vec_src2_im[i];
- vec_dst_re[i] = re1*re2 - im1*im2;
- vec_dst_im[i] = re1*im2 + im1*re2;
+ re1 = iemarray_getfloat(vec_src1_re, i);
+ re2 = iemarray_getfloat(vec_src2_re, i);
+ im1 = iemarray_getfloat(vec_src1_im, i);
+ im2 = iemarray_getfloat(vec_src2_im, i);
+ iemarray_setfloat(vec_dst_re, i, re1*re2 - im1*im2);
+ iemarray_setfloat(vec_dst_im, i, re1*im2 + im1*re2);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class);
@@ -137,8 +139,8 @@ static void tab_complex_mul_list(t_tab_complex_mul *x, t_symbol *s, int argc, t_
int beg_src1_im, beg_src2_im, beg_dst_im;
int ok_src1_re, ok_src2_re, ok_dst_re;
int ok_src1_im, ok_src2_im, ok_dst_im;
- t_float *vec_src1_re, *vec_src2_re, *vec_dst_re;
- t_float *vec_src1_im, *vec_src2_im, *vec_dst_im;
+ iemarray_t *vec_src1_re, *vec_src2_re, *vec_dst_re;
+ iemarray_t *vec_src1_im, *vec_src2_im, *vec_dst_im;
if((argc >= 7) &&
IS_A_FLOAT(argv,0) &&
@@ -195,12 +197,12 @@ static void tab_complex_mul_list(t_tab_complex_mul *x, t_symbol *s, int argc, t_
{
t_float re1, re2, im1, im2;
- re1 = vec_src1_re[i];
- re2 = vec_src2_re[i];
- im1 = vec_src1_im[i];
- im2 = vec_src2_im[i];
- vec_dst_re[i] = re1*re2 - im1*im2;
- vec_dst_im[i] = re1*im2 + im1*re2;
+ re1 = iemarray_getfloat(vec_src1_re, i);
+ re2 = iemarray_getfloat(vec_src2_re, i);
+ im1 = iemarray_getfloat(vec_src1_im, i);
+ im2 = iemarray_getfloat(vec_src2_im, i);
+ iemarray_setfloat(vec_dst_re, i, re1*re2 - im1*im2);
+ iemarray_setfloat(vec_dst_im, i, re1*im2 + im1*re2);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class);
@@ -225,7 +227,6 @@ static void *tab_complex_mul_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_complex_mul *x = (t_tab_complex_mul *)pd_new(tab_complex_mul_class);
t_symbol *src1_re, *src2_re, *dst_re, *src1_im, *src2_im, *dst_im;
- t_float time;
if((argc >= 6) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_const.c b/src/tab_const.c
index 2ab8fe3..461f950 100644
--- a/src/tab_const.c
+++ b/src/tab_const.c
@@ -1,21 +1,22 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_const ------------------------------ */
+/* x_beg_mem_dst[i] = c */
typedef struct _tab_const
{
t_object x_obj;
int x_size_dst;
int x_offset_dst;
- t_float x_const;
- t_float *x_beg_mem_dst;
+ t_float x_const;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_dst;
} t_tab_const;
@@ -30,7 +31,7 @@ static void tab_const_bang(t_tab_const *x)
{
int i, n;
int ok_dst;
- t_float *vec_dst;
+ iemarray_t *vec_dst;
ok_dst = iem_tab_check_arrays(gensym("tab_const"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -43,7 +44,7 @@ static void tab_const_bang(t_tab_const *x)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -55,7 +56,7 @@ static void tab_const_float(t_tab_const *x, t_floatarg c)
{
int i, n;
int ok_dst;
- t_float *vec_dst;
+ iemarray_t *vec_dst;
ok_dst = iem_tab_check_arrays(gensym("tab_const"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -68,7 +69,7 @@ static void tab_const_float(t_tab_const *x, t_floatarg c)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = c;
+ iemarray_setfloat(vec_dst, i, c);
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -81,7 +82,8 @@ static void tab_const_list(t_tab_const *x, t_symbol *s, int argc, t_atom *argv)
int beg_dst;
int i, n;
int ok_dst;
- t_float *vec_dst, c;
+ iemarray_t *vec_dst;
+ t_float c;
if((argc >= 3) &&
IS_A_FLOAT(argv,0) &&
@@ -106,7 +108,7 @@ static void tab_const_list(t_tab_const *x, t_symbol *s, int argc, t_atom *argv)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = c;
+ iemarray_setfloat(vec_dst, i, c);
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -128,7 +130,6 @@ static void *tab_const_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_const *x = (t_tab_const *)pd_new(tab_const_class);
t_symbol *dst;
- t_float time;
if((argc >= 1) &&
IS_A_SYMBOL(argv,0))
diff --git a/src/tab_conv.c b/src/tab_conv.c
index 14865fe..d115f72 100644
--- a/src/tab_conv.c
+++ b/src/tab_conv.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
@@ -9,7 +9,14 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
#include "iem_tab.h"
-/* -------------------------- tab_conv ------------------------------ */
+/* ---------------------------- tab_conv ------------------------------- */
+/* for(i=0; i<x_size_src1; i++) */
+/* { */
+/* sum = 0.0f; */
+/* for(j=0; j<x_size_src2; j++) */
+/* sum += x_beg_mem_src1[i+j-x_size_src2/2] * x_beg_mem_src2[j]; */
+/* x_beg_mem_dst[i] = sum; */
+/* } */
typedef struct _tab_conv
{
@@ -20,9 +27,9 @@ typedef struct _tab_conv
int x_offset_src1;
int x_offset_src2;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_src2;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src2;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_scr2;
t_symbol *x_sym_dst;
@@ -30,6 +37,10 @@ typedef struct _tab_conv
static t_class *tab_conv_class;
+static void tab_conv_tick(t_tab_conv *x)
+{
+}
+
static void tab_conv_src1(t_tab_conv *x, t_symbol *s)
{
x->x_sym_scr1 = s;
@@ -49,7 +60,7 @@ static void tab_conv_bang(t_tab_conv *x)
{
int i, j, k, l, min_s2, plu_s2, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
t_float sum=0.0f;
ok_src1 = iem_tab_check_arrays(gensym("tab_conv"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
@@ -80,9 +91,9 @@ static void tab_conv_bang(t_tab_conv *x)
{
k = j + i;
if((k >= 0) && (k < n))
- sum += vec_src1[k] * vec_src2[l];
+ sum += iemarray_getfloat(vec_src1, k) * iemarray_getfloat(vec_src2, l);
}
- vec_dst[i] = sum;
+ iemarray_setfloat(vec_dst, i, sum);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -98,7 +109,7 @@ static void tab_conv_list(t_tab_conv *x, t_symbol *s, int argc, t_atom *argv)
int n_src1, n_src2;
int i, j, k, l, min_s2, plu_s2;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
t_float sum=0.0f;
if((argc >= 5) &&
@@ -148,9 +159,9 @@ static void tab_conv_list(t_tab_conv *x, t_symbol *s, int argc, t_atom *argv)
{
k = j + i;
if((k >= 0) && (k < n_src1))
- sum += vec_src1[k] * vec_src2[l];
+ sum += iemarray_getfloat(vec_src1, k) * iemarray_getfloat(vec_src2, l);
}
- vec_dst[i] = sum;
+ iemarray_setfloat(vec_dst, i, sum);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -174,7 +185,6 @@ static void *tab_conv_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_conv *x = (t_tab_conv *)pd_new(tab_conv_class);
t_symbol *src1, *src2, *dst;
- t_float time;
if((argc >= 3) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_copy.c b/src/tab_copy.c
index 8893afe..ce3c123 100644
--- a/src/tab_copy.c
+++ b/src/tab_copy.c
@@ -1,7 +1,8 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
+/* x_beg_mem_dst[i] = x_beg_mem_src1[i] */
#include "m_pd.h"
#include "iemlib.h"
@@ -16,8 +17,8 @@ typedef struct _tab_copy
int x_size_dst;
int x_offset_src1;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_dst;
} t_tab_copy;
@@ -38,7 +39,7 @@ static void tab_copy_bang(t_tab_copy *x)
{
int i, n;
int ok_src, ok_dst;
- t_float *vec_src, *vec_dst;
+ iemarray_t *vec_src, *vec_dst;
ok_src = iem_tab_check_arrays(gensym("tab_copy"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_copy"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -56,7 +57,7 @@ static void tab_copy_bang(t_tab_copy *x)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = vec_src[i];
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src, i));
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -69,7 +70,7 @@ static void tab_copy_list(t_tab_copy *x, t_symbol *s, int argc, t_atom *argv)
int beg_src, beg_dst;
int i, n;
int ok_src, ok_dst;
- t_float *vec_src, *vec_dst;
+ iemarray_t *vec_src, *vec_dst;
if((argc >= 3) &&
IS_A_FLOAT(argv,0) &&
@@ -98,7 +99,7 @@ static void tab_copy_list(t_tab_copy *x, t_symbol *s, int argc, t_atom *argv)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = vec_src[i];
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src, i));
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
diff --git a/src/tab_counter.c b/src/tab_counter.c
index 87b97cc..e1b9553 100644
--- a/src/tab_counter.c
+++ b/src/tab_counter.c
@@ -1,13 +1,20 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_counter ------------------------------ */
+/* for(i=0; i<x_size_src1; i++) */
+/* { */
+/* if(x_beg_mem_src1[i] == 0.0f) */
+/* x_beg_mem_dst[i] = 0.0f; */
+/* else */
+/* x_beg_mem_dst[i] += 1.0f; */
+/* } */
typedef struct _tab_counter
{
@@ -16,8 +23,8 @@ typedef struct _tab_counter
int x_size_dst;
int x_offset_src1;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_dst;
} t_tab_counter;
@@ -33,7 +40,7 @@ static void tab_counter_bang(t_tab_counter *x)
{
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst;
+ iemarray_t *vec_src1, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_counter"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_counter"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -53,10 +60,10 @@ static void tab_counter_bang(t_tab_counter *x)
for(i=0; i<n; i++)
{
- if(vec_src1[i] == 0.0f)
- vec_dst[i] = 0.0f;
+ if(iemarray_getfloat(vec_src1, i) == 0.0f)
+ iemarray_setfloat(vec_dst, i, 0.0f);
else
- vec_dst[i] += 1.0f;
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_dst, i)+1.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -75,7 +82,7 @@ static void tab_counter_list(t_tab_counter *x, t_symbol *s, int argc, t_atom *ar
int beg_src1, beg_dst;
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst;
+ iemarray_t *vec_src1, *vec_dst;
if((argc >= 3) &&
IS_A_FLOAT(argv,0) &&
@@ -105,10 +112,10 @@ static void tab_counter_list(t_tab_counter *x, t_symbol *s, int argc, t_atom *ar
for(i=0; i<n; i++)
{
- if(vec_src1[i] == 0.0f)
- vec_dst[i] = 0.0f;
+ if(iemarray_getfloat(vec_src1, i) == 0.0f)
+ iemarray_setfloat(vec_dst, i, 0.0f);
else
- vec_dst[i] += 1.0f;
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_dst, i)+1.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -128,7 +135,7 @@ static void tab_counter_reset(t_tab_counter *x)
int beg_dst;
int i, n;
int ok_dst;
- t_float *vec_dst;
+ iemarray_t *vec_dst;
ok_dst = iem_tab_check_arrays(gensym("tab_counter"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -141,7 +148,7 @@ static void tab_counter_reset(t_tab_counter *x)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
diff --git a/src/tab_cross_corr.c b/src/tab_cross_corr.c
index f4b1b7c..270bd58 100644
--- a/src/tab_cross_corr.c
+++ b/src/tab_cross_corr.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -17,9 +17,9 @@ typedef struct _tab_cross_corr
int x_size_src2;
int x_size_dst;
int x_n;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_src2;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src2;
+ iemarray_t *x_beg_mem_dst;
t_float x_factor;
t_symbol *x_sym_scr1;
t_symbol *x_sym_scr2;
@@ -36,7 +36,8 @@ static void tab_cross_corr_tick(t_tab_cross_corr *x)
x->x_counter++;
if(x->x_counter < x->x_n)
{
- t_float *vec_src1, *vec_src2, *vec_dst, sum;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
+ t_float sum;
int j, m;
vec_src1 = x->x_beg_mem_src1 + x->x_counter;
@@ -46,9 +47,9 @@ static void tab_cross_corr_tick(t_tab_cross_corr *x)
sum = 0.0f;
for(j=0; j<m; j++)
{
- sum += vec_src1[j]*vec_src2[j];
+ sum += iemarray_getfloat(vec_src1, j)*iemarray_getfloat(vec_src2, j);
}
- vec_dst[0] = sum*x->x_factor;
+ iemarray_setfloat(vec_dst, 0, sum*x->x_factor);
clock_delay(x->x_clock, x->x_delay);
}
else
@@ -62,12 +63,12 @@ static void tab_cross_corr_tick(t_tab_cross_corr *x)
}
}
-static void tab_cross_corr_time(t_tab_cross_corr *x, t_floatarg time)
+static void tab_cross_corr_time(t_tab_cross_corr *x, t_floatarg dtime)
{
- if(time < 0.0f)
- time = 0.0f;
+ if(dtime < 0.0f)
+ dtime = 0.0f;
- x->x_delay = time;
+ x->x_delay = dtime;
}
static void tab_cross_corr_factor(t_tab_cross_corr *x, t_floatarg factor)
@@ -94,7 +95,7 @@ static void tab_cross_corr_bang(t_tab_cross_corr *x)
{
int i, j, m, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
t_float sum, f;
ok_src1 = iem_tab_check_arrays(gensym("tab_cross_corr"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
@@ -127,9 +128,9 @@ static void tab_cross_corr_bang(t_tab_cross_corr *x)
sum = 0.0f;
for(j=0; j<m; j++)
{
- sum += vec_src1[i+j]*vec_src2[j];
+ sum += iemarray_getfloat(vec_src1, i+j)*iemarray_getfloat(vec_src2, j);
}
- vec_dst[i] = sum*f;
+ iemarray_setfloat(vec_dst, i, sum*f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -145,10 +146,9 @@ static void tab_cross_corr_bang(t_tab_cross_corr *x)
sum = 0.0f;
for(j=0; j<m; j++)
{
- sum += vec_src1[j]*vec_src2[j];
+ sum += iemarray_getfloat(vec_src1, j)*iemarray_getfloat(vec_src2, j);
}
- vec_dst[0] = sum*f;
-
+ iemarray_setfloat(vec_dst, 0, sum*f);
clock_delay(x->x_clock, x->x_delay);
}
}
@@ -164,20 +164,20 @@ static void *tab_cross_corr_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_cross_corr *x = (t_tab_cross_corr *)pd_new(tab_cross_corr_class);
t_symbol *src1, *src2, *dst;
- t_float time, factor;
+ t_float dtime=0.0f, factor=1.0f;
+ if((argc >= 5) && IS_A_FLOAT(argv,4))
+ dtime = (t_float)atom_getfloatarg(4, argc, argv);
+ if((argc >= 4) && IS_A_FLOAT(argv,3))
+ factor = (t_float)atom_getfloatarg(3, argc, argv);
if((argc >= 3) &&
IS_A_SYMBOL(argv,0) &&
IS_A_SYMBOL(argv,1) &&
- IS_A_SYMBOL(argv,2) &&
- IS_A_FLOAT(argv,3) &&
- IS_A_FLOAT(argv,4))
+ IS_A_SYMBOL(argv,2))
{
src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv);
src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv);
dst = (t_symbol *)atom_getsymbolarg(2, argc, argv);
- factor = (t_float)atom_getfloatarg(3, argc, argv);
- time = (t_float)atom_getfloatarg(4, argc, argv);
}
else
{
@@ -186,10 +186,10 @@ static void *tab_cross_corr_new(t_symbol *s, int argc, t_atom *argv)
return(0);
}
- if(time < 0.0f)
- time = 0.0f;
+ if(dtime < 0.0f)
+ dtime = 0.0f;
- x->x_delay = time;
+ x->x_delay = dtime;
x->x_factor = factor;
x->x_sym_scr1 = src1;
x->x_sym_scr2 = src2;
diff --git a/src/tab_div.c b/src/tab_div.c
index 6624dbf..c5bfd89 100644
--- a/src/tab_div.c
+++ b/src/tab_div.c
@@ -1,13 +1,14 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_div ------------------------------ */
+/* x_beg_mem_dst[i] = x_beg_mem_src1[i]/x_offset_src2[i] */
typedef struct _tab_div
{
@@ -18,9 +19,9 @@ typedef struct _tab_div
int x_offset_src1;
int x_offset_src2;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_src2;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src2;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_scr2;
t_symbol *x_sym_dst;
@@ -47,7 +48,7 @@ static void tab_div_bang(t_tab_div *x)
{
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_div"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_src2 = iem_tab_check_arrays(gensym("tab_div"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0);
@@ -71,10 +72,10 @@ static void tab_div_bang(t_tab_div *x)
for(i=0; i<n; i++)
{
- if(vec_src2[i] == 0.0f)
- vec_dst[i] = 0.0f;
+ if(iemarray_getfloat(vec_src2, i) == 0.0f)
+ iemarray_setfloat(vec_dst, i, 0.0f);
else
- vec_dst[i] = vec_src1[i] / vec_src2[i];
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src1, i) / iemarray_getfloat(vec_src2, i));
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -88,7 +89,7 @@ static void tab_div_list(t_tab_div *x, t_symbol *s, int argc, t_atom *argv)
int beg_src1, beg_src2, beg_dst;
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -124,10 +125,10 @@ static void tab_div_list(t_tab_div *x, t_symbol *s, int argc, t_atom *argv)
for(i=0; i<n; i++)
{
- if(vec_src2[i] == 0.0f)
- vec_dst[i] = 0.0f;
+ if(iemarray_getfloat(vec_src2, i) == 0.0f)
+ iemarray_setfloat(vec_dst, i, 0.0f);
else
- vec_dst[i] = vec_src1[i] / vec_src2[i];
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src1, i) / iemarray_getfloat(vec_src2, i));
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -150,7 +151,6 @@ static void *tab_div_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_div *x = (t_tab_div *)pd_new(tab_div_class);
t_symbol *src1, *src2, *dst;
- t_float time;
if((argc >= 3) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_eq.c b/src/tab_eq.c
index af30e04..7ce5eaa 100644
--- a/src/tab_eq.c
+++ b/src/tab_eq.c
@@ -1,13 +1,17 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_eq ------------------------------ */
+/* if(x_beg_mem_src1[i] == x_beg_mem_src2[i]) */
+/* x_beg_mem_dst[i] = 1.0f; */
+/* else */
+/* x_beg_mem_dst[i] = 0.0f; */
typedef struct _tab_eq
{
@@ -18,9 +22,9 @@ typedef struct _tab_eq
int x_offset_src1;
int x_offset_src2;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_src2;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src2;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_scr2;
t_symbol *x_sym_dst;
@@ -47,7 +51,7 @@ static void tab_eq_bang(t_tab_eq *x)
{
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_eq"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_src2 = iem_tab_check_arrays(gensym("tab_eq"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0);
@@ -71,10 +75,10 @@ static void tab_eq_bang(t_tab_eq *x)
for(i=0; i<n; i++)
{
- if(vec_src1[i] == vec_src2[i])
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) == iemarray_getfloat(vec_src2, i))
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -88,7 +92,7 @@ static void tab_eq_list(t_tab_eq *x, t_symbol *s, int argc, t_atom *argv)
int beg_src1, beg_src2, beg_dst;
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -124,10 +128,10 @@ static void tab_eq_list(t_tab_eq *x, t_symbol *s, int argc, t_atom *argv)
for(i=0; i<n; i++)
{
- if(vec_src1[i] == vec_src2[i])
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) == iemarray_getfloat(vec_src2, i))
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -150,7 +154,6 @@ static void *tab_eq_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_eq *x = (t_tab_eq *)pd_new(tab_eq_class);
t_symbol *src1, *src2, *dst;
- t_float time;
if((argc >= 3) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_eq_scalar.c b/src/tab_eq_scalar.c
index a322a45..32f4137 100644
--- a/src/tab_eq_scalar.c
+++ b/src/tab_eq_scalar.c
@@ -1,13 +1,17 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_eq_scalar ------------------------------ */
+/* if(x_beg_mem_src1[i] == compare) */
+/* x_beg_mem_dst[i] = 1.0f; */
+/* else */
+/* x_beg_mem_dst[i] += 0.0f; */
typedef struct _tab_eq_scalar
{
@@ -16,8 +20,8 @@ typedef struct _tab_eq_scalar
int x_size_dst;
int x_offset_src1;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_dst;
} t_tab_eq_scalar;
@@ -33,7 +37,7 @@ static void tab_eq_scalar_float(t_tab_eq_scalar *x, t_floatarg compare)
{
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst;
+ iemarray_t *vec_src1, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_eq_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_eq_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -53,10 +57,10 @@ static void tab_eq_scalar_float(t_tab_eq_scalar *x, t_floatarg compare)
for(i=0; i<n; i++)
{
- if(vec_src1[i] == compare)
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) == compare)
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -75,7 +79,8 @@ static void tab_eq_scalar_list(t_tab_eq_scalar *x, t_symbol *s, int argc, t_atom
int beg_src1, beg_dst;
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst, compare;
+ iemarray_t *vec_src1, *vec_dst;
+ t_float compare;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -107,10 +112,10 @@ static void tab_eq_scalar_list(t_tab_eq_scalar *x, t_symbol *s, int argc, t_atom
for(i=0; i<n; i++)
{
- if(vec_src1[i] == compare)
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) == compare)
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
diff --git a/src/tab_fft.c b/src/tab_fft.c
index 372e68c..a8107d4 100644
--- a/src/tab_fft.c
+++ b/src/tab_fft.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -9,6 +9,7 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
#include <math.h>
/* -------------------------- tab_fft ------------------------------ */
+/* complex FFT */
typedef struct _tab_fft
{
@@ -22,10 +23,10 @@ typedef struct _tab_fft
int x_offset_dst_re;
int x_offset_dst_im;
int x_fftsize;
- t_float *x_beg_mem_src_re;
- t_float *x_beg_mem_src_im;
- t_float *x_beg_mem_dst_re;
- t_float *x_beg_mem_dst_im;
+ iemarray_t *x_beg_mem_src_re;
+ iemarray_t *x_beg_mem_src_im;
+ iemarray_t *x_beg_mem_dst_re;
+ iemarray_t *x_beg_mem_dst_im;
TAB_COMPLEX *x_sin_cos;
t_symbol *x_sym_src_re;
t_symbol *x_sym_src_im;
@@ -100,7 +101,7 @@ static void tab_fft_bang(t_tab_fft *x)
int fs2 = fftsize / 2;
TAB_COMPLEX w;
TAB_COMPLEX *sincos = x->x_sin_cos;
- t_float *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im;
+ iemarray_t *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im;
t_float old1_re, old1_im, old2_re, old2_im;
ok_src_re = iem_tab_check_arrays(gensym("tab_fft"), x->x_sym_src_re, &x->x_beg_mem_src_re, &x->x_size_src_re, fftsize);
@@ -118,8 +119,8 @@ static void tab_fft_bang(t_tab_fft *x)
for(k=0; k<fftsize; k++)
{
- vec_dst_re[k] = vec_src_re[k];
- vec_dst_im[k] = vec_src_im[k];
+ iemarray_setfloat(vec_dst_re, k, iemarray_getfloat(vec_src_re, k));
+ iemarray_setfloat(vec_dst_im, k, iemarray_getfloat(vec_src_im, k));
}
i_inc = fs2;
@@ -132,15 +133,16 @@ static void tab_fft_bang(t_tab_fft *x)
w_index = 0;
for(k=0; k<i_inc; k++)
{
- old1_re = vec_dst_re[v_index];
- old1_im = vec_dst_im[v_index];
- old2_re = vec_dst_re[v_index+i_inc];
- old2_im = vec_dst_im[v_index+i_inc];
+ old1_re = iemarray_getfloat(vec_dst_re, v_index);
+ old1_im = iemarray_getfloat(vec_dst_im, v_index);
+ old2_re = iemarray_getfloat(vec_dst_re, v_index+i_inc);
+ old2_im = iemarray_getfloat(vec_dst_im, v_index+i_inc);
+
w = sincos[w_index];
- vec_dst_re[v_index+i_inc] = (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag;
- vec_dst_im[v_index+i_inc] = (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag;
- vec_dst_re[v_index] = old1_re + old2_re;
- vec_dst_im[v_index] = old1_im + old2_im;
+ iemarray_setfloat(vec_dst_re, v_index+i_inc, (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag);
+ iemarray_setfloat(vec_dst_im, v_index+i_inc, (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag);
+ iemarray_setfloat(vec_dst_re, v_index, old1_re + old2_re);
+ iemarray_setfloat(vec_dst_im, v_index, old1_im + old2_im);
w_index += w_inc;
v_index++;
}
@@ -162,12 +164,12 @@ static void tab_fft_bang(t_tab_fft *x)
j = j + k;
if(i < j)
{
- old1_re = vec_dst_re[j];
- old1_im = vec_dst_im[j];
- vec_dst_re[j] = vec_dst_re[i];
- vec_dst_im[j] = vec_dst_im[i];
- vec_dst_re[i] = old1_re;
- vec_dst_im[i] = old1_im;
+ old1_re = iemarray_getfloat(vec_dst_re, j);
+ old1_im = iemarray_getfloat(vec_dst_im, j);
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i));
+ iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i));
+ iemarray_setfloat(vec_dst_re, i, old1_re);
+ iemarray_setfloat(vec_dst_im, i, old1_im);
}
}
@@ -204,7 +206,7 @@ static void tab_fft_list(t_tab_fft *x, t_symbol *s, int argc, t_atom *argv)
int fs2 = fftsize / 2;
TAB_COMPLEX w;
TAB_COMPLEX *sincos = x->x_sin_cos;
- t_float *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im;
+ iemarray_t *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im;
t_float old1_re, old1_im, old2_re, old2_im;
if((argc >= 4) &&
@@ -242,8 +244,8 @@ static void tab_fft_list(t_tab_fft *x, t_symbol *s, int argc, t_atom *argv)
for(k=0; k<fftsize; k++)
{
- vec_dst_re[k] = vec_src_re[k];
- vec_dst_im[k] = vec_src_im[k];
+ iemarray_setfloat(vec_dst_re, k, iemarray_getfloat(vec_src_re, k));
+ iemarray_setfloat(vec_dst_im, k, iemarray_getfloat(vec_src_im, k));
}
i_inc = fs2;
@@ -256,15 +258,16 @@ static void tab_fft_list(t_tab_fft *x, t_symbol *s, int argc, t_atom *argv)
w_index = 0;
for(k=0; k<i_inc; k++)
{
- old1_re = vec_dst_re[v_index];
- old1_im = vec_dst_im[v_index];
- old2_re = vec_dst_re[v_index+i_inc];
- old2_im = vec_dst_im[v_index+i_inc];
+ old1_re = iemarray_getfloat(vec_dst_re, v_index);
+ old1_im = iemarray_getfloat(vec_dst_im, v_index);
+ old2_re = iemarray_getfloat(vec_dst_re, v_index+i_inc);
+ old2_im = iemarray_getfloat(vec_dst_im, v_index+i_inc);
+
w = sincos[w_index];
- vec_dst_re[v_index+i_inc] = (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag;
- vec_dst_im[v_index+i_inc] = (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag;
- vec_dst_re[v_index] = old1_re + old2_re;
- vec_dst_im[v_index] = old1_im + old2_im;
+ iemarray_setfloat(vec_dst_re, v_index+i_inc, (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag);
+ iemarray_setfloat(vec_dst_im, v_index+i_inc, (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag);
+ iemarray_setfloat(vec_dst_re, v_index, old1_re + old2_re);
+ iemarray_setfloat(vec_dst_im, v_index, old1_im + old2_im);
w_index += w_inc;
v_index++;
}
@@ -286,12 +289,12 @@ static void tab_fft_list(t_tab_fft *x, t_symbol *s, int argc, t_atom *argv)
j = j + k;
if(i < j)
{
- old1_re = vec_dst_re[j];
- old1_im = vec_dst_im[j];
- vec_dst_re[j] = vec_dst_re[i];
- vec_dst_im[j] = vec_dst_im[i];
- vec_dst_re[i] = old1_re;
- vec_dst_im[i] = old1_im;
+ old1_re = iemarray_getfloat(vec_dst_re, j);
+ old1_im = iemarray_getfloat(vec_dst_im, j);
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i));
+ iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i));
+ iemarray_setfloat(vec_dst_re, i, old1_re);
+ iemarray_setfloat(vec_dst_im, i, old1_im);
}
}
diff --git a/src/tab_find_exact_peaks.c b/src/tab_find_exact_peaks.c
index d8cadbf..e57cef2 100644
--- a/src/tab_find_exact_peaks.c
+++ b/src/tab_find_exact_peaks.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -17,7 +17,7 @@ typedef struct _tab_find_exact_peaks
t_object x_obj;
int x_size_src1;
int x_offset_src1;
- t_float *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src1;
int x_work_alloc;
int *x_beg_mem_work1;
t_float *x_beg_mem_work2;
@@ -94,8 +94,9 @@ static void tab_find_exact_peaks_src(t_tab_find_exact_peaks *x, t_symbol *s)
static void tab_find_exact_peaks_bang(t_tab_find_exact_peaks *x)
{
int i, n, w, ww;
- int ok_src, peak_index=0, sort_index=0;
- t_float *vec_src, *vec_work2;
+ int ok_src, peak_index=0;
+ t_float *vec_work2;
+ iemarray_t *vec_src;
int *vec_work1;
t_float max=-1.0e37;
int max_peaks=x->x_n_peaks;
@@ -145,10 +146,10 @@ static void tab_find_exact_peaks_bang(t_tab_find_exact_peaks *x)
for(i=beg; i<end; i++)
{
- diff_low = vec_src[i-low_bord] - abs_min_height_diff;
- diff_high = vec_src[i+high_bord] - abs_min_height_diff;
- if((vec_src[i-low_bord-1] < diff_low) && !vec_work1[i-low_bord] &&
- (vec_src[i+high_bord+1] < diff_high) && !vec_work1[i+high_bord])
+ diff_low = iemarray_getfloat(vec_src, i-low_bord) - abs_min_height_diff;
+ diff_high = iemarray_getfloat(vec_src, i+high_bord) - abs_min_height_diff;
+ if((iemarray_getfloat(vec_src, i-low_bord-1) < diff_low) && !vec_work1[i-low_bord] &&
+ (iemarray_getfloat(vec_src, i+high_bord+1) < diff_high) && !vec_work1[i+high_bord])
{
for(j=i-low_bord; j<=i+high_bord; j++)
vec_work1[j] = 1;
@@ -174,7 +175,7 @@ static void tab_find_exact_peaks_bang(t_tab_find_exact_peaks *x)
peak_index = (i + j) / 2;
if(sort_index <= max_peaks)
{
- outlet_float(x->x_peak_value_out, vec_src[i]);
+ outlet_float(x->x_peak_value_out, iemarray_getfloat(vec_src, i));
outlet_float(x->x_peak_index_out, (t_float)peak_index);
outlet_float(x->x_sort_index_out, sort_index);
sort_index++;
@@ -207,15 +208,15 @@ static void tab_find_exact_peaks_bang(t_tab_find_exact_peaks *x)
for(i=beg; i<end; i++)
{
- diff_low = vec_src[i-low_bord] - abs_min_height_diff;
- diff_high = vec_src[i+high_bord] - abs_min_height_diff;
- if((vec_src[i-low_bord-1] < diff_low) && !vec_work1[i-low_bord] &&
- (vec_src[i+high_bord+1] < diff_high) && !vec_work1[i+high_bord])
+ diff_low = iemarray_getfloat(vec_src, i-low_bord) - abs_min_height_diff;
+ diff_high = iemarray_getfloat(vec_src, i+high_bord) - abs_min_height_diff;
+ if((iemarray_getfloat(vec_src, i-low_bord-1) < diff_low) && !vec_work1[i-low_bord] &&
+ (iemarray_getfloat(vec_src, i+high_bord+1) < diff_high) && !vec_work1[i+high_bord])
{
for(j=i-low_bord; j<=i+high_bord; j++)
{
vec_work1[j] = 1;
- vec_work2[j] = vec_src[j];
+ vec_work2[j] = iemarray_getfloat(vec_src, j);
}
//post("a[%d]=%g, a[%d]=%g",i-low_bord,vec_src[i-low_bord],i+high_bord,vec_src[i+high_bord]);
}
diff --git a/src/tab_find_peaks.c b/src/tab_find_peaks.c
index ad4e014..8fd1341 100644
--- a/src/tab_find_peaks.c
+++ b/src/tab_find_peaks.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -17,7 +17,7 @@ typedef struct _tab_find_peaks
t_object x_obj;
int x_size_src1;
int x_offset_src1;
- t_float *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src1;
int x_work_alloc;
int *x_beg_mem_work1;
t_float *x_beg_mem_work2;
@@ -94,8 +94,9 @@ static void tab_find_peaks_src(t_tab_find_peaks *x, t_symbol *s)
static void tab_find_peaks_bang(t_tab_find_peaks *x)
{
int i, n, w, ww;
- int ok_src, peak_index=0, sort_index=0;
- t_float *vec_src, *vec_work2;
+ int ok_src, peak_index=0;
+ iemarray_t *vec_src;
+ t_float *vec_work2;
int *vec_work1;
t_float max=-1.0e37;
int max_peaks=x->x_n_peaks;
@@ -145,10 +146,10 @@ static void tab_find_peaks_bang(t_tab_find_peaks *x)
for(i=beg; i<end; i++)
{
- diff_low = vec_src[i-low_bord] - abs_min_height_diff;
- diff_high = vec_src[i+high_bord] - abs_min_height_diff;
- if((vec_src[i-low_bord-1] < diff_low) && !vec_work1[i-low_bord] &&
- (vec_src[i+high_bord+1] < diff_high) && !vec_work1[i+high_bord])
+ diff_low = iemarray_getfloat(vec_src, i-low_bord) - abs_min_height_diff;
+ diff_high = iemarray_getfloat(vec_src, i+high_bord) - abs_min_height_diff;
+ if((iemarray_getfloat(vec_src, i-low_bord-1) < diff_low) && !vec_work1[i-low_bord] &&
+ (iemarray_getfloat(vec_src, i+high_bord+1) < diff_high) && !vec_work1[i+high_bord])
{
for(j=i-low_bord; j<=i+high_bord; j++)
vec_work1[j] = 1;
@@ -174,7 +175,7 @@ static void tab_find_peaks_bang(t_tab_find_peaks *x)
peak_index = (i + j) / 2;
if(sort_index <= max_peaks)
{
- outlet_float(x->x_peak_value_out, vec_src[i]);
+ outlet_float(x->x_peak_value_out, iemarray_getfloat(vec_src, i));
outlet_float(x->x_peak_index_out, (t_float)peak_index);
outlet_float(x->x_sort_index_out, sort_index);
sort_index++;
@@ -207,15 +208,15 @@ static void tab_find_peaks_bang(t_tab_find_peaks *x)
for(i=beg; i<end; i++)
{
- diff_low = vec_src[i-low_bord] - abs_min_height_diff;
- diff_high = vec_src[i+high_bord] - abs_min_height_diff;
- if((vec_src[i-low_bord-1] < diff_low) && !vec_work1[i-low_bord] &&
- (vec_src[i+high_bord+1] < diff_high) && !vec_work1[i+high_bord])
+ diff_low = iemarray_getfloat(vec_src, i-low_bord) - abs_min_height_diff;
+ diff_high = iemarray_getfloat(vec_src, i+high_bord) - abs_min_height_diff;
+ if((iemarray_getfloat(vec_src, i-low_bord-1) < diff_low) && !vec_work1[i-low_bord] &&
+ (iemarray_getfloat(vec_src, i+high_bord+1) < diff_high) && !vec_work1[i+high_bord])
{
for(j=i-low_bord; j<=i+high_bord; j++)
{
vec_work1[j] = 1;
- vec_work2[j] = vec_src[j];
+ vec_work2[j] = iemarray_getfloat(vec_src, j);
}
//post("a[%d]=%g, a[%d]=%g",i-low_bord,vec_src[i-low_bord],i+high_bord,vec_src[i+high_bord]);
}
diff --git a/src/tab_ge.c b/src/tab_ge.c
index cb22836..c066928 100644
--- a/src/tab_ge.c
+++ b/src/tab_ge.c
@@ -8,6 +8,10 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
#include "iem_tab.h"
/* -------------------------- tab_ge ------------------------------ */
+/* if(x_beg_mem_src1[i] >= x_beg_mem_src2[i]) */
+/* x_beg_mem_dst[i] = 1.0f; */
+/* else */
+/* x_beg_mem_dst[i] = 0.0f; */
typedef struct _tab_ge
{
@@ -18,9 +22,9 @@ typedef struct _tab_ge
int x_offset_src1;
int x_offset_src2;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_src2;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src2;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_scr2;
t_symbol *x_sym_dst;
@@ -47,7 +51,7 @@ static void tab_ge_bang(t_tab_ge *x)
{
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_ge"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_src2 = iem_tab_check_arrays(gensym("tab_ge"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0);
@@ -71,10 +75,10 @@ static void tab_ge_bang(t_tab_ge *x)
for(i=0; i<n; i++)
{
- if(vec_src1[i] >= vec_src2[i])
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) >= iemarray_getfloat(vec_src2, i))
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -88,7 +92,7 @@ static void tab_ge_list(t_tab_ge *x, t_symbol *s, int argc, t_atom *argv)
int beg_src1, beg_src2, beg_dst;
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -124,10 +128,10 @@ static void tab_ge_list(t_tab_ge *x, t_symbol *s, int argc, t_atom *argv)
for(i=0; i<n; i++)
{
- if(vec_src1[i] >= vec_src2[i])
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) >= iemarray_getfloat(vec_src2, i))
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -150,7 +154,6 @@ static void *tab_ge_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_ge *x = (t_tab_ge *)pd_new(tab_ge_class);
t_symbol *src1, *src2, *dst;
- t_float time;
if((argc >= 3) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_ge_scalar.c b/src/tab_ge_scalar.c
index 837dd6a..53a88c7 100644
--- a/src/tab_ge_scalar.c
+++ b/src/tab_ge_scalar.c
@@ -1,13 +1,17 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_ge_scalar ------------------------------ */
+/* if(x_beg_mem_src1[i] >= compare) */
+/* x_beg_mem_dst[i] = 1.0f; */
+/* else */
+/* x_beg_mem_dst[i] += 0.0f; */
typedef struct _tab_ge_scalar
{
@@ -16,8 +20,8 @@ typedef struct _tab_ge_scalar
int x_size_dst;
int x_offset_src1;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_dst;
} t_tab_ge_scalar;
@@ -33,7 +37,7 @@ static void tab_ge_scalar_float(t_tab_ge_scalar *x, t_floatarg compare)
{
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst;
+ iemarray_t *vec_src1, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_ge_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_ge_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -53,10 +57,10 @@ static void tab_ge_scalar_float(t_tab_ge_scalar *x, t_floatarg compare)
for(i=0; i<n; i++)
{
- if(vec_src1[i] >= compare)
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) >= compare)
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -75,7 +79,8 @@ static void tab_ge_scalar_list(t_tab_ge_scalar *x, t_symbol *s, int argc, t_atom
int beg_src1, beg_dst;
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst, compare;
+ t_float compare;
+ iemarray_t *vec_src1, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -107,10 +112,10 @@ static void tab_ge_scalar_list(t_tab_ge_scalar *x, t_symbol *s, int argc, t_atom
for(i=0; i<n; i++)
{
- if(vec_src1[i] >= compare)
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) >= compare)
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
diff --git a/src/tab_gt.c b/src/tab_gt.c
index a130818..2bd0315 100644
--- a/src/tab_gt.c
+++ b/src/tab_gt.c
@@ -1,13 +1,17 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_gt ------------------------------ */
+/* if(x_beg_mem_src1[i] > x_beg_mem_src2[i]) */
+/* x_beg_mem_dst[i] = 1.0f; */
+/* else */
+/* x_beg_mem_dst[i] = 0.0f; */
typedef struct _tab_gt
{
@@ -18,9 +22,9 @@ typedef struct _tab_gt
int x_offset_src1;
int x_offset_src2;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_src2;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src2;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_scr2;
t_symbol *x_sym_dst;
@@ -47,7 +51,7 @@ static void tab_gt_bang(t_tab_gt *x)
{
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_gt"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_src2 = iem_tab_check_arrays(gensym("tab_gt"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0);
@@ -71,10 +75,10 @@ static void tab_gt_bang(t_tab_gt *x)
for(i=0; i<n; i++)
{
- if(vec_src1[i] > vec_src2[i])
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) > iemarray_getfloat(vec_src2, i))
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -88,7 +92,7 @@ static void tab_gt_list(t_tab_gt *x, t_symbol *s, int argc, t_atom *argv)
int beg_src1, beg_src2, beg_dst;
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -124,10 +128,10 @@ static void tab_gt_list(t_tab_gt *x, t_symbol *s, int argc, t_atom *argv)
for(i=0; i<n; i++)
{
- if(vec_src1[i] > vec_src2[i])
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) > iemarray_getfloat(vec_src2, i))
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -150,7 +154,6 @@ static void *tab_gt_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_gt *x = (t_tab_gt *)pd_new(tab_gt_class);
t_symbol *src1, *src2, *dst;
- t_float time;
if((argc >= 3) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_gt_scalar.c b/src/tab_gt_scalar.c
index 366cd63..9c4f410 100644
--- a/src/tab_gt_scalar.c
+++ b/src/tab_gt_scalar.c
@@ -1,13 +1,17 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_gt_scalar ------------------------------ */
+/* if(x_beg_mem_src1[i] > compare) */
+/* x_beg_mem_dst[i] = 1.0f; */
+/* else */
+/* x_beg_mem_dst[i] += 0.0f; */
typedef struct _tab_gt_scalar
{
@@ -16,8 +20,8 @@ typedef struct _tab_gt_scalar
int x_size_dst;
int x_offset_src1;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_dst;
} t_tab_gt_scalar;
@@ -33,7 +37,7 @@ static void tab_gt_scalar_float(t_tab_gt_scalar *x, t_floatarg compare)
{
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst;
+ iemarray_t *vec_src1, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_gt_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_gt_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -53,10 +57,10 @@ static void tab_gt_scalar_float(t_tab_gt_scalar *x, t_floatarg compare)
for(i=0; i<n; i++)
{
- if(vec_src1[i] > compare)
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) > compare)
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -75,7 +79,8 @@ static void tab_gt_scalar_list(t_tab_gt_scalar *x, t_symbol *s, int argc, t_atom
int beg_src1, beg_dst;
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst, compare;
+ t_float compare;
+ iemarray_t *vec_src1, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -107,10 +112,10 @@ static void tab_gt_scalar_list(t_tab_gt_scalar *x, t_symbol *s, int argc, t_atom
for(i=0; i<n; i++)
{
- if(vec_src1[i] > compare)
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) > compare)
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
diff --git a/src/tab_ifft.c b/src/tab_ifft.c
index b3b95b0..730db29 100644
--- a/src/tab_ifft.c
+++ b/src/tab_ifft.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -9,6 +9,7 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
#include <math.h>
/* -------------------------- tab_ifft ------------------------------ */
+/* complex inverse FFT */
typedef struct _tab_ifft
{
@@ -22,10 +23,10 @@ typedef struct _tab_ifft
int x_offset_dst_re;
int x_offset_dst_im;
int x_fftsize;
- t_float *x_beg_mem_src_re;
- t_float *x_beg_mem_src_im;
- t_float *x_beg_mem_dst_re;
- t_float *x_beg_mem_dst_im;
+ iemarray_t *x_beg_mem_src_re;
+ iemarray_t *x_beg_mem_src_im;
+ iemarray_t *x_beg_mem_dst_re;
+ iemarray_t *x_beg_mem_dst_im;
TAB_COMPLEX *x_sin_cos;
t_symbol *x_sym_src_re;
t_symbol *x_sym_src_im;
@@ -100,7 +101,7 @@ static void tab_ifft_bang(t_tab_ifft *x)
int fs2 = fftsize / 2;
TAB_COMPLEX w;
TAB_COMPLEX *sincos = x->x_sin_cos;
- t_float *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im;
+ iemarray_t *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im;
t_float old1_re, old1_im, old2_re, old2_im, g;
ok_src_re = iem_tab_check_arrays(gensym("tab_ifft"), x->x_sym_src_re, &x->x_beg_mem_src_re, &x->x_size_src_re, fftsize);
@@ -119,8 +120,8 @@ static void tab_ifft_bang(t_tab_ifft *x)
for(j=0; j<fftsize; j++)
{
- vec_dst_re[j] = vec_src_re[j];
- vec_dst_im[j] = vec_src_im[j];
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_src_re, j));
+ iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_src_im, j));
}
i_inc = fs2;
@@ -133,15 +134,16 @@ static void tab_ifft_bang(t_tab_ifft *x)
w_index = 0;
for(k=0; k<i_inc; k++)
{
- old1_re = vec_dst_re[v_index];
- old1_im = vec_dst_im[v_index];
- old2_re = vec_dst_re[v_index+i_inc];
- old2_im = vec_dst_im[v_index+i_inc];
+ old1_re = iemarray_getfloat(vec_dst_re, v_index);
+ old1_im = iemarray_getfloat(vec_dst_im, v_index);
+ old2_re = iemarray_getfloat(vec_dst_re, v_index+i_inc);
+ old2_im = iemarray_getfloat(vec_dst_im, v_index+i_inc);
+
w = sincos[w_index];
- vec_dst_re[v_index+i_inc] = (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag;
- vec_dst_im[v_index+i_inc] = (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag;
- vec_dst_re[v_index] = old1_re + old2_re;
- vec_dst_im[v_index] = old1_im + old2_im;
+ iemarray_setfloat(vec_dst_re, v_index+i_inc, (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag);
+ iemarray_setfloat(vec_dst_im, v_index+i_inc, (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag);
+ iemarray_setfloat(vec_dst_re, v_index, old1_re + old2_re);
+ iemarray_setfloat(vec_dst_im, v_index, old1_im + old2_im);
w_index += w_inc;
v_index++;
}
@@ -163,12 +165,12 @@ static void tab_ifft_bang(t_tab_ifft *x)
j = j + k;
if(i < j)
{
- old1_re = vec_dst_re[j];
- old1_im = vec_dst_im[j];
- vec_dst_re[j] = vec_dst_re[i];
- vec_dst_im[j] = vec_dst_im[i];
- vec_dst_re[i] = old1_re;
- vec_dst_im[i] = old1_im;
+ old1_re = iemarray_getfloat(vec_dst_re, j);
+ old1_im = iemarray_getfloat(vec_dst_im, j);
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i));
+ iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i));
+ iemarray_setfloat(vec_dst_re, i, old1_re);
+ iemarray_setfloat(vec_dst_im, i, old1_im);
}
}
@@ -188,8 +190,8 @@ static void tab_ifft_bang(t_tab_ifft *x)
g = 1.0f / (t_float)fftsize;
for(i = 0; i < fftsize; i++)
{
- vec_dst_re[i] *= g;
- vec_dst_im[i] *= g;
+ iemarray_setfloat(vec_dst_re, i, iemarray_getfloat(vec_dst_re, i)*g);
+ iemarray_setfloat(vec_dst_im, i, iemarray_getfloat(vec_dst_im, i)*g);
}
outlet_bang(x->x_obj.ob_outlet);
@@ -211,7 +213,7 @@ static void tab_ifft_list(t_tab_ifft *x, t_symbol *s, int argc, t_atom *argv)
int fs2 = fftsize / 2;
TAB_COMPLEX w;
TAB_COMPLEX *sincos = x->x_sin_cos;
- t_float *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im;
+ iemarray_t *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im;
t_float old1_re, old1_im, old2_re, old2_im, g;
if((argc >= 4) &&
@@ -249,8 +251,8 @@ static void tab_ifft_list(t_tab_ifft *x, t_symbol *s, int argc, t_atom *argv)
for(j=0; j<fftsize; j++)
{
- vec_dst_re[j] = vec_src_re[j];
- vec_dst_im[j] = vec_src_im[j];
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_src_re, j));
+ iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_src_im, j));
}
i_inc = fs2;
@@ -263,15 +265,16 @@ static void tab_ifft_list(t_tab_ifft *x, t_symbol *s, int argc, t_atom *argv)
w_index = 0;
for(k=0; k<i_inc; k++)
{
- old1_re = vec_dst_re[v_index];
- old1_im = vec_dst_im[v_index];
- old2_re = vec_dst_re[v_index+i_inc];
- old2_im = vec_dst_im[v_index+i_inc];
+ old1_re = iemarray_getfloat(vec_dst_re, v_index);
+ old1_im = iemarray_getfloat(vec_dst_im, v_index);
+ old2_re = iemarray_getfloat(vec_dst_re, v_index+i_inc);
+ old2_im = iemarray_getfloat(vec_dst_im, v_index+i_inc);
+
w = sincos[w_index];
- vec_dst_re[v_index+i_inc] = (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag;
- vec_dst_im[v_index+i_inc] = (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag;
- vec_dst_re[v_index] = old1_re + old2_re;
- vec_dst_im[v_index] = old1_im + old2_im;
+ iemarray_setfloat(vec_dst_re, v_index+i_inc, (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag);
+ iemarray_setfloat(vec_dst_im, v_index+i_inc, (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag);
+ iemarray_setfloat(vec_dst_re, v_index, old1_re + old2_re);
+ iemarray_setfloat(vec_dst_im, v_index, old1_im + old2_im);
w_index += w_inc;
v_index++;
}
@@ -293,12 +296,12 @@ static void tab_ifft_list(t_tab_ifft *x, t_symbol *s, int argc, t_atom *argv)
j = j + k;
if(i < j)
{
- old1_re = vec_dst_re[j];
- old1_im = vec_dst_im[j];
- vec_dst_re[j] = vec_dst_re[i];
- vec_dst_im[j] = vec_dst_im[i];
- vec_dst_re[i] = old1_re;
- vec_dst_im[i] = old1_im;
+ old1_re = iemarray_getfloat(vec_dst_re, j);
+ old1_im = iemarray_getfloat(vec_dst_im, j);
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i));
+ iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i));
+ iemarray_setfloat(vec_dst_re, i, old1_re);
+ iemarray_setfloat(vec_dst_im, i, old1_im);
}
}
@@ -318,8 +321,8 @@ static void tab_ifft_list(t_tab_ifft *x, t_symbol *s, int argc, t_atom *argv)
g = 1.0f / (t_float)fftsize;
for(i = 0; i < fftsize; i++)
{
- vec_dst_re[i] *= g;
- vec_dst_im[i] *= g;
+ iemarray_setfloat(vec_dst_re, i, iemarray_getfloat(vec_dst_re, i)*g);
+ iemarray_setfloat(vec_dst_im, i, iemarray_getfloat(vec_dst_im, i)*g);
}
outlet_bang(x->x_obj.ob_outlet);
diff --git a/src/tab_le.c b/src/tab_le.c
index b1a1214..3c4f0b3 100644
--- a/src/tab_le.c
+++ b/src/tab_le.c
@@ -1,13 +1,17 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_le ------------------------------ */
+/* if(x_beg_mem_src1[i] <= x_beg_mem_src2[i]) */
+/* x_beg_mem_dst[i] = 1.0f; */
+/* else */
+/* x_beg_mem_dst[i] = 0.0f; */
typedef struct _tab_le
{
@@ -18,9 +22,9 @@ typedef struct _tab_le
int x_offset_src1;
int x_offset_src2;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_src2;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src2;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_scr2;
t_symbol *x_sym_dst;
@@ -47,7 +51,7 @@ static void tab_le_bang(t_tab_le *x)
{
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_le"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_src2 = iem_tab_check_arrays(gensym("tab_le"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0);
@@ -71,10 +75,10 @@ static void tab_le_bang(t_tab_le *x)
for(i=0; i<n; i++)
{
- if(vec_src1[i] <= vec_src2[i])
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) <= iemarray_getfloat(vec_src2, i))
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -88,7 +92,7 @@ static void tab_le_list(t_tab_le *x, t_symbol *s, int argc, t_atom *argv)
int beg_src1, beg_src2, beg_dst;
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -124,10 +128,10 @@ static void tab_le_list(t_tab_le *x, t_symbol *s, int argc, t_atom *argv)
for(i=0; i<n; i++)
{
- if(vec_src1[i] <= vec_src2[i])
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) <= iemarray_getfloat(vec_src2, i))
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -150,7 +154,6 @@ static void *tab_le_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_le *x = (t_tab_le *)pd_new(tab_le_class);
t_symbol *src1, *src2, *dst;
- t_float time;
if((argc >= 3) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_le_scalar.c b/src/tab_le_scalar.c
index e221fcb..a88d8af 100644
--- a/src/tab_le_scalar.c
+++ b/src/tab_le_scalar.c
@@ -1,13 +1,17 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_le_scalar ------------------------------ */
+/* if(x_beg_mem_src1[i] <= compare) */
+/* x_beg_mem_dst[i] = 1.0f; */
+/* else */
+/* x_beg_mem_dst[i] += 0.0f; */
typedef struct _tab_le_scalar
{
@@ -16,8 +20,8 @@ typedef struct _tab_le_scalar
int x_size_dst;
int x_offset_src1;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_dst;
} t_tab_le_scalar;
@@ -33,7 +37,7 @@ static void tab_le_scalar_float(t_tab_le_scalar *x, t_floatarg compare)
{
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst;
+ iemarray_t *vec_src1, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_le_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_le_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -53,10 +57,10 @@ static void tab_le_scalar_float(t_tab_le_scalar *x, t_floatarg compare)
for(i=0; i<n; i++)
{
- if(vec_src1[i] <= compare)
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) <= compare)
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -75,7 +79,8 @@ static void tab_le_scalar_list(t_tab_le_scalar *x, t_symbol *s, int argc, t_atom
int beg_src1, beg_dst;
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst, compare;
+ t_float compare;
+ iemarray_t *vec_src1, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -107,10 +112,10 @@ static void tab_le_scalar_list(t_tab_le_scalar *x, t_symbol *s, int argc, t_atom
for(i=0; i<n; i++)
{
- if(vec_src1[i] <= compare)
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) <= compare)
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
diff --git a/src/tab_lt.c b/src/tab_lt.c
index 34f1a49..81f3e68 100644
--- a/src/tab_lt.c
+++ b/src/tab_lt.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
@@ -9,6 +9,10 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
#include "iem_tab.h"
/* -------------------------- tab_lt ------------------------------ */
+/* if(x_beg_mem_src1[i] < x_beg_mem_src2[i]) */
+/* x_beg_mem_dst[i] = 1.0f; */
+/* else */
+/* x_beg_mem_dst[i] = 0.0f; */
typedef struct _tab_lt
{
@@ -19,9 +23,9 @@ typedef struct _tab_lt
int x_offset_src1;
int x_offset_src2;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_src2;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src2;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_scr2;
t_symbol *x_sym_dst;
@@ -48,7 +52,7 @@ static void tab_lt_bang(t_tab_lt *x)
{
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_lt"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_src2 = iem_tab_check_arrays(gensym("tab_lt"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0);
@@ -72,10 +76,10 @@ static void tab_lt_bang(t_tab_lt *x)
for(i=0; i<n; i++)
{
- if(vec_src1[i] < vec_src2[i])
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) < iemarray_getfloat(vec_src2, i))
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -89,7 +93,7 @@ static void tab_lt_list(t_tab_lt *x, t_symbol *s, int argc, t_atom *argv)
int beg_src1, beg_src2, beg_dst;
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -125,10 +129,10 @@ static void tab_lt_list(t_tab_lt *x, t_symbol *s, int argc, t_atom *argv)
for(i=0; i<n; i++)
{
- if(vec_src1[i] < vec_src2[i])
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) < iemarray_getfloat(vec_src2, i))
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -151,7 +155,6 @@ static void *tab_lt_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_lt *x = (t_tab_lt *)pd_new(tab_lt_class);
t_symbol *src1, *src2, *dst;
- t_float time;
if((argc >= 3) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_lt_scalar.c b/src/tab_lt_scalar.c
index c335565..1605366 100644
--- a/src/tab_lt_scalar.c
+++ b/src/tab_lt_scalar.c
@@ -1,13 +1,17 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_lt_scalar ------------------------------ */
+/* if(x_beg_mem_src1[i] < compare) */
+/* x_beg_mem_dst[i] = 1.0f; */
+/* else */
+/* x_beg_mem_dst[i] += 0.0f; */
typedef struct _tab_lt_scalar
{
@@ -16,8 +20,8 @@ typedef struct _tab_lt_scalar
int x_size_dst;
int x_offset_src1;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_dst;
} t_tab_lt_scalar;
@@ -33,7 +37,7 @@ static void tab_lt_scalar_float(t_tab_lt_scalar *x, t_floatarg compare)
{
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst;
+ iemarray_t *vec_src1, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_lt_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_lt_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -53,10 +57,10 @@ static void tab_lt_scalar_float(t_tab_lt_scalar *x, t_floatarg compare)
for(i=0; i<n; i++)
{
- if(vec_src1[i] < compare)
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) < compare)
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -75,7 +79,8 @@ static void tab_lt_scalar_list(t_tab_lt_scalar *x, t_symbol *s, int argc, t_atom
int beg_src1, beg_dst;
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst, compare;
+ t_float compare;
+ iemarray_t *vec_src1, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -107,10 +112,10 @@ static void tab_lt_scalar_list(t_tab_lt_scalar *x, t_symbol *s, int argc, t_atom
for(i=0; i<n; i++)
{
- if(vec_src1[i] < compare)
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) < compare)
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
diff --git a/src/tab_max_index.c b/src/tab_max_index.c
index 8da656b..c249ee1 100644
--- a/src/tab_max_index.c
+++ b/src/tab_max_index.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -14,7 +14,7 @@ typedef struct _tab_max_index
t_object x_obj;
int x_size_src1;
int x_offset_src1;
- t_float *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src1;
t_symbol *x_sym_scr1;
void *x_bang_out;
void *x_max_out;
@@ -32,7 +32,7 @@ static void tab_max_index_bang(t_tab_max_index *x)
{
int i, n;
int ok_src, max_index=0;
- t_float *vec_src;
+ iemarray_t *vec_src;
t_float max=-1.0e37;
ok_src = iem_tab_check_arrays(gensym("tab_max_index"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
@@ -45,9 +45,9 @@ static void tab_max_index_bang(t_tab_max_index *x)
{
for(i=0; i<n; i++)
{
- if(vec_src[i] > max)
+ if(iemarray_getfloat(vec_src, i) > max)
{
- max = vec_src[i];
+ max = iemarray_getfloat(vec_src, i);
max_index = i;
}
}
@@ -63,7 +63,7 @@ static void tab_max_index_list(t_tab_max_index *x, t_symbol *s, int argc, t_atom
int beg_src;
int i, n;
int ok_src, max_index=0;
- t_float *vec_src;
+ iemarray_t *vec_src;
t_float max=-1.0e37;
if((argc >= 2) &&
@@ -86,9 +86,9 @@ static void tab_max_index_list(t_tab_max_index *x, t_symbol *s, int argc, t_atom
{
for(i=0; i<n; i++)
{
- if(vec_src[i] > max)
+ if(iemarray_getfloat(vec_src, i) > max)
{
- max = vec_src[i];
+ max = iemarray_getfloat(vec_src, i);
max_index = i + beg_src;
}
}
diff --git a/src/tab_min_index.c b/src/tab_min_index.c
index 3a5c340..ad6c34e 100644
--- a/src/tab_min_index.c
+++ b/src/tab_min_index.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
@@ -15,7 +15,7 @@ typedef struct _tab_min_index
t_object x_obj;
int x_size_src1;
int x_offset_src1;
- t_float *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src1;
t_symbol *x_sym_scr1;
void *x_bang_out;
void *x_min_out;
@@ -33,7 +33,7 @@ static void tab_min_index_bang(t_tab_min_index *x)
{
int i, n;
int ok_src, min_index=0;
- t_float *vec_src;
+ iemarray_t *vec_src;
t_float min=1.0e37;
ok_src = iem_tab_check_arrays(gensym("tab_min_index"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
@@ -46,9 +46,9 @@ static void tab_min_index_bang(t_tab_min_index *x)
{
for(i=0; i<n; i++)
{
- if(vec_src[i] < min)
+ if(iemarray_getfloat(vec_src, i) < min)
{
- min = vec_src[i];
+ min = iemarray_getfloat(vec_src, i);
min_index = i;
}
}
@@ -64,7 +64,7 @@ static void tab_min_index_list(t_tab_min_index *x, t_symbol *s, int argc, t_atom
int beg_src;
int i, n;
int ok_src, min_index=0;
- t_float *vec_src;
+ iemarray_t *vec_src;
t_float min=1.0e37;
if((argc >= 2) &&
@@ -87,9 +87,9 @@ static void tab_min_index_list(t_tab_min_index *x, t_symbol *s, int argc, t_atom
{
for(i=0; i<n; i++)
{
- if(vec_src[i] < min)
+ if(iemarray_getfloat(vec_src, i) < min)
{
- min = vec_src[i];
+ min = iemarray_getfloat(vec_src, i);
min_index = i + beg_src;
}
}
diff --git a/src/tab_min_max.c b/src/tab_min_max.c
index 2a9a402..c79e068 100644
--- a/src/tab_min_max.c
+++ b/src/tab_min_max.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
@@ -16,7 +16,7 @@ typedef struct _tab_min_max
t_object x_obj;
int x_size_src1;
int x_offset_src1;
- t_float *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src1;
t_symbol *x_sym_scr1;
void *x_bang_out;
void *x_min_out;
@@ -34,7 +34,7 @@ static void tab_min_max_bang(t_tab_min_max *x)
{
int i, n;
int ok_src;
- t_float *vec_src;
+ iemarray_t *vec_src;
t_float min=1.0e37, max=-1.0e37;
ok_src = iem_tab_check_arrays(gensym("tab_min_max"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
@@ -47,10 +47,10 @@ static void tab_min_max_bang(t_tab_min_max *x)
{
for(i=0; i<n; i++)
{
- if(vec_src[i] > max)
- max = vec_src[i];
- if(vec_src[i] < min)
- min = vec_src[i];
+ if(iemarray_getfloat(vec_src, i) > max)
+ max = iemarray_getfloat(vec_src, i);
+ if(iemarray_getfloat(vec_src, i) < min)
+ min = iemarray_getfloat(vec_src, i);
}
outlet_float(x->x_max_out, max);
outlet_float(x->x_min_out, min);
@@ -64,7 +64,7 @@ static void tab_min_max_list(t_tab_min_max *x, t_symbol *s, int argc, t_atom *ar
int beg_src;
int i, n;
int ok_src;
- t_float *vec_src;
+ iemarray_t *vec_src;
t_float min=1.0e37, max=-1.0e37;
if((argc >= 2) &&
@@ -87,10 +87,10 @@ static void tab_min_max_list(t_tab_min_max *x, t_symbol *s, int argc, t_atom *ar
{
for(i=0; i<n; i++)
{
- if(vec_src[i] > max)
- max = vec_src[i];
- if(vec_src[i] < min)
- min = vec_src[i];
+ if(iemarray_getfloat(vec_src, i) > max)
+ max = iemarray_getfloat(vec_src, i);
+ if(iemarray_getfloat(vec_src, i) < min)
+ min = iemarray_getfloat(vec_src, i);
}
outlet_float(x->x_max_out, max);
outlet_float(x->x_min_out, min);
diff --git a/src/tab_mls.c b/src/tab_mls.c
index e78dc1e..449f3d3 100644
--- a/src/tab_mls.c
+++ b/src/tab_mls.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -15,7 +15,7 @@ typedef struct _tab_mls
t_object x_obj;
int x_size_dst;
int x_offset_dst;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_dst;
} t_tab_mls;
@@ -30,7 +30,7 @@ static int tab_mls_exp2(int mls_order)
return(j);
}
-static void tab_mls_calc(t_float *vec, int mls_order)
+static void tab_mls_calc(iemarray_t *vec, int mls_order)
{
int i, j;
int work1=1, work2, exor;
@@ -126,12 +126,12 @@ static void tab_mls_calc(t_float *vec, int mls_order)
}
if(exor & 1)
{
- vec[i] = 1.0f;
+ iemarray_setfloat(vec, i, 1.0f);
work1 = work2 | source;
}
else
{
- vec[i] = -1.0f;
+ iemarray_setfloat(vec, i, -1.0f);
work1 = work2;
}
}
@@ -170,7 +170,8 @@ static void tab_mls_list(t_tab_mls *x, t_symbol *s, int argc, t_atom *argv)
int beg_dst;
int i, n;
int ok_dst;
- t_float *vec_dst, c;
+ t_float c;
+ iemarray_t *vec_dst;
if((argc >= 3) &&
IS_A_FLOAT(argv,0) &&
@@ -195,7 +196,7 @@ static void tab_mls_list(t_tab_mls *x, t_symbol *s, int argc, t_atom *argv)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = c;
+ iemarray_setfloat(vec_dst, i, c);
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
diff --git a/src/tab_mul.c b/src/tab_mul.c
index 38b401a..d684de0 100644
--- a/src/tab_mul.c
+++ b/src/tab_mul.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -9,6 +9,7 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
/* -------------------------- tab_mul ------------------------------ */
+/* x_beg_mem_dst[i] = x_beg_mem_src1[i]*x_offset_src2[i] */
typedef struct _tab_mul
{
@@ -19,9 +20,9 @@ typedef struct _tab_mul
int x_offset_src1;
int x_offset_src2;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_src2;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src2;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_scr2;
t_symbol *x_sym_dst;
@@ -48,7 +49,7 @@ static void tab_mul_bang(t_tab_mul *x)
{
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_mul"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_src2 = iem_tab_check_arrays(gensym("tab_mul"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0);
@@ -71,7 +72,7 @@ static void tab_mul_bang(t_tab_mul *x)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = vec_src1[i]*vec_src2[i];
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src1, i)*iemarray_getfloat(vec_src2, i));
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -84,7 +85,7 @@ static void tab_mul_list(t_tab_mul *x, t_symbol *s, int argc, t_atom *argv)
int beg_src1, beg_src2, beg_dst;
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -119,7 +120,7 @@ static void tab_mul_list(t_tab_mul *x, t_symbol *s, int argc, t_atom *argv)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = vec_src1[i]*vec_src2[i];
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src1, i)*iemarray_getfloat(vec_src2, i));
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -141,7 +142,6 @@ static void *tab_mul_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_mul *x = (t_tab_mul *)pd_new(tab_mul_class);
t_symbol *src1, *src2, *dst;
- t_float time;
if((argc >= 3) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_mul_scalar.c b/src/tab_mul_scalar.c
index 7bb1855..c642237 100644
--- a/src/tab_mul_scalar.c
+++ b/src/tab_mul_scalar.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -9,6 +9,7 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
/* -------------------------- tab_mul_scalar ------------------------------ */
+/* x_beg_mem_dst[i] = x_beg_mem_src1[i]*m */
typedef struct _tab_mul_scalar
{
@@ -17,8 +18,8 @@ typedef struct _tab_mul_scalar
int x_size_dst;
int x_offset_src1;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_dst;
} t_tab_mul_scalar;
@@ -34,7 +35,7 @@ static void tab_mul_scalar_float(t_tab_mul_scalar *x, t_floatarg m)
{
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst;
+ iemarray_t *vec_src1, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_mul_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_mul_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -71,7 +72,8 @@ static void tab_mul_scalar_list(t_tab_mul_scalar *x, t_symbol *s, int argc, t_at
int beg_src1, beg_dst;
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst, m;
+ t_float m;
+ iemarray_t *vec_src1, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
diff --git a/src/tab_ne.c b/src/tab_ne.c
index bd4f6de..4239d8a 100644
--- a/src/tab_ne.c
+++ b/src/tab_ne.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
@@ -9,6 +9,10 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
#include "iem_tab.h"
/* -------------------------- tab_ne ------------------------------ */
+/* if(x_beg_mem_src1[i] != x_beg_mem_src2[i]) */
+/* x_beg_mem_dst[i] = 1.0f; */
+/* else */
+/* x_beg_mem_dst[i] = 0.0f; */
typedef struct _tab_ne
{
@@ -19,9 +23,9 @@ typedef struct _tab_ne
int x_offset_src1;
int x_offset_src2;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_src2;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src2;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_scr2;
t_symbol *x_sym_dst;
@@ -48,7 +52,7 @@ static void tab_ne_bang(t_tab_ne *x)
{
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_ne"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_src2 = iem_tab_check_arrays(gensym("tab_ne"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0);
@@ -72,10 +76,10 @@ static void tab_ne_bang(t_tab_ne *x)
for(i=0; i<n; i++)
{
- if(vec_src1[i] != vec_src2[i])
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) != iemarray_getfloat(vec_src2, i))
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -89,7 +93,7 @@ static void tab_ne_list(t_tab_ne *x, t_symbol *s, int argc, t_atom *argv)
int beg_src1, beg_src2, beg_dst;
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -125,10 +129,10 @@ static void tab_ne_list(t_tab_ne *x, t_symbol *s, int argc, t_atom *argv)
for(i=0; i<n; i++)
{
- if(vec_src1[i] != vec_src2[i])
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) != iemarray_getfloat(vec_src2, i))
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -151,7 +155,6 @@ static void *tab_ne_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_ne *x = (t_tab_ne *)pd_new(tab_ne_class);
t_symbol *src1, *src2, *dst;
- t_float time;
if((argc >= 3) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_ne_scalar.c b/src/tab_ne_scalar.c
index a7597c3..c0eec06 100644
--- a/src/tab_ne_scalar.c
+++ b/src/tab_ne_scalar.c
@@ -1,13 +1,17 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_ne_scalar ------------------------------ */
+/* if(x_beg_mem_src1[i] != compare) */
+/* x_beg_mem_dst[i] = 1.0f; */
+/* else */
+/* x_beg_mem_dst[i] += 0.0f; */
typedef struct _tab_ne_scalar
{
@@ -16,8 +20,8 @@ typedef struct _tab_ne_scalar
int x_size_dst;
int x_offset_src1;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_dst;
} t_tab_ne_scalar;
@@ -33,7 +37,7 @@ static void tab_ne_scalar_float(t_tab_ne_scalar *x, t_floatarg compare)
{
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst;
+ iemarray_t *vec_src1, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_ne_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_ne_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -53,10 +57,10 @@ static void tab_ne_scalar_float(t_tab_ne_scalar *x, t_floatarg compare)
for(i=0; i<n; i++)
{
- if(vec_src1[i] != compare)
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) != compare)
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
@@ -75,7 +79,8 @@ static void tab_ne_scalar_list(t_tab_ne_scalar *x, t_symbol *s, int argc, t_atom
int beg_src1, beg_dst;
int i, n;
int ok_src1, ok_dst;
- t_float *vec_src1, *vec_dst, compare;
+ t_float compare;
+ iemarray_t *vec_src1, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -107,10 +112,10 @@ static void tab_ne_scalar_list(t_tab_ne_scalar *x, t_symbol *s, int argc, t_atom
for(i=0; i<n; i++)
{
- if(vec_src1[i] != compare)
- vec_dst[i] = 1.0f;
+ if(iemarray_getfloat(vec_src1, i) != compare)
+ iemarray_setfloat(vec_dst, i, 1.0f);
else
- vec_dst[i] = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
diff --git a/src/tab_reverse.c b/src/tab_reverse.c
index af42c94..fb7fdf2 100644
--- a/src/tab_reverse.c
+++ b/src/tab_reverse.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
@@ -18,8 +18,8 @@ typedef struct _tab_reverse
int x_size_dst;
int x_offset_src1;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_dst;
} t_tab_reverse;
@@ -38,9 +38,10 @@ static void tab_reverse_dst(t_tab_reverse *x, t_symbol *s)
static void tab_reverse_bang(t_tab_reverse *x)
{
- int i, j, n;
+ int i, j, n, n2;
int ok_src, ok_dst;
- t_float *vec_src, *vec_dst;
+ iemarray_t *vec_src, *vec_dst;
+ t_float f;
ok_src = iem_tab_check_arrays(gensym("tab_reverse"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_reverse"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -53,12 +54,17 @@ static void tab_reverse_bang(t_tab_reverse *x)
n = x->x_size_dst;
vec_src = x->x_beg_mem_src1;
vec_dst = x->x_beg_mem_dst;
+ n2 = n/2;
if(n)
{
t_garray *a;
- for(i=0, j=n-1; i<n; i++, j--)
- vec_dst[i] = vec_src[j];
+ for(i=0, j=n-1; i<n2; i++, j--)
+ {
+ f = iemarray_getfloat(vec_src, i);
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src, j));
+ iemarray_setfloat(vec_dst, j, f);
+ }
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -69,9 +75,10 @@ static void tab_reverse_bang(t_tab_reverse *x)
static void tab_reverse_list(t_tab_reverse *x, t_symbol *s, int argc, t_atom *argv)
{
int beg_src, beg_dst;
- int i, j, n;
+ int i, j, n, n2;
int ok_src, ok_dst;
- t_float *vec_src, *vec_dst;
+ iemarray_t *vec_src, *vec_dst;
+ t_float f;
if((argc >= 3) &&
IS_A_FLOAT(argv,0) &&
@@ -95,12 +102,17 @@ static void tab_reverse_list(t_tab_reverse *x, t_symbol *s, int argc, t_atom *ar
{
vec_src = x->x_beg_mem_src1 + beg_src;
vec_dst = x->x_beg_mem_dst + beg_dst;
+ n2 = n/2;
if(n)
{
t_garray *a;
- for(i=0, j=n-1; i<n; i++, j--)
- vec_dst[i] = vec_src[j];
+ for(i=0, j=n-1; i<n2; i++, j--)
+ {
+ f = iemarray_getfloat(vec_src, i);
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src, j));
+ iemarray_setfloat(vec_dst, j, f);
+ }
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
diff --git a/src/tab_rfft.c b/src/tab_rfft.c
index 353b047..1a3608f 100644
--- a/src/tab_rfft.c
+++ b/src/tab_rfft.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -10,6 +10,7 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
/* -------------------------- tab_rfft ------------------------------ */
+/* real time domain FFT to complex spectral domain */
typedef struct _tab_rfft
{
@@ -21,9 +22,9 @@ typedef struct _tab_rfft
int x_offset_dst_re;
int x_offset_dst_im;
int x_fftsize;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst_re;
- t_float *x_beg_mem_dst_im;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst_re;
+ iemarray_t *x_beg_mem_dst_im;
TAB_COMPLEX *x_sin_cos;
t_symbol *x_sym_src1;
t_symbol *x_sym_dst_re;
@@ -92,7 +93,7 @@ static void tab_rfft_bang(t_tab_rfft *x)
int fs2 = fftsize / 2;
TAB_COMPLEX w;
TAB_COMPLEX *sincos = x->x_sin_cos;
- t_float *vec_src, *vec_dst_re, *vec_dst_im;
+ iemarray_t *vec_src, *vec_dst_re, *vec_dst_im;
t_float old1_re, old1_im, old2_re, old2_im;
ok_src = iem_tab_check_arrays(gensym("tab_rfft"), x->x_sym_src1, &x->x_beg_mem_src1, &x->x_size_src1, fftsize);
@@ -108,8 +109,8 @@ static void tab_rfft_bang(t_tab_rfft *x)
for(k=0; k<fftsize; k++)
{
- vec_dst_re[k] = vec_src[k];
- vec_dst_im[k] = 0.0f;
+ iemarray_setfloat(vec_dst_re, k, iemarray_getfloat(vec_src, k));
+ iemarray_setfloat(vec_dst_im, k, 0.0f);
}
i_inc = fs2;
@@ -122,15 +123,16 @@ static void tab_rfft_bang(t_tab_rfft *x)
w_index = 0;
for(k=0; k<i_inc; k++)
{
- old1_re = vec_dst_re[v_index];
- old1_im = vec_dst_im[v_index];
- old2_re = vec_dst_re[v_index+i_inc];
- old2_im = vec_dst_im[v_index+i_inc];
+ old1_re = iemarray_getfloat(vec_dst_re, v_index);
+ old1_im = iemarray_getfloat(vec_dst_im, v_index);
+ old2_re = iemarray_getfloat(vec_dst_re, v_index+i_inc);
+ old2_im = iemarray_getfloat(vec_dst_im, v_index+i_inc);
+
w = sincos[w_index];
- vec_dst_re[v_index+i_inc] = (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag;
- vec_dst_im[v_index+i_inc] = (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag;
- vec_dst_re[v_index] = old1_re + old2_re;
- vec_dst_im[v_index] = old1_im + old2_im;
+ iemarray_setfloat(vec_dst_re, v_index+i_inc, (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag);
+ iemarray_setfloat(vec_dst_im, v_index+i_inc, (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag);
+ iemarray_setfloat(vec_dst_re, v_index, old1_re + old2_re);
+ iemarray_setfloat(vec_dst_im, v_index, old1_im + old2_im);
w_index += w_inc;
v_index++;
}
@@ -152,12 +154,12 @@ static void tab_rfft_bang(t_tab_rfft *x)
j = j + k;
if(i < j)
{
- old1_re = vec_dst_re[j];
- old1_im = vec_dst_im[j];
- vec_dst_re[j] = vec_dst_re[i];
- vec_dst_im[j] = vec_dst_im[i];
- vec_dst_re[i] = old1_re;
- vec_dst_im[i] = old1_im;
+ old1_re = iemarray_getfloat(vec_dst_re, j);
+ old1_im = iemarray_getfloat(vec_dst_im, j);
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i));
+ iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i));
+ iemarray_setfloat(vec_dst_re, i, old1_re);
+ iemarray_setfloat(vec_dst_im, i, old1_im);
}
}
@@ -174,11 +176,12 @@ static void tab_rfft_bang(t_tab_rfft *x)
}
*/
- vec_dst_im[fs2] = 0.0f;
+ iemarray_setfloat(vec_dst_im, 0, 0.0f);
+ iemarray_setfloat(vec_dst_im, fs2, 0.0f);
for(i = fs2+1; i < fftsize; i++)
{
- vec_dst_re[i] = 0.0f;
- vec_dst_im[i] = 0.0f;
+ iemarray_setfloat(vec_dst_re, i, 0.0f);
+ iemarray_setfloat(vec_dst_im, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
@@ -200,7 +203,7 @@ static void tab_rfft_list(t_tab_rfft *x, t_symbol *s, int argc, t_atom *argv)
int fs2 = fftsize / 2;
TAB_COMPLEX w;
TAB_COMPLEX *sincos = x->x_sin_cos;
- t_float *vec_src, *vec_dst_re, *vec_dst_im;
+ iemarray_t *vec_src, *vec_dst_re, *vec_dst_im;
t_float old1_re, old1_im, old2_re, old2_im;
if((argc >= 3) &&
@@ -232,8 +235,8 @@ static void tab_rfft_list(t_tab_rfft *x, t_symbol *s, int argc, t_atom *argv)
for(k=0; k<fftsize; k++)
{
- vec_dst_re[k] = vec_src[k];
- vec_dst_im[k] = 0.0f;
+ iemarray_setfloat(vec_dst_re, k, iemarray_getfloat(vec_src, k));
+ iemarray_setfloat(vec_dst_im, k, 0.0f);
}
i_inc = fs2;
@@ -246,15 +249,16 @@ static void tab_rfft_list(t_tab_rfft *x, t_symbol *s, int argc, t_atom *argv)
w_index = 0;
for(k=0; k<i_inc; k++)
{
- old1_re = vec_dst_re[v_index];
- old1_im = vec_dst_im[v_index];
- old2_re = vec_dst_re[v_index+i_inc];
- old2_im = vec_dst_im[v_index+i_inc];
+ old1_re = iemarray_getfloat(vec_dst_re, v_index);
+ old1_im = iemarray_getfloat(vec_dst_im, v_index);
+ old2_re = iemarray_getfloat(vec_dst_re, v_index+i_inc);
+ old2_im = iemarray_getfloat(vec_dst_im, v_index+i_inc);
+
w = sincos[w_index];
- vec_dst_re[v_index+i_inc] = (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag;
- vec_dst_im[v_index+i_inc] = (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag;
- vec_dst_re[v_index] = old1_re + old2_re;
- vec_dst_im[v_index] = old1_im + old2_im;
+ iemarray_setfloat(vec_dst_re, v_index+i_inc, (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag);
+ iemarray_setfloat(vec_dst_im, v_index+i_inc, (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag);
+ iemarray_setfloat(vec_dst_re, v_index, old1_re + old2_re);
+ iemarray_setfloat(vec_dst_im, v_index, old1_im + old2_im);
w_index += w_inc;
v_index++;
}
@@ -276,12 +280,12 @@ static void tab_rfft_list(t_tab_rfft *x, t_symbol *s, int argc, t_atom *argv)
j = j + k;
if(i < j)
{
- old1_re = vec_dst_re[j];
- old1_im = vec_dst_im[j];
- vec_dst_re[j] = vec_dst_re[i];
- vec_dst_im[j] = vec_dst_im[i];
- vec_dst_re[i] = old1_re;
- vec_dst_im[i] = old1_im;
+ old1_re = iemarray_getfloat(vec_dst_re, j);
+ old1_im = iemarray_getfloat(vec_dst_im, j);
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i));
+ iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i));
+ iemarray_setfloat(vec_dst_re, i, old1_re);
+ iemarray_setfloat(vec_dst_im, i, old1_im);
}
}
@@ -298,11 +302,12 @@ static void tab_rfft_list(t_tab_rfft *x, t_symbol *s, int argc, t_atom *argv)
}
*/
- vec_dst_im[fs2] = 0.0f;
+ iemarray_setfloat(vec_dst_im, 0, 0.0f);
+ iemarray_setfloat(vec_dst_im, fs2, 0.0f);
for(i = fs2+1; i < fftsize; i++)
{
- vec_dst_re[i] = 0.0f;
- vec_dst_im[i] = 0.0f;
+ iemarray_setfloat(vec_dst_re, i, 0.0f);
+ iemarray_setfloat(vec_dst_im, i, 0.0f);
}
outlet_bang(x->x_obj.ob_outlet);
diff --git a/src/tab_rifft.c b/src/tab_rifft.c
index 9b717a1..0730ef1 100644
--- a/src/tab_rifft.c
+++ b/src/tab_rifft.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -10,6 +10,7 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
/* -------------------------- tab_rifft ------------------------------ */
+/* complex spectral domain inverse FFT to real time domain */
typedef struct _tab_rifft
{
@@ -21,10 +22,10 @@ typedef struct _tab_rifft
int x_offset_src_im;
int x_offset_dst;
int x_fftsize;
- t_float *x_beg_mem_src_re;
- t_float *x_beg_mem_src_im;
- t_float *x_beg_mem_dst_re;
- t_float *x_beg_mem_dst_im;
+ iemarray_t *x_beg_mem_src_re;
+ iemarray_t *x_beg_mem_src_im;
+ iemarray_t *x_beg_mem_dst_re;
+ iemarray_t *x_beg_mem_dst_im;
TAB_COMPLEX *x_sin_cos;
t_symbol *x_sym_src_re;
t_symbol *x_sym_src_im;
@@ -94,7 +95,7 @@ static void tab_rifft_bang(t_tab_rifft *x)
int fs2 = fftsize / 2;
TAB_COMPLEX w;
TAB_COMPLEX *sincos = x->x_sin_cos;
- t_float *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im;
+ iemarray_t *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im;
t_float old1_re, old1_im, old2_re, old2_im, g;
ok_src_re = iem_tab_check_arrays(gensym("tab_rifft"), x->x_sym_src_re, &x->x_beg_mem_src_re, &x->x_size_src_re, fftsize);
@@ -110,17 +111,20 @@ static void tab_rifft_bang(t_tab_rifft *x)
vec_dst_re=x->x_beg_mem_dst_re;
vec_dst_im=x->x_beg_mem_dst_im;
- for(j=0; j<fs2; j++)
+ iemarray_setfloat(vec_dst_re, 0, iemarray_getfloat(vec_src_re, 0));
+ iemarray_setfloat(vec_dst_im, 0, 0.0f);
+ for(j=1; j<fs2; j++)
{
- vec_dst_re[j] = vec_src_re[j];
- vec_dst_im[j] = vec_src_im[j];
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_src_re, j));
+ iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_src_im, j));
}
- vec_dst_re[fs2] = vec_src_re[fs2];
- vec_dst_im[fs2] = 0.0f;
+ iemarray_setfloat(vec_dst_re, fs2, iemarray_getfloat(vec_src_re, fs2));
+ iemarray_setfloat(vec_dst_im, fs2, 0.0f);
+
for(k=1, j=fftsize-1; k<fs2; k++, j--)
{
- vec_dst_re[j] = vec_src_re[k];
- vec_dst_im[j] = -vec_src_im[k];
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, k));
+ iemarray_setfloat(vec_dst_im, j, -iemarray_getfloat(vec_dst_im, k));
}
i_inc = fs2;
@@ -133,15 +137,16 @@ static void tab_rifft_bang(t_tab_rifft *x)
w_index = 0;
for(k=0; k<i_inc; k++)
{
- old1_re = vec_dst_re[v_index];
- old1_im = vec_dst_im[v_index];
- old2_re = vec_dst_re[v_index+i_inc];
- old2_im = vec_dst_im[v_index+i_inc];
+ old1_re = iemarray_getfloat(vec_dst_re, v_index);
+ old1_im = iemarray_getfloat(vec_dst_im, v_index);
+ old2_re = iemarray_getfloat(vec_dst_re, v_index+i_inc);
+ old2_im = iemarray_getfloat(vec_dst_im, v_index+i_inc);
+
w = sincos[w_index];
- vec_dst_re[v_index+i_inc] = (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag;
- vec_dst_im[v_index+i_inc] = (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag;
- vec_dst_re[v_index] = old1_re + old2_re;
- vec_dst_im[v_index] = old1_im + old2_im;
+ iemarray_setfloat(vec_dst_re, v_index+i_inc, (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag);
+ iemarray_setfloat(vec_dst_im, v_index+i_inc, (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag);
+ iemarray_setfloat(vec_dst_re, v_index, old1_re + old2_re);
+ iemarray_setfloat(vec_dst_im, v_index, old1_im + old2_im);
w_index += w_inc;
v_index++;
}
@@ -163,12 +168,12 @@ static void tab_rifft_bang(t_tab_rifft *x)
j = j + k;
if(i < j)
{
- old1_re = vec_dst_re[j];
- old1_im = vec_dst_im[j];
- vec_dst_re[j] = vec_dst_re[i];
- vec_dst_im[j] = vec_dst_im[i];
- vec_dst_re[i] = old1_re;
- vec_dst_im[i] = old1_im;
+ old1_re = iemarray_getfloat(vec_dst_re, j);
+ old1_im = iemarray_getfloat(vec_dst_im, j);
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i));
+ iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i));
+ iemarray_setfloat(vec_dst_re, i, old1_re);
+ iemarray_setfloat(vec_dst_im, i, old1_im);
}
}
@@ -188,7 +193,7 @@ static void tab_rifft_bang(t_tab_rifft *x)
g = 1.0f / (t_float)fftsize;
for(i = 0; i < fftsize; i++)
{
- vec_dst_re[i] *= g;
+ iemarray_setfloat(vec_dst_re, i, iemarray_getfloat(vec_dst_re, i)*g);
}
outlet_bang(x->x_obj.ob_outlet);
@@ -208,7 +213,7 @@ static void tab_rifft_list(t_tab_rifft *x, t_symbol *s, int argc, t_atom *argv)
int fs2 = fftsize / 2;
TAB_COMPLEX w;
TAB_COMPLEX *sincos = x->x_sin_cos;
- t_float *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im;
+ iemarray_t *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im;
t_float old1_re, old1_im, old2_re, old2_im, g;
if((argc >= 3) &&
@@ -241,15 +246,15 @@ static void tab_rifft_list(t_tab_rifft *x, t_symbol *s, int argc, t_atom *argv)
for(j=0; j<fs2; j++)
{
- vec_dst_re[j] = vec_src_re[j];
- vec_dst_im[j] = vec_src_im[j];
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_src_re, j));
+ iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_src_im, j));
}
- vec_dst_re[fs2] = vec_src_re[fs2];
- vec_dst_im[fs2] = 0.0f;
+ iemarray_setfloat(vec_dst_re, fs2, iemarray_getfloat(vec_src_re, fs2));
+ iemarray_setfloat(vec_dst_im, fs2, 0.0f);
for(k=1, j=fftsize-1; k<fs2; k++, j--)
{
- vec_dst_re[j] = vec_src_re[k];
- vec_dst_im[j] = -vec_src_im[k];
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_src_re, k));
+ iemarray_setfloat(vec_dst_im, j, -iemarray_getfloat(vec_src_im, k));
}
i_inc = fs2;
@@ -262,15 +267,16 @@ static void tab_rifft_list(t_tab_rifft *x, t_symbol *s, int argc, t_atom *argv)
w_index = 0;
for(k=0; k<i_inc; k++)
{
- old1_re = vec_dst_re[v_index];
- old1_im = vec_dst_im[v_index];
- old2_re = vec_dst_re[v_index+i_inc];
- old2_im = vec_dst_im[v_index+i_inc];
+ old1_re = iemarray_getfloat(vec_dst_re, v_index);
+ old1_im = iemarray_getfloat(vec_dst_im, v_index);
+ old2_re = iemarray_getfloat(vec_dst_re, v_index+i_inc);
+ old2_im = iemarray_getfloat(vec_dst_im, v_index+i_inc);
+
w = sincos[w_index];
- vec_dst_re[v_index+i_inc] = (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag;
- vec_dst_im[v_index+i_inc] = (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag;
- vec_dst_re[v_index] = old1_re + old2_re;
- vec_dst_im[v_index] = old1_im + old2_im;
+ iemarray_setfloat(vec_dst_re, v_index+i_inc, (old1_re - old2_re)*w.real - (old1_im - old2_im)*w.imag);
+ iemarray_setfloat(vec_dst_im, v_index+i_inc, (old1_im - old2_im)*w.real + (old1_re - old2_re)*w.imag);
+ iemarray_setfloat(vec_dst_re, v_index, old1_re + old2_re);
+ iemarray_setfloat(vec_dst_im, v_index, old1_im + old2_im);
w_index += w_inc;
v_index++;
}
@@ -292,12 +298,12 @@ static void tab_rifft_list(t_tab_rifft *x, t_symbol *s, int argc, t_atom *argv)
j = j + k;
if(i < j)
{
- old1_re = vec_dst_re[j];
- old1_im = vec_dst_im[j];
- vec_dst_re[j] = vec_dst_re[i];
- vec_dst_im[j] = vec_dst_im[i];
- vec_dst_re[i] = old1_re;
- vec_dst_im[i] = old1_im;
+ old1_re = iemarray_getfloat(vec_dst_re, j);
+ old1_im = iemarray_getfloat(vec_dst_im, j);
+ iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i));
+ iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i));
+ iemarray_setfloat(vec_dst_re, i, old1_re);
+ iemarray_setfloat(vec_dst_im, i, old1_im);
}
}
@@ -317,7 +323,7 @@ static void tab_rifft_list(t_tab_rifft *x, t_symbol *s, int argc, t_atom *argv)
g = 1.0f / (t_float)fftsize;
for(i = 0; i < fftsize; i++)
{
- vec_dst_re[i] *= g;
+ iemarray_setfloat(vec_dst_re, i, iemarray_getfloat(vec_dst_re, i)*g);
}
outlet_bang(x->x_obj.ob_outlet);
diff --git a/src/tab_sqrt.c b/src/tab_sqrt.c
index fbf4ef5..29f8889 100644
--- a/src/tab_sqrt.c
+++ b/src/tab_sqrt.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -11,6 +11,23 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
#define TABDUMTAB1SIZE 256
#define TABDUMTAB2SIZE 1024
+/* -------------------------- tab_sqrt ------------------------------ */
+/* x_beg_mem_dst[i] = sqrt(x_beg_mem_src1[i]) */
+
+typedef struct _tab_sqrt
+{
+ t_object x_obj;
+ int x_size_src1;
+ int x_size_dst;
+ int x_offset_src1;
+ int x_offset_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_dst;
+ t_symbol *x_sym_scr1;
+ t_symbol *x_sym_dst;
+} t_tab_sqrt;
+
+static t_class *tab_sqrt_class;
static t_float tab_rsqrt_exptab[TABDUMTAB1SIZE], tab_rsqrt_mantissatab[TABDUMTAB2SIZE];
static void init_tab_rsqrt(void)
@@ -34,24 +51,6 @@ static void init_tab_rsqrt(void)
}
}
-
-/* -------------------------- tab_sqrt ------------------------------ */
-
-typedef struct _tab_sqrt
-{
- t_object x_obj;
- int x_size_src1;
- int x_size_dst;
- int x_offset_src1;
- int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_dst;
- t_symbol *x_sym_scr1;
- t_symbol *x_sym_dst;
-} t_tab_sqrt;
-
-static t_class *tab_sqrt_class;
-
static void tab_sqrt_src(t_tab_sqrt *x, t_symbol *s)
{
x->x_sym_scr1 = s;
@@ -66,7 +65,7 @@ static void tab_sqrt_bang(t_tab_sqrt *x)
{
int i, n;
int ok_src, ok_dst;
- t_float *vec_src, *vec_dst;
+ iemarray_t *vec_src, *vec_dst;
ok_src = iem_tab_check_arrays(gensym("tab_sqrt"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_dst = iem_tab_check_arrays(gensym("tab_sqrt"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0);
@@ -83,18 +82,18 @@ static void tab_sqrt_bang(t_tab_sqrt *x)
{
t_garray *a;
- while(n--)
+ for(i=0; i<n; i++)
{
- t_float f = *vec_src;
- long l = *(long *)(vec_src++);
+ t_float f = iemarray_getfloat(vec_src, i);
+ long l = *(long *)(&f);
if(f < 0.0f)
- *vec_dst++ = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
else
{
t_float g = tab_rsqrt_exptab[(l >> 23) & 0xff] * tab_rsqrt_mantissatab[(l >> 13) & 0x3ff];
- *vec_dst++ = f*g*(1.5f - 0.5f * g * g * f);
+ iemarray_setfloat(vec_dst, i, f*g*(1.5f - 0.5f * g * g * f));
}
}
outlet_bang(x->x_obj.ob_outlet);
@@ -109,7 +108,7 @@ static void tab_sqrt_list(t_tab_sqrt *x, t_symbol *s, int argc, t_atom *argv)
int beg_src, beg_dst;
int i, n;
int ok_src, ok_dst;
- t_float *vec_src, *vec_dst;
+ iemarray_t *vec_src, *vec_dst;
if((argc >= 3) &&
IS_A_FLOAT(argv,0) &&
@@ -137,18 +136,18 @@ static void tab_sqrt_list(t_tab_sqrt *x, t_symbol *s, int argc, t_atom *argv)
{
t_garray *a;
- while(n--)
+ for(i=0; i<n; i++)
{
- t_float f = *vec_src;
- long l = *(long *)(vec_src++);
+ t_float f = iemarray_getfloat(vec_src, i);
+ long l = *(long *)(&f);
if(f < 0.0f)
- *vec_dst++ = 0.0f;
+ iemarray_setfloat(vec_dst, i, 0.0f);
else
{
t_float g = tab_rsqrt_exptab[(l >> 23) & 0xff] * tab_rsqrt_mantissatab[(l >> 13) & 0x3ff];
- *vec_dst++ = f*g*(1.5f - 0.5f * g * g * f);
+ iemarray_setfloat(vec_dst, i, f*g*(1.5f - 0.5f * g * g * f));
}
}
outlet_bang(x->x_obj.ob_outlet);
diff --git a/src/tab_sub.c b/src/tab_sub.c
index 8d978f7..f1efd9c 100644
--- a/src/tab_sub.c
+++ b/src/tab_sub.c
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
@@ -9,6 +9,7 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006
/* -------------------------- tab_sub ------------------------------ */
+/* x_beg_mem_dst[i] = x_beg_mem_src1[i] - x_offset_src2[i] */
typedef struct _tab_sub
{
@@ -19,9 +20,9 @@ typedef struct _tab_sub
int x_offset_src1;
int x_offset_src2;
int x_offset_dst;
- t_float *x_beg_mem_src1;
- t_float *x_beg_mem_src2;
- t_float *x_beg_mem_dst;
+ iemarray_t *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src2;
+ iemarray_t *x_beg_mem_dst;
t_symbol *x_sym_scr1;
t_symbol *x_sym_scr2;
t_symbol *x_sym_dst;
@@ -48,7 +49,7 @@ static void tab_sub_bang(t_tab_sub *x)
{
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
ok_src1 = iem_tab_check_arrays(gensym("tab_sub"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
ok_src2 = iem_tab_check_arrays(gensym("tab_sub"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0);
@@ -71,7 +72,7 @@ static void tab_sub_bang(t_tab_sub *x)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = vec_src1[i] - vec_src2[i];
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src1, i) - iemarray_getfloat(vec_src2, i));
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -84,7 +85,7 @@ static void tab_sub_list(t_tab_sub *x, t_symbol *s, int argc, t_atom *argv)
int beg_src1, beg_src2, beg_dst;
int i, n;
int ok_src1, ok_src2, ok_dst;
- t_float *vec_src1, *vec_src2, *vec_dst;
+ iemarray_t *vec_src1, *vec_src2, *vec_dst;
if((argc >= 4) &&
IS_A_FLOAT(argv,0) &&
@@ -119,7 +120,7 @@ static void tab_sub_list(t_tab_sub *x, t_symbol *s, int argc, t_atom *argv)
t_garray *a;
for(i=0; i<n; i++)
- vec_dst[i] = vec_src1[i] - vec_src2[i];
+ iemarray_setfloat(vec_dst, i, iemarray_getfloat(vec_src1, i) - iemarray_getfloat(vec_src2, i));
outlet_bang(x->x_obj.ob_outlet);
a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class);
garray_redraw(a);
@@ -141,7 +142,6 @@ static void *tab_sub_new(t_symbol *s, int argc, t_atom *argv)
{
t_tab_sub *x = (t_tab_sub *)pd_new(tab_sub_class);
t_symbol *src1, *src2, *dst;
- t_float time;
if((argc >= 3) &&
IS_A_SYMBOL(argv,0) &&
diff --git a/src/tab_sum.c b/src/tab_sum.c
index 9f41733..8054803 100644
--- a/src/tab_sum.c
+++ b/src/tab_sum.c
@@ -1,20 +1,23 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#include "m_pd.h"
#include "iemlib.h"
#include "iem_tab.h"
/* -------------------------- tab_sum ------------------------------ */
+/* sum = 0.0f; */
+/* for(i=0; i<x_size_src1; i++) */
+/* sum += x_beg_mem_src1[i]; */
typedef struct _tab_sum
{
t_object x_obj;
int x_size_src1;
int x_offset_src1;
- t_float *x_beg_mem_src1;
+ iemarray_t *x_beg_mem_src1;
t_symbol *x_sym_scr1;
void *x_bang_out;
void *x_sum_out;
@@ -31,7 +34,7 @@ static void tab_sum_bang(t_tab_sum *x)
{
int i, n;
int ok_src;
- t_float *vec_src;
+ iemarray_t *vec_src;
t_float sum=0.0f;
ok_src = iem_tab_check_arrays(gensym("tab_sum"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0);
@@ -43,9 +46,7 @@ static void tab_sum_bang(t_tab_sum *x)
if(n)
{
for(i=0; i<n; i++)
- {
- sum += vec_src[i];
- }
+ sum += iemarray_getfloat(vec_src, i);
outlet_float(x->x_sum_out, sum);
outlet_bang(x->x_bang_out);
}
@@ -57,7 +58,7 @@ static void tab_sum_list(t_tab_sum *x, t_symbol *s, int argc, t_atom *argv)
int beg_src;
int i, n;
int ok_src;
- t_float *vec_src;
+ iemarray_t *vec_src;
t_float sum=0.0f;
if((argc >= 2) &&
@@ -79,9 +80,7 @@ static void tab_sum_list(t_tab_sum *x, t_symbol *s, int argc, t_atom *argv)
if(n)
{
for(i=0; i<n; i++)
- {
- sum += vec_src[i];
- }
+ sum += iemarray_getfloat(vec_src, i);
outlet_float(x->x_sum_out, sum);
outlet_bang(x->x_bang_out);
}
diff --git a/tab_abs-help.pd b/tab_abs-help.pd
index fcf3553..c0d60f9 100644
--- a/tab_abs-help.pd
+++ b/tab_abs-help.pd
@@ -1,5 +1,5 @@
-#N canvas 116 92 782 409 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 369 22 790 417 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src 100 float 1;
#A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572
-0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144
@@ -17,7 +17,7 @@
0.357144 0.357144 0.342858 0.328572;
#X coords 0 1 99 -1 200 140 1;
#X restore 534 10 graph;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst 100 float 0;
#X coords 0 1 99 -1 200 140 1;
#X restore 534 166 graph;
@@ -36,11 +36,10 @@
#X obj 61 78 tab_abs src dst;
#X obj 59 264 tab_abs src dst;
#X text 78 365 IEM KUG;
-#X text 62 353 musil;
+#X text 57 353 musil;
#X text 92 353 @;
-#X text 98 353 iem.at;
+#X text 100 353 iem.at;
#X text 61 375 Graz \, Austria;
-#X text 13 342 (c) Thomas Musil 2000 - 2006;
#X text 12 3 tab_abs;
#X text 90 29 <bang> copy absolute-value from src to dst;
#X text 56 165 1.) src onset;
@@ -53,6 +52,7 @@
#X text 188 83 the minimum of both array lengths);
#X text 56 185 3.) n samples to copy;
#X text 190 185 absolute value;
+#X text 13 342 (c) Thomas Musil 2000 - 2009;
#X connect 2 0 11 0;
#X connect 5 0 12 0;
#X connect 9 0 12 0;
diff --git a/tab_add-help.pd b/tab_add-help.pd
index 7cf43df..f0e1030 100644
--- a/tab_add-help.pd
+++ b/tab_add-help.pd
@@ -1,5 +1,5 @@
-#N canvas 116 92 855 560 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 116 92 859 564 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src1 100 float 1;
#A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572
-0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144
@@ -17,7 +17,7 @@
0.357144 0.357144 0.342858 0.328572;
#X coords 0 1 99 -1 200 140 1;
#X restore 534 10 graph;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst 100 float 0;
#X coords 0 1 99 -1 200 140 1;
#X restore 535 358 graph;
@@ -28,13 +28,13 @@
#X obj 59 340 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 255 276 dst dst;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src2 100 float 1;
#A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136
0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573
-0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143
-0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288
--0.14286 -0.085718 -0.0428611 -4.28595e-006 0.0428526 0.099995 0.171423
+-0.14286 -0.085718 -0.0428611 -4.28595e-06 0.0428526 0.099995 0.171423
0.21428 0.257137 0.328565 0.371422 0.428564 0.457135 0.485707 0.499992
0.514278 0.499992 0.471421 0.44285 0.414279 0.357136 0.285708 0.171423
0.0999952 0.0142815 -0.100003 -0.214288 -0.314288 -0.385716 -0.457144
@@ -55,16 +55,15 @@
#X obj 61 78 tab_add src1 src2 dst;
#X obj 59 301 tab_add src1 src2 dst;
#X text 78 435 IEM KUG;
-#X text 62 423 musil;
+#X text 58 423 musil;
#X text 92 423 @;
-#X text 98 423 iem.at;
+#X text 100 423 iem.at;
#X text 61 445 Graz \, Austria;
-#X text 13 412 (c) Thomas Musil 2000 - 2006;
#X text 234 312 initial arguments:;
#X text 72 319 <bang> output;
#X text 306 275 <dst> xxx : change destination name;
#X text 12 3 tab_add;
-#X text 208 86 the minimum of the 3 array lengths);
+#X text 225 86 the minimum of the 3 array lengths);
#X text 56 177 3.) dst onset;
#X text 56 155 1.) src_1 onset;
#X text 56 166 2.) src_2 onset;
@@ -73,7 +72,8 @@
#X text 257 255 <src2> xxx : change source name 2;
#X text 211 326 1.arg: <symbol> source-name 1;
#X text 211 339 2.arg: <symbol> source-name 2;
-#X text 195 72 (the number of samples which were added are:;
+#X text 212 72 (the number of samples which were added are:;
+#X text 13 412 (c) Thomas Musil 2000 - 2009;
#X connect 2 0 13 0;
#X connect 5 0 14 0;
#X connect 7 0 14 0;
diff --git a/tab_add_scalar-help.pd b/tab_add_scalar-help.pd
index 0ba6b29..85d34fe 100644
--- a/tab_add_scalar-help.pd
+++ b/tab_add_scalar-help.pd
@@ -1,5 +1,5 @@
-#N canvas 115 92 860 564 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 115 92 864 568 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src 100 float 1;
#A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572
-0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144
@@ -17,7 +17,7 @@
0.357144 0.357144 0.342858 0.328572;
#X coords 0 1 99 -1 200 140 1;
#X restore 527 46 graph;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst 100 float 0;
#X coords 0 1 99 -1 200 140 1;
#X restore 527 325 graph;
@@ -38,11 +38,10 @@
;
#X text 31 163 list of 4 floats:;
#X text 78 475 IEM KUG;
-#X text 62 463 musil;
+#X text 58 463 musil;
#X text 92 463 @;
-#X text 98 463 iem.at;
+#X text 100 463 iem.at;
#X text 61 485 Graz \, Austria;
-#X text 13 452 (c) Thomas Musil 2000 - 2006;
#X text 234 322 initial arguments:;
#X text 71 322 <bang> output;
#X text 250 271 <dst> xxx : change destination name;
@@ -54,6 +53,7 @@
#X text 42 200 3.) n samples to add;
#X text 42 210 4.) added scalar value;
#X text 205 72 (the number of samples which were added are:;
+#X text 13 452 (c) Thomas Musil 2000 - 2009;
#X connect 5 0 10 0;
#X connect 6 0 9 0;
#X connect 7 0 10 0;
diff --git a/tab_carth2polar-help.pd b/tab_carth2polar-help.pd
index 108f07d..f811345 100644
--- a/tab_carth2polar-help.pd
+++ b/tab_carth2polar-help.pd
@@ -1,77 +1,83 @@
-#N canvas 132 30 854 520 10;
-#N canvas 0 0 450 300 graph1 0;
-#X array real 100 float 0;
-#X coords 0 1 99 -1 100 40 1;
-#X restore 451 29 graph;
-#X obj 61 43 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 40 381 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#N canvas 0 0 450 300 graph1 0;
-#X array imag 100 float 0;
-#X coords 0 1 99 -1 100 40 1;
-#X restore 451 71 graph;
-#N canvas 0 0 450 300 graph1 0;
-#X array mag 100 float 0;
-#X coords 0 1 99 -1 100 40 1;
-#X restore 596 29 graph;
-#N canvas 0 0 450 300 graph1 0;
-#X array arg 100 float 0;
-#X coords 0 1 99 -1 100 40 1;
-#X restore 596 71 graph;
-#X msg 696 220 2;
-#X floatatom 647 276 5 0 0 0 - - -;
-#X floatatom 730 277 5 0 0 0 - - -;
-#X obj 710 131 loadbang;
-#X text 96 444 IEM KUG;
-#X text 80 432 musil;
-#X text 110 432 @;
-#X text 116 432 iem.at;
-#X text 79 454 Graz \, Austria;
-#X text 31 421 (c) Thomas Musil 2000 - 2006;
-#X text 324 276 initial arguments:;
-#X text 81 39 <bang> invert the complex src-arrays to the complex dst-arrays
-;
-#X text 98 113 the minimum of the 4 array lengths);
-#X text 85 99 (the number of samples which were inverted are:;
-#X text 302 288 1.arg: <symbol> real_source-name;
-#X text 302 300 2.arg: <symbol> imag_source-name;
-#X text 53 160 list of 5 floats:;
-#X msg 40 229 0 0 0 0 64;
-#X text 12 7 tab_carth2polar;
-#X obj 730 297 * 360;
-#X floatatom 730 322 5 0 0 0 - - -;
-#X text 74 179 2.) src_imag-onset;
-#X text 74 169 1.) src_real-onset;
-#X text 74 209 5.) number of samples to convert;
-#X msg 710 152 \; real const 0.75 \; imag const -0.75;
-#X msg 599 154 \; real const 0.75 \; imag const 0.75;
-#X text 302 312 3.arg: <symbol> magnitude_destination-name;
-#X text 302 323 4.arg: <symbol> phase_argument_destination-name;
-#X text 74 189 3.) dst_magnitude-onset;
-#X text 74 199 4.) dst_phase_argument-onset;
-#X obj 647 254 tabread mag;
-#X obj 730 253 tabread arg;
-#X obj 61 78 tab_carth2polar real imag mag arg;
-#X obj 40 360 tab_carth2polar real imag mag arg;
-#X msg 143 331 dst_arg arg;
-#X msg 110 306 dst_mag mag;
-#X msg 91 279 src_im imag;
-#X msg 74 253 src_re real;
-#X connect 1 0 39 0;
-#X connect 7 0 37 0;
-#X connect 7 0 38 0;
-#X connect 9 0 26 0;
-#X connect 10 0 31 0;
-#X connect 24 0 40 0;
-#X connect 26 0 27 0;
-#X connect 37 0 8 0;
-#X connect 38 0 9 0;
-#X connect 39 0 2 0;
-#X connect 40 0 3 0;
-#X connect 41 0 40 0;
-#X connect 42 0 40 0;
-#X connect 43 0 40 0;
-#X connect 44 0 40 0;
+#N canvas 132 30 866 532 10;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array real 100 float 0;
+#X coords 0 1 99 -1 100 40 1;
+#X restore 451 29 graph;
+#X obj 61 43 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 40 381 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array imag 100 float 0;
+#X coords 0 1 99 -1 100 40 1;
+#X restore 451 71 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array mag 100 float 0;
+#X coords 0 1 99 -1 100 40 1;
+#X restore 596 29 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array arg 100 float 0;
+#X coords 0 1 99 -1 100 40 1;
+#X restore 596 71 graph;
+#X msg 696 220 2;
+#X floatatom 647 276 5 0 0 0 - - -;
+#X floatatom 730 277 5 0 0 0 - - -;
+#X obj 710 131 loadbang;
+#X text 96 444 IEM KUG;
+#X text 75 432 musil;
+#X text 110 432 @;
+#X text 118 432 iem.at;
+#X text 79 454 Graz \, Austria;
+#X text 324 276 initial arguments:;
+#X text 81 39 <bang> invert the complex src-arrays to the complex dst-arrays
+;
+#X text 98 113 the minimum of the 4 array lengths);
+#X text 85 99 (the number of samples which were inverted are:;
+#X text 302 288 1.arg: <symbol> real_source-name;
+#X text 302 300 2.arg: <symbol> imag_source-name;
+#X text 53 160 list of 5 floats:;
+#X msg 40 229 0 0 0 0 64;
+#X text 12 7 tab_carth2polar;
+#X obj 684 316 * 360;
+#X floatatom 684 341 5 0 0 0 - - -;
+#X text 74 179 2.) src_imag-onset;
+#X text 74 169 1.) src_real-onset;
+#X text 74 209 5.) number of samples to convert;
+#X msg 710 152 \; real const 0.75 \; imag const -0.75;
+#X msg 584 153 \; real const 0.75 \; imag const 0.75;
+#X text 302 312 3.arg: <symbol> magnitude_destination-name;
+#X text 302 323 4.arg: <symbol> phase_argument_destination-name;
+#X text 74 189 3.) dst_magnitude-onset;
+#X text 74 199 4.) dst_phase_argument-onset;
+#X obj 647 254 tabread mag;
+#X obj 730 253 tabread arg;
+#X obj 61 78 tab_carth2polar real imag mag arg;
+#X obj 40 360 tab_carth2polar real imag mag arg;
+#X msg 143 331 dst_arg arg;
+#X msg 110 306 dst_mag mag;
+#X msg 91 279 src_im imag;
+#X msg 74 253 src_re real;
+#X floatatom 743 352 5 0 0 0 - - -;
+#X obj 743 304 * 2;
+#X obj 743 327 * 3.14159;
+#X text 31 421 (c) Thomas Musil 2000 - 2009;
+#X connect 1 0 38 0;
+#X connect 7 0 36 0;
+#X connect 7 0 37 0;
+#X connect 9 0 25 0;
+#X connect 9 0 45 0;
+#X connect 10 0 30 0;
+#X connect 23 0 39 0;
+#X connect 25 0 26 0;
+#X connect 36 0 8 0;
+#X connect 37 0 9 0;
+#X connect 38 0 2 0;
+#X connect 39 0 3 0;
+#X connect 40 0 39 0;
+#X connect 41 0 39 0;
+#X connect 42 0 39 0;
+#X connect 43 0 39 0;
+#X connect 45 0 46 0;
+#X connect 46 0 44 0;
diff --git a/tab_complex_inv-help.pd b/tab_complex_inv-help.pd
index a2505b8..8a5286c 100644
--- a/tab_complex_inv-help.pd
+++ b/tab_complex_inv-help.pd
@@ -1,72 +1,72 @@
-#N canvas 132 30 854 520 10;
-#N canvas 0 0 450 300 graph1 0;
-#X array re1 100 float 0;
-#X coords 0 1 99 -1 100 40 1;
-#X restore 451 29 graph;
-#X obj 61 43 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 40 381 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#N canvas 0 0 450 300 graph1 0;
-#X array im1 100 float 0;
-#X coords 0 1 99 -1 100 40 1;
-#X restore 451 71 graph;
-#N canvas 0 0 450 300 graph1 0;
-#X array re2 100 float 0;
-#X coords 0 1 99 -1 100 40 1;
-#X restore 596 29 graph;
-#N canvas 0 0 450 300 graph1 0;
-#X array im2 100 float 0;
-#X coords 0 1 99 -1 100 40 1;
-#X restore 596 71 graph;
-#X msg 700 247 2;
-#X floatatom 661 303 5 0 0 0 - - -;
-#X floatatom 734 304 5 0 0 0 - - -;
-#X obj 710 131 loadbang;
-#X text 96 444 IEM KUG;
-#X text 80 432 musil;
-#X text 110 432 @;
-#X text 116 432 iem.at;
-#X text 79 454 Graz \, Austria;
-#X text 31 421 (c) Thomas Musil 2000 - 2006;
-#X text 324 276 initial arguments:;
-#X text 12 7 tab_complex_inv;
-#X text 81 39 <bang> invert the complex src-arrays to the complex dst-arrays
-;
-#X obj 61 78 tab_complex_inv re1 im1 re2 im2;
-#X text 128 113 the minimum of the 4 array lengths);
-#X text 115 99 (the number of samples which were inverted are:;
-#X msg 74 253 src_re re1;
-#X msg 91 279 src_im im1;
-#X msg 110 306 dst_re re2;
-#X msg 143 331 dst_im im2;
-#X obj 40 360 tab_complex_inv re1 im1 re2 im2;
-#X text 302 312 3.arg: <symbol> real_destination-name;
-#X text 302 323 4.arg: <symbol> imag_destination-name;
-#X text 302 288 1.arg: <symbol> real_source-name;
-#X text 302 300 2.arg: <symbol> imag_source-name;
-#X obj 661 280 tabread re2;
-#X obj 734 280 tabread im2;
-#X msg 710 152 \; re1 const 0.8 \; im1 const -0.6;
-#X text 105 155 1.) src_re-onset;
-#X text 105 165 2.) src_im-onset;
-#X text 105 175 3.) dst_re-onset;
-#X text 105 185 4.) dst_im-onset;
-#X text 105 195 5.) number of samples to multiply;
-#X text 84 146 list of 5 floats:;
-#X msg 40 229 0 0 0 0 64;
-#X connect 1 0 20 0;
-#X connect 7 0 32 0;
-#X connect 7 0 33 0;
-#X connect 10 0 34 0;
-#X connect 20 0 2 0;
-#X connect 23 0 27 0;
-#X connect 24 0 27 0;
-#X connect 25 0 27 0;
-#X connect 26 0 27 0;
-#X connect 27 0 3 0;
-#X connect 32 0 8 0;
-#X connect 33 0 9 0;
-#X connect 41 0 27 0;
+#N canvas 132 30 858 524 10;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array re1 100 float 0;
+#X coords 0 1 99 -1 100 40 1;
+#X restore 451 29 graph;
+#X obj 61 43 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 40 381 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array im1 100 float 0;
+#X coords 0 1 99 -1 100 40 1;
+#X restore 451 71 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array re2 100 float 0;
+#X coords 0 1 99 -1 100 40 1;
+#X restore 596 29 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array im2 100 float 0;
+#X coords 0 1 99 -1 100 40 1;
+#X restore 596 71 graph;
+#X msg 700 247 2;
+#X floatatom 651 303 5 0 0 0 - - -;
+#X floatatom 734 304 5 0 0 0 - - -;
+#X obj 710 131 loadbang;
+#X text 96 444 IEM KUG;
+#X text 75 432 musil;
+#X text 110 432 @;
+#X text 118 432 iem.at;
+#X text 79 454 Graz \, Austria;
+#X text 324 276 initial arguments:;
+#X text 12 7 tab_complex_inv;
+#X text 81 39 <bang> invert the complex src-arrays to the complex dst-arrays
+;
+#X obj 61 78 tab_complex_inv re1 im1 re2 im2;
+#X text 128 113 the minimum of the 4 array lengths);
+#X text 115 99 (the number of samples which were inverted are:;
+#X msg 74 253 src_re re1;
+#X msg 91 279 src_im im1;
+#X msg 110 306 dst_re re2;
+#X msg 143 331 dst_im im2;
+#X obj 40 360 tab_complex_inv re1 im1 re2 im2;
+#X text 302 312 3.arg: <symbol> real_destination-name;
+#X text 302 323 4.arg: <symbol> imag_destination-name;
+#X text 302 288 1.arg: <symbol> real_source-name;
+#X text 302 300 2.arg: <symbol> imag_source-name;
+#X obj 651 280 tabread re2;
+#X obj 734 280 tabread im2;
+#X msg 710 152 \; re1 const 0.8 \; im1 const -0.6;
+#X text 105 155 1.) src_re-onset;
+#X text 105 165 2.) src_im-onset;
+#X text 105 175 3.) dst_re-onset;
+#X text 105 185 4.) dst_im-onset;
+#X text 105 195 5.) number of samples to multiply;
+#X text 84 146 list of 5 floats:;
+#X msg 40 229 0 0 0 0 64;
+#X text 31 421 (c) Thomas Musil 2000 - 2009;
+#X connect 1 0 19 0;
+#X connect 7 0 31 0;
+#X connect 7 0 32 0;
+#X connect 10 0 33 0;
+#X connect 19 0 2 0;
+#X connect 22 0 26 0;
+#X connect 23 0 26 0;
+#X connect 24 0 26 0;
+#X connect 25 0 26 0;
+#X connect 26 0 3 0;
+#X connect 31 0 8 0;
+#X connect 32 0 9 0;
+#X connect 40 0 26 0;
diff --git a/tab_complex_mul-help.pd b/tab_complex_mul-help.pd
index 5ee245c..5029992 100644
--- a/tab_complex_mul-help.pd
+++ b/tab_complex_mul-help.pd
@@ -1,41 +1,41 @@
-#N canvas 132 30 858 630 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 132 30 862 634 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array re1 100 float 0;
#X coords 0 1 99 -1 100 40 1;
-#X restore 451 29 graph;
+#X restore 481 29 graph;
#X obj 61 43 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 54 439 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array im1 100 float 0;
#X coords 0 1 99 -1 100 40 1;
-#X restore 451 71 graph;
-#N canvas 0 0 450 300 graph1 0;
+#X restore 481 71 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array re2 100 float 0;
#X coords 0 1 99 -1 100 40 1;
-#X restore 596 29 graph;
-#N canvas 0 0 450 300 graph1 0;
+#X restore 606 29 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array im2 100 float 0;
#X coords 0 1 99 -1 100 40 1;
-#X restore 596 71 graph;
-#N canvas 0 0 450 300 graph1 0;
+#X restore 606 71 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array re3 100 float 0;
#X coords 0 1 99 -1 100 40 1;
#X restore 735 28 graph;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array im3 100 float 0;
#X coords 0 1 99 -1 100 40 1;
#X restore 735 70 graph;
#X msg 710 152 \; re1 const 0.9 \; im1 const 0.6 \; re2 const 0.7 \;
im2 const -0.8;
#X obj 61 78 tab_complex_mul re1 im1 re2 im2 re3 im3;
-#X obj 672 472 tabread re3;
+#X obj 662 472 tabread re3;
#X obj 745 472 tabread im3;
#X msg 711 439 2;
-#X floatatom 672 495 5 0 0 0 - - -;
+#X floatatom 662 495 5 0 0 0 - - -;
#X floatatom 745 496 5 0 0 0 - - -;
#X obj 692 350 *;
#X obj 715 350 *;
@@ -58,24 +58,23 @@ im2 const -0.8;
#X msg 161 335 src2_im im2;
#X msg 40 234 0 0 0 0 0 0 64;
#X text 84 146 list of 7 floats:;
-#X text 303 419 1.arg: <symbol> real_source1-name;
-#X text 303 431 2.arg: <symbol> imag_source1-name;
-#X text 303 443 3.arg: <symbol> real_source2-name;
-#X text 304 454 4.arg: <symbol> imag_source2-name;
-#X text 304 466 5.arg: <symbol> real_destination-name;
-#X text 304 477 6.arg: <symbol> imag_destination-name;
+#X text 353 419 1.arg: <symbol> real_source1-name;
+#X text 353 431 2.arg: <symbol> imag_source1-name;
+#X text 353 443 3.arg: <symbol> real_source2-name;
+#X text 354 454 4.arg: <symbol> imag_source2-name;
+#X text 354 466 5.arg: <symbol> real_destination-name;
+#X text 354 477 6.arg: <symbol> imag_destination-name;
#X obj 728 281 t b b b b;
#X obj 728 257 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 710 131 loadbang;
#X text 87 537 IEM KUG;
-#X text 71 525 musil;
+#X text 66 525 musil;
#X text 101 525 @;
-#X text 107 525 iem.at;
+#X text 109 525 iem.at;
#X text 70 547 Graz \, Austria;
-#X text 22 514 (c) Thomas Musil 2000 - 2006;
#X text 12 7 tab_complex_mul;
-#X text 325 407 initial arguments:;
+#X text 375 407 initial arguments:;
#X text 115 99 (the number of samples which were multiplied are:;
#X text 105 155 1.) src1_re-onset;
#X text 105 165 2.) src1_im-onset;
@@ -87,6 +86,7 @@ im2 const -0.8;
#X text 81 39 <bang> multiply the complex src1-arrays with the complex
src2-arrays to complex dst-array;
#X text 128 113 the minimum of the 6 array lengths);
+#X text 22 514 (c) Thomas Musil 2000 - 2009;
#X connect 1 0 10 0;
#X connect 10 0 2 0;
#X connect 11 0 14 0;
diff --git a/tab_const-help.pd b/tab_const-help.pd
index ff2a20f..77f5443 100644
--- a/tab_const-help.pd
+++ b/tab_const-help.pd
@@ -1,11 +1,11 @@
-#N canvas 117 93 786 444 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 117 93 790 448 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst 100 float 1;
#A 0 0 0 0 0 0 0 0.0428571 0.1 0.128571 0.185714 0.257143 0.3 0.371429
0.428571 0.471429 0.557143 0.614286 0.671429 0.4 0.171429 0.0714286
-0.0857142 -0.285714 -0.557143 -0.542857 -0.485714 -0.457143 -0.428571
-0.357143 -0.314286 -0.271429 -0.221429 -0.171429 -0.128571 -0.0857143
--0.0428571 1.49012e-008 0.0428572 0.0857143 0.128571 0.171429 0.271429
+-0.0428571 1.49012e-08 0.0428572 0.0857143 0.128571 0.171429 0.271429
0.357143 0.442857 0.471429 -0.514286 -0.514286 -0.485714 -0.428571
-0.342857 -0.292857 -0.242857 -0.2 -0.157143 -0.0285715 0.0357142 0.1
0.152381 0.204762 0.257143 0.321429 0.385714 0.435714 0.485714 0.528571
@@ -13,7 +13,7 @@
-0.3 -0.257143 -0.214286 -0.185714 -0.157143 -0.128571 -0.0785714 -0.0285714
0.00476191 0.0380952 0.0714286 0.114286 0.157143 0.2 0.242857 0.278571
0.314286 -0.228571 -0.242857 -0.214286 -0.2 -0.142857 -0.114286 -0.0714285
--0.0285714 3.53903e-008 0.114286;
+-0.0285714 3.53903e-08 0.114286;
#X coords 0 1 99 -1 200 140 1;
#X restore 518 36 graph;
#X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
@@ -38,13 +38,13 @@
#X text 190 257 initial arguments:;
#X text 174 219 <dst> xxx : change destination name;
#X text 75 374 IEM KUG;
-#X text 59 362 musil;
+#X text 54 362 musil;
#X text 89 362 @;
-#X text 95 362 iem.at;
+#X text 97 362 iem.at;
#X text 58 384 Graz \, Austria;
-#X text 10 351 (c) Thomas Musil 2000 - 2006;
#X text 65 280 <bang> output;
#X text 43 153 list of 2 floats:;
+#X text 10 351 (c) Thomas Musil 2000 - 2009;
#X connect 1 0 5 0;
#X connect 4 0 8 0;
#X connect 5 0 2 0;
diff --git a/tab_conv-help.pd b/tab_conv-help.pd
index e3c6145..ff985fd 100644
--- a/tab_conv-help.pd
+++ b/tab_conv-help.pd
@@ -1,96 +1,110 @@
-#N canvas 52 27 959 534 10;
-#X obj 55 51 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 55 92 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#N canvas 0 0 703 524 init_tables 0;
-#X obj 45 132 dsp;
-#X obj 45 113 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X floatatom 45 174 5 0 0 0 - - -;
-#X floatatom 58 156 5 0 0 0 - - -;
-#X obj 168 162 noise~;
-#X obj 114 193 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 149 15 inlet;
-#X obj 149 37 t b;
-#X obj 188 99 del 100;
-#X msg 53 82 1;
-#X msg 188 122 0;
-#X obj 167 64 del 100;
-#X obj 228 152 dirac~;
-#X obj 134 234 tabwrite~ in;
-#X obj 228 235 tabwrite~ filt;
-#X obj 229 180 *~ 10;
-#X obj 228 208 bpq2~ 1000 10 100;
-#X connect 0 0 2 0;
-#X connect 0 1 3 0;
-#X connect 1 0 0 0;
-#X connect 4 0 13 0;
-#X connect 5 0 13 0;
-#X connect 5 0 14 0;
-#X connect 6 0 7 0;
-#X connect 7 0 9 0;
-#X connect 7 0 11 0;
-#X connect 8 0 10 0;
-#X connect 9 0 1 0;
-#X connect 10 0 1 0;
-#X connect 11 0 8 0;
-#X connect 11 0 5 0;
-#X connect 11 0 12 0;
-#X connect 12 0 15 0;
-#X connect 15 0 16 0;
-#X connect 16 0 14 0;
-#X restore 779 202 pd init_tables;
-#X obj 779 157 loadbang;
-#N canvas 0 0 450 300 graph1 0;
-#X array in 800 float 0;
-#X coords 0 1 799 -1 199 100 1;
-#X restore 443 20 graph;
-#N canvas 0 0 450 300 graph1 0;
-#X array filt 200 float 0;
-#X coords 0 0.1 199 -0.1 199 100 1;
-#X restore 443 134 graph;
-#N canvas 0 0 450 300 graph1 0;
-#X array out 1000 float 0;
-#X coords 0 1 999 -1 199 100 1;
-#X restore 443 247 graph;
-#X text 94 459 IEM KUG;
-#X text 78 447 musil;
-#X text 108 447 @;
-#X text 114 447 iem.at;
-#X text 77 469 Graz \, Austria;
-#X text 29 436 (c) Thomas Musil 2000 - 2006;
-#X text 340 351 initial arguments:;
-#X text 77 37 <bang> correlates the 2nd array "measured" with the 1st
-array "reference" to the destination array "cross_corr";
-#X text 78 92 (the number of samples which were correlated are: the
-positive minimum of the difference (src1-src2) and dst array lengths)
-;
-#X text 318 363 1.arg: <symbol> source1-name;
-#X text 318 375 2.arg: <symbol> source2-name;
-#X text 318 387 3.arg: <symbol> destination-name;
-#X text 318 399 4.arg: <float> norming factor;
-#X text 493 422 calculation in ms;
-#X text 318 411 5.arg: <float> delay time per destination sample;
-#X msg 63 318 bang;
-#X msg 135 361 dst cross_corr;
-#X msg 124 340 src2 meas;
-#X msg 109 319 src1 ref;
-#X obj 779 181 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 63 389 tab_cross_corr ref meas cross_corr 0.02 1;
-#X text 62 155 !! array length of src1 > array length of src2 !!;
-#X text 12 7 tab_conv;
-#X obj 55 70 tab_conv in filt out;
-#X msg 60 225 10 10 10 500 190;
-#X text 100 9 WORK IN PROGRESS;
-#X connect 0 0 30 0;
-#X connect 3 0 26 0;
-#X connect 22 0 27 0;
-#X connect 23 0 27 0;
-#X connect 24 0 27 0;
-#X connect 25 0 27 0;
-#X connect 26 0 2 0;
-#X connect 30 0 1 0;
-#X connect 31 0 27 0;
+#N canvas 53 28 963 538 10;
+#X obj 55 51 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 55 92 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#N canvas 0 22 711 532 init_tables 0;
+#X obj 45 113 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 133 200 noise~;
+#X obj 104 144 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 149 15 inlet;
+#X obj 149 37 t b;
+#X obj 188 99 del 100;
+#X msg 53 82 1;
+#X msg 188 122 0;
+#X obj 167 64 del 100;
+#X obj 134 234 tabwrite~ in;
+#X obj 228 235 tabwrite~ filt;
+#X obj 229 180 *~ 10;
+#N canvas 0 22 238 185 dsp 0;
+#X msg 28 63 \; pd dsp \$1;
+#X obj 28 34 inlet;
+#X connect 1 0 0 0;
+#X restore 45 132 pd dsp;
+#N canvas 448 145 458 308 dirac~ 0;
+#X obj 75 23 inlet;
+#X obj 75 96 sig~;
+#X obj 75 121 biquad~ 0 0 1 -1 0;
+#X obj 75 143 clip~ 0 1;
+#X obj 75 169 outlet~;
+#X obj 110 48 del 2;
+#X msg 75 49 1;
+#X msg 111 69 0;
+#X connect 0 0 5 0;
+#X connect 0 0 6 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 5 0 7 0;
+#X connect 6 0 1 0;
+#X connect 7 0 1 0;
+#X restore 229 155 pd dirac~;
+#X obj 229 209 bp~ 1000 10;
+#X connect 0 0 12 0;
+#X connect 1 0 9 0;
+#X connect 2 0 9 0;
+#X connect 2 0 10 0;
+#X connect 3 0 4 0;
+#X connect 4 0 6 0;
+#X connect 4 0 8 0;
+#X connect 5 0 7 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 5 0;
+#X connect 8 0 2 0;
+#X connect 8 0 13 0;
+#X connect 11 0 14 0;
+#X connect 13 0 11 0;
+#X connect 14 0 10 0;
+#X restore 678 273 pd init_tables;
+#X obj 678 228 loadbang;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array in 800 float 0;
+#X coords 0 1 799 -1 399 100 1;
+#X restore 483 20 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array filt 200 float 0;
+#X coords 0 0.1 199 -0.1 99 100 1;
+#X restore 483 214 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array out 800 float 0;
+#X coords 0 1 799 -1 399 100 1;
+#X restore 483 377 graph;
+#X text 94 459 IEM KUG;
+#X text 73 447 musil;
+#X text 108 447 @;
+#X text 116 447 iem.at;
+#X text 77 469 Graz \, Austria;
+#X text 248 360 initial arguments:;
+#X text 77 37 <bang> correlates the 2nd array "measured" with the 1st
+array "reference" to the destination array "cross_corr";
+#X text 78 92 (the number of samples which were correlated are: the
+positive minimum of the difference (src1-src2) and dst array lengths)
+;
+#X text 226 372 1.arg: <symbol> source1-name;
+#X text 226 384 2.arg: <symbol> source2-name;
+#X text 226 396 3.arg: <symbol> destination-name;
+#X msg 77 297 bang;
+#X obj 678 252 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 62 155 !! array length of src1 > array length of src2 !!;
+#X text 12 7 tab_conv;
+#X obj 55 70 tab_conv in filt out;
+#X text 100 9 WORK IN PROGRESS;
+#X text 29 436 (c) Thomas Musil 2000 - 2009;
+#X msg 109 319 src1 in;
+#X msg 124 340 src2 filt;
+#X msg 135 361 dst out;
+#X obj 63 389 tab_conv in filt out;
+#X msg 54 246 0 0 0 800 200;
+#X connect 0 0 22 0;
+#X connect 3 0 19 0;
+#X connect 18 0 28 0;
+#X connect 19 0 2 0;
+#X connect 22 0 1 0;
+#X connect 25 0 28 0;
+#X connect 26 0 28 0;
+#X connect 27 0 28 0;
+#X connect 29 0 28 0;
diff --git a/tab_copy-help.pd b/tab_copy-help.pd
index da2e569..6c6e70a 100644
--- a/tab_copy-help.pd
+++ b/tab_copy-help.pd
@@ -1,5 +1,5 @@
-#N canvas 116 92 780 479 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 116 92 784 483 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src 100 float 1;
#A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572
-0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144
@@ -17,7 +17,7 @@
0.357144 0.357144 0.342858 0.328572;
#X coords 0 1 99 -1 200 140 1;
#X restore 533 14 graph;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst 100 float 0;
#X coords 0 1 99 -1 200 140 1;
#X restore 533 180 graph;
@@ -36,11 +36,10 @@
#X text 197 87 the minimum of both array lengths);
#X text 43 168 list of 3 floats:;
#X text 77 419 IEM KUG;
-#X text 61 407 musil;
+#X text 56 407 musil;
#X text 91 407 @;
-#X text 97 407 iem.at;
+#X text 99 407 iem.at;
#X text 60 429 Graz \, Austria;
-#X text 12 396 (c) Thomas Musil 2000 - 2006;
#X text 55 179 1.) src onset;
#X text 55 189 2.) dst onset;
#X text 225 306 initial arguments:;
@@ -52,9 +51,10 @@
#X obj 60 82 tab_copy src dst;
#X text 55 198 3.) n samples to copy;
#X obj 58 306 tab_copy src dst;
-#X connect 2 0 27 0;
-#X connect 5 0 29 0;
-#X connect 8 0 29 0;
-#X connect 9 0 29 0;
-#X connect 27 0 3 0;
-#X connect 29 0 4 0;
+#X text 12 396 (c) Thomas Musil 2000 - 2009;
+#X connect 2 0 26 0;
+#X connect 5 0 28 0;
+#X connect 8 0 28 0;
+#X connect 9 0 28 0;
+#X connect 26 0 3 0;
+#X connect 28 0 4 0;
diff --git a/tab_counter-help.pd b/tab_counter-help.pd
index c47152d..4cfcd52 100644
--- a/tab_counter-help.pd
+++ b/tab_counter-help.pd
@@ -1,57 +1,56 @@
-#N canvas 115 92 868 572 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 115 92 872 576 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src 100 float 1;
#A 0 0 0 0 0 0 0 0 0 0 0.9 0 0 0 0 0 0 0 0 0 0.9 0 0 0 0 0 0 0 0 0
0.9 0 0 0 0 0 0 0 0 0 0.9 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;
#X coords 0 1 99 0 200 140 1;
-#X restore 527 166 graph;
-#N canvas 0 0 450 300 graph1 0;
+#X restore 544 234 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst 100 float 0;
#X coords 0 10 99 0 200 140 1;
-#X restore 527 325 graph;
+#X restore 544 413 graph;
#X obj 53 146 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 55 398 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X text 199 367 1.arg: <symbol> source-name;
+#X text 219 367 1.arg: <symbol> source-name;
#X msg 146 317 dst dst;
#X msg 101 296 src src;
-#X text 199 380 2.arg: <symbol> destination-name;
+#X text 219 380 2.arg: <symbol> destination-name;
#X obj 55 359 tab_gt_scalar src dst;
#X obj 53 121 tab_counter src dst;
#X msg 82 93 reset;
#X obj 53 33 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 55 273 0 0 100;
-#N canvas 0 0 454 304 /SUBPATCH/ 0;
+#N canvas 0 22 462 312 (subpatch) 0;
#X msg 175 59 \; src const 0;
#X msg 88 57 \; src \$1 0.9;
#X floatatom 89 30 5 0 0 0 - - -;
#X msg 88 127 \; dst ylabel -5.15 0 1 2 3 4 5 6 7 8 9 10;
#X msg 87 93 \; dst yticks 0 1 1;
-#X obj 32 64 loadbang;
+#X obj 22 64 loadbang;
#X connect 2 0 1 0;
#X connect 5 0 4 0;
#X connect 5 0 3 0;
-#X restore 450 146 pd;
+#X restore 496 285 pd;
#X text 37 222 list of 3 floats:;
#X text 78 455 IEM KUG;
-#X text 62 443 musil;
+#X text 57 443 musil;
#X text 92 443 @;
-#X text 98 443 iem.at;
+#X text 100 443 iem.at;
#X text 61 465 Graz \, Austria;
-#X text 13 432 (c) Thomas Musil 2000 - 2006;
#X text 49 233 1.) src onset;
#X text 49 243 2.) dst onset;
-#X text 232 354 initial arguments:;
+#X text 252 354 initial arguments:;
#X text 64 379 <bang> output;
#X text 158 296 <src> xxx : change source name;
#X text 199 318 <dst> xxx : change destination name;
#X text 135 162 the minimum of both array lengths);
#X text 12 3 tab_counter;
-#X msg 594 31 \; src 9 0.9 \; src 19 0.9 \; src 29 0.9 \; src 39 0.9
+#X msg 549 36 \; src 9 0.9 \; src 19 0.9 \; src 29 0.9 \; src 39 0.9
;
#X text 77 27 <bang> each element of the source array controls an increment
counter in the destination array \, a nonzero value lets increment
@@ -61,8 +60,15 @@ zero.;
#X text 122 148 (the number of samples which control counters are:
;
#X text 49 253 3.) n samples to control n counters;
-#X msg 673 32 \; src 9 -0.1 \; src 19 -0.1 \; src 29 0 \; src 39 0.9
+#X text 13 432 (c) Thomas Musil 2000 - 2009;
+#X msg 684 37 \; src 9 -0.1 \; src 19 0 \; src 29 0 \; src 39 0.9;
+#X msg 686 133 \; src 9 0 \; src 19 0 \; src 29 0 \; src 39 0;
+#X msg 545 132 \; src 9 0 \; src 19 0.9 \; src 29 -0.1 \; src 39 0
;
+#X text 536 15 4 indices incr.;
+#X text 677 14 2 indices incr.;
+#X text 537 112 2 indices incr.;
+#X text 695 114 reset;
#X connect 5 0 8 0;
#X connect 6 0 8 0;
#X connect 8 0 3 0;
diff --git a/tab_cross_corr-help.pd b/tab_cross_corr-help.pd
index d3d80b9..0670366 100644
--- a/tab_cross_corr-help.pd
+++ b/tab_cross_corr-help.pd
@@ -1,93 +1,112 @@
-#N canvas 42 76 736 530 10;
+#N canvas 107 80 1053 581 10;
#X obj 55 51 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 55 92 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#N canvas 0 0 466 316 init_tables 0;
-#X obj 45 132 dsp;
+#N canvas 0 22 478 328 init_tables 0;
#X obj 45 113 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X floatatom 45 174 5 0 0 0 - - -;
-#X floatatom 58 156 5 0 0 0 - - -;
-#X obj 229 151 noise~;
+#X obj 239 151 noise~;
#X obj 114 193 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 134 234 tabwrite~ ref;
-#X obj 228 234 tabwrite~ meas;
+#X obj 238 234 tabwrite~ meas;
#X obj 149 15 inlet;
#X obj 149 37 t b;
#X obj 188 99 del 100;
#X msg 53 82 1;
#X msg 188 122 0;
#X obj 167 64 del 100;
-#X obj 133 182 z~ 60;
-#X connect 0 0 2 0;
-#X connect 0 1 3 0;
+#N canvas 0 22 238 185 dsp 0;
+#X msg 28 63 \; pd dsp \$1;
+#X obj 28 34 inlet;
#X connect 1 0 0 0;
-#X connect 4 0 7 0;
-#X connect 4 0 14 0;
+#X restore 45 139 pd dsp;
+#N canvas 448 145 462 312 delay 0;
+#X obj 75 169 outlet~;
+#X obj 75 23 inlet~;
+#N canvas 0 22 458 308 del1 0;
+#X obj 75 169 outlet~;
+#X obj 75 23 inlet~;
+#X obj 105 101 delwrite~ \$0delz 5;
+#X connect 1 0 2 0;
+#X connect 1 0 0 0;
+#X restore 75 66 pd del1;
+#N canvas 0 22 458 308 del2 0;
+#X obj 75 169 outlet~;
+#X obj 75 23 inlet~;
+#X obj 75 122 delread~ \$0delz 1.31;
+#X connect 2 0 0 0;
+#X restore 75 116 pd del2;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X restore 136 190 pd delay;
+#X connect 0 0 11 0;
+#X connect 1 0 4 0;
+#X connect 1 0 12 0;
+#X connect 2 0 3 0;
+#X connect 2 0 4 0;
#X connect 5 0 6 0;
-#X connect 5 0 7 0;
-#X connect 8 0 9 0;
-#X connect 9 0 11 0;
-#X connect 9 0 13 0;
-#X connect 10 0 12 0;
-#X connect 11 0 1 0;
-#X connect 12 0 1 0;
-#X connect 13 0 10 0;
-#X connect 13 0 5 0;
-#X connect 14 0 6 0;
-#X restore 584 206 pd init_tables;
-#X obj 584 161 loadbang;
-#N canvas 0 0 450 300 graph1 0;
+#X connect 6 0 8 0;
+#X connect 6 0 10 0;
+#X connect 7 0 9 0;
+#X connect 8 0 0 0;
+#X connect 9 0 0 0;
+#X connect 10 0 7 0;
+#X connect 10 0 2 0;
+#X connect 12 0 3 0;
+#X restore 636 311 pd init_tables;
+#X obj 636 266 loadbang;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array ref 200 float 0;
#X coords 0 1 199 -1 199 100 1;
-#X restore 443 20 graph;
-#N canvas 0 0 450 300 graph1 0;
+#X restore 483 20 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array meas 100 float 0;
#X coords 0 1 99 -1 99 100 1;
-#X restore 443 134 graph;
-#N canvas 0 0 450 300 graph1 0;
+#X restore 541 140 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array cross_corr 100 float 0;
#X coords 0 1 99 -1 99 100 1;
-#X restore 443 247 graph;
+#X restore 483 260 graph;
#X text 94 459 IEM KUG;
-#X text 78 447 musil;
+#X text 73 447 musil;
#X text 108 447 @;
-#X text 114 447 iem.at;
+#X text 116 447 iem.at;
#X text 77 469 Graz \, Austria;
-#X text 29 436 (c) Thomas Musil 2000 - 2006;
-#X text 340 351 initial arguments:;
+#X text 380 381 initial arguments:;
#X text 12 7 tab_cross_corr;
#X text 77 37 <bang> correlates the 2nd array "measured" with the 1st
array "reference" to the destination array "cross_corr";
#X text 78 92 (the number of samples which were correlated are: the
positive minimum of the difference (src1-src2) and dst array lengths)
;
-#X text 318 363 1.arg: <symbol> source1-name;
-#X text 318 375 2.arg: <symbol> source2-name;
-#X text 318 387 3.arg: <symbol> destination-name;
-#X text 318 399 4.arg: <float> norming factor;
-#X text 493 422 calculation in ms;
-#X text 318 411 5.arg: <float> delay time per destination sample;
+#X text 358 393 1.arg: <symbol> source1-name;
+#X text 358 405 2.arg: <symbol> source2-name;
+#X text 358 417 3.arg: <symbol> destination-name;
+#X text 533 452 calculation in ms;
+#X text 358 441 5.arg: <float> delay time per destination sample;
#X msg 63 257 bang;
#X msg 80 278 time 1;
#X msg 135 361 dst cross_corr;
#X msg 124 340 src2 meas;
#X msg 109 319 src1 ref;
-#X obj 584 185 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 636 290 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X obj 55 70 tab_cross_corr ref meas cross_corr 0.02 1;
#X msg 97 297 factor 0.02;
#X obj 63 389 tab_cross_corr ref meas cross_corr 0.02 1;
#X text 62 155 !! array length of src1 > array length of src2 !!;
-#X connect 0 0 29 0;
-#X connect 3 0 28 0;
-#X connect 23 0 31 0;
-#X connect 24 0 31 0;
-#X connect 25 0 31 0;
-#X connect 26 0 31 0;
-#X connect 27 0 31 0;
-#X connect 28 0 2 0;
-#X connect 29 0 1 0;
-#X connect 30 0 31 0;
+#X text 29 436 (c) Thomas Musil 2000 - 2009;
+#X obj 55 70 tab_cross_corr ref meas cross_corr 0.04 1;
+#X text 358 429 4.arg: <float> scaling factor;
+#X connect 0 0 31 0;
+#X connect 3 0 26 0;
+#X connect 21 0 28 0;
+#X connect 22 0 28 0;
+#X connect 23 0 28 0;
+#X connect 24 0 28 0;
+#X connect 25 0 28 0;
+#X connect 26 0 2 0;
+#X connect 27 0 28 0;
+#X connect 31 0 1 0;
diff --git a/tab_div-help.pd b/tab_div-help.pd
index 3714374..1fe5f42 100644
--- a/tab_div-help.pd
+++ b/tab_div-help.pd
@@ -1,5 +1,5 @@
-#N canvas 116 92 847 552 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 116 92 851 556 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src1 100 float 1;
#A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572
-0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144
@@ -16,11 +16,11 @@
0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144
0.357144 0.357144 0.342858 0.328572;
#X coords 0 1 99 -1 200 140 1;
-#X restore 534 20 graph;
-#N canvas 0 0 450 300 graph1 0;
+#X restore 574 20 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst 100 float 0;
#X coords 0 1 99 -1 200 140 1;
-#X restore 535 368 graph;
+#X restore 575 368 graph;
#X obj 61 41 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 61 116 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
@@ -28,13 +28,13 @@
#X obj 59 350 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 255 286 dst dst;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src2 100 float 1;
#A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136
0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573
-0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143
-0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288
--0.14286 -0.085718 -0.0428611 -4.28595e-006 0.0428526 0.099995 0.171423
+-0.14286 -0.085718 -0.0428611 -4.28595e-06 0.0428526 0.099995 0.171423
0.21428 0.257137 0.328565 0.371422 0.428564 0.457135 0.485707 0.499992
0.514278 0.499992 0.471421 0.44285 0.414279 0.357136 0.285708 0.171423
0.0999952 0.0142815 -0.100003 -0.214288 -0.314288 -0.385716 -0.457144
@@ -45,39 +45,39 @@
-0.271431 -0.400001 -0.514286 -0.542858 -0.557143 -0.585714 -0.585714
-0.6 -0.6 -0.614286 -0.614286 -0.614286;
#X coords 0 1 99 -1 200 140 1;
-#X restore 535 171 graph;
+#X restore 575 171 graph;
#X msg 136 243 src1 src1;
#X msg 195 265 src2 src2;
#X msg 59 221 50 50 20 50;
#X text 45 149 list of 4 floats:;
#X text 212 363 3.arg: <symbol> destination-name;
#X text 78 445 IEM KUG;
-#X text 62 433 musil;
+#X text 56 433 musil;
#X text 92 433 @;
-#X text 98 433 iem.at;
+#X text 100 433 iem.at;
#X text 61 455 Graz \, Austria;
-#X text 13 422 (c) Thomas Musil 2000 - 2006;
#X text 234 322 initial arguments:;
#X text 72 329 <bang> output;
-#X text 306 285 <dst> xxx : change destination name;
-#X text 208 96 the minimum of the 3 array lengths);
+#X text 314 285 <dst> xxx : change destination name;
+#X text 229 96 the minimum of the 3 array lengths);
#X text 56 187 3.) dst onset;
#X text 56 165 1.) src_1 onset;
#X text 56 176 2.) src_2 onset;
-#X text 199 243 <src1> xxx : change source name 1;
-#X text 257 265 <src2> xxx : change source name 2;
+#X text 207 243 <src1> xxx : change source name 1;
+#X text 265 265 <src2> xxx : change source name 2;
#X text 211 336 1.arg: <symbol> source-name 1;
#X text 211 349 2.arg: <symbol> source-name 2;
#X text 12 13 tab_div;
#X text 90 39 <bang> divide the 2 src-arrays to dst-array;
-#X text 195 82 (the number of samples which were divided are:;
+#X text 216 82 (the number of samples which were divided are:;
#X text 56 197 4.) n samples to divide;
#X obj 61 88 tab_div src1 src2 dst;
#X obj 59 311 tab_div src1 src2 dst;
-#X connect 2 0 33 0;
-#X connect 5 0 34 0;
-#X connect 7 0 34 0;
-#X connect 8 0 34 0;
-#X connect 9 0 34 0;
-#X connect 33 0 3 0;
-#X connect 34 0 4 0;
+#X text 13 422 (c) Thomas Musil 2000 - 2009;
+#X connect 2 0 32 0;
+#X connect 5 0 33 0;
+#X connect 7 0 33 0;
+#X connect 8 0 33 0;
+#X connect 9 0 33 0;
+#X connect 32 0 3 0;
+#X connect 33 0 4 0;
diff --git a/tab_eq-help.pd b/tab_eq-help.pd
index 7a8917a..ddee59b 100644
--- a/tab_eq-help.pd
+++ b/tab_eq-help.pd
@@ -1,5 +1,5 @@
-#N canvas 116 92 859 564 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 116 92 863 568 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src1 100 float 1;
#A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572
-0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144
@@ -14,11 +14,11 @@
0.385715 0.357143 0.342858 0.314286 0.285715 0.242857 0.185714 0.142857
0.114286 0.085714;
#X coords 0 1 99 -1 200 140 1;
-#X restore 534 10 graph;
-#N canvas 0 0 450 300 graph1 0;
+#X restore 584 10 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst 100 float 0;
#X coords 0 1 99 -1 200 140 1;
-#X restore 535 358 graph;
+#X restore 585 358 graph;
#X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
@@ -26,13 +26,13 @@
#X obj 59 340 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 255 276 dst dst;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src2 100 float 1;
#A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136
0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573
-0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143
-0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288
--0.14286 -0.085718 -0.0428611 -4.28595e-006 0.0428526 0.099995 0.171423
+-0.14286 -0.085718 -0.0428611 -4.28595e-06 0.0428526 0.099995 0.171423
0.21428 0.257137 0.328565 0.371422 0.442849 0.457135 0.471421 0.471421
0.485706 0.485706 0.485706 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
@@ -41,40 +41,40 @@
-0.542858 -0.557143 -0.585714 -0.585714 -0.6 -0.6 -0.614286 -0.614286
-0.614286;
#X coords 0 1 99 -1 200 140 1;
-#X restore 535 161 graph;
+#X restore 585 161 graph;
#X msg 136 233 src1 src1;
#X msg 195 255 src2 src2;
#X msg 59 211 50 50 20 50;
#X text 45 139 list of 4 floats:;
#X text 212 353 3.arg: <symbol> destination-name;
#X text 78 435 IEM KUG;
-#X text 62 423 musil;
+#X text 57 423 musil;
#X text 92 423 @;
-#X text 98 423 iem.at;
+#X text 100 423 iem.at;
#X text 61 445 Graz \, Austria;
-#X text 13 412 (c) Thomas Musil 2000 - 2006;
#X text 234 312 initial arguments:;
#X text 72 319 <bang> output;
-#X text 306 275 <dst> xxx : change destination name;
-#X text 208 86 the minimum of the 3 array lengths);
+#X text 316 275 <dst> xxx : change destination name;
+#X text 219 86 the minimum of the 3 array lengths);
#X text 56 177 3.) dst onset;
#X text 56 155 1.) src_1 onset;
#X text 56 166 2.) src_2 onset;
-#X text 199 233 <src1> xxx : change source name 1;
-#X text 257 255 <src2> xxx : change source name 2;
+#X text 209 233 <src1> xxx : change source name 1;
+#X text 267 255 <src2> xxx : change source name 2;
#X text 211 326 1.arg: <symbol> source-name 1;
#X text 211 339 2.arg: <symbol> source-name 2;
#X text 12 3 tab_eq;
#X text 90 29 <bang> compare "equal to" the 2 src-arrays to dst-array
;
#X obj 61 78 tab_eq src1 src2 dst;
-#X text 195 72 (the number of samples which were compared are:;
+#X text 206 72 (the number of samples which were compared are:;
#X text 56 187 4.) n samples to compare;
#X obj 59 301 tab_eq src1 src2 dst;
-#X connect 2 0 31 0;
-#X connect 5 0 34 0;
-#X connect 7 0 34 0;
-#X connect 8 0 34 0;
-#X connect 9 0 34 0;
-#X connect 31 0 3 0;
-#X connect 34 0 4 0;
+#X text 13 412 (c) Thomas Musil 2000 - 2009;
+#X connect 2 0 30 0;
+#X connect 5 0 33 0;
+#X connect 7 0 33 0;
+#X connect 8 0 33 0;
+#X connect 9 0 33 0;
+#X connect 30 0 3 0;
+#X connect 33 0 4 0;
diff --git a/tab_eq_scalar-help.pd b/tab_eq_scalar-help.pd
index 72d177b..4c71711 100644
--- a/tab_eq_scalar-help.pd
+++ b/tab_eq_scalar-help.pd
@@ -1,22 +1,18 @@
-#N canvas 22 55 880 584 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 22 55 884 588 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src 100 float 1;
-#A 0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.485714 -0.457143
--0.4 -0.285713 -0.0571409 0.157146 0.328575 0.442861 0.557148 0.628577
-0.714292 0.800006 0.85715 0.885721 0.885721 0.871435 0.842864 0.757149
-0.557148 0.41429 0.257146 -0.0142835 -0.314285 -0.528572 -0.714287
--0.757145 -0.757145 -0.757145 -0.742859 -0.742859 -0.728573 -0.714287
--0.685715 -0.657144 -0.585715 -0.528572 -0.4 -0.242856 -0.0428551 0.157146
-0.342861 0.51429 0.728577 0.800006 0.828578 0.828578 0.828578 0.828578
-0.800006 0.771435 0.714292 0.571433 0.41429 0.242861 0.0857169 -0.0571409
--0.242856 -0.385714 -0.542858 -0.685716 -0.757145 -0.800002 -0.828574
--0.828574 -0.814288 -0.800002 -0.785716 -0.757145 -0.728573 -0.67143
--0.585715 -0.471429 -0.271428 -0.0857125 0.114288 0.228575 0.314289
-0.385718 0.414285 0.428571 0.457143 0.471428 0.485714 0.485714 0.5
-0.5 0.5 0.5 0.5 0.5 0.5;
+#A 0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5
+-0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5
+-0.5 -0.542857 -0.614286 -0.657144 -0.67143 -0.700001 -0.714287 -0.757145
+-0.757145 -0.757145 -0.742859 -0.742859 -0.728573 -0.714287 -0.685715
+-0.657144 -0.585715 -0.528572 -0.4 -0.242856 -0.0428551 0.157146 0.342861
+0.51429 0.728577 0.800006 0.828578 0.828578 0.828578 0.828578 0.800006
+0.771435 0.714292 0.571433 0.528572 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
+0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
+0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5;
#X coords 0 1 99 -1 200 140 1;
#X restore 527 116 graph;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst 100 float 0;
#X coords 0 1 99 -1 200 140 1;
#X restore 527 325 graph;
@@ -30,16 +26,15 @@
#X obj 59 331 tab_eq_scalar src dst;
#X msg 47 36 0.5;
#X msg 82 37 -0.5;
-#X text 201 332 1.arg: <symbol> source-name;
-#X text 201 345 2.arg: <symbol> destination-name;
+#X text 221 332 1.arg: <symbol> source-name;
+#X text 221 345 2.arg: <symbol> destination-name;
#X text 31 163 list of 4 floats:;
#X text 78 475 IEM KUG;
-#X text 62 463 musil;
+#X text 57 463 musil;
#X text 92 463 @;
-#X text 98 463 iem.at;
+#X text 100 463 iem.at;
#X text 61 485 Graz \, Austria;
-#X text 13 452 (c) Thomas Musil 2000 - 2006;
-#X text 224 318 initial arguments:;
+#X text 244 318 initial arguments:;
#X text 75 351 <bang> output;
#X text 229 272 <dst> xxx : change destination name;
#X text 218 86 the minimum of both array lengths);
@@ -53,10 +48,11 @@
to dst-array;
#X text 205 72 (the number of samples which were compared are:;
#X msg 48 228 0 0 100 0.5;
+#X text 13 452 (c) Thomas Musil 2000 - 2009;
#X connect 4 0 7 0;
#X connect 5 0 7 0;
#X connect 6 0 2 0;
#X connect 7 0 3 0;
#X connect 8 0 6 0;
#X connect 9 0 6 0;
-#X connect 31 0 7 0;
+#X connect 30 0 7 0;
diff --git a/tab_fft-help.pd b/tab_fft-help.pd
index 707eb26..933bea7 100644
--- a/tab_fft-help.pd
+++ b/tab_fft-help.pd
@@ -1,49 +1,43 @@
-#N canvas 29 19 957 536 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 29 22 965 544 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src_re 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 10 graph;
-#N canvas 0 0 450 300 graph1 0;
+#X restore 694 10 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst_re 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 239 graph;
+#X restore 694 239 graph;
#X obj 24 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 24 122 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 62 371 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst_im 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 353 graph;
+#X restore 694 353 graph;
#X msg 103 276 dst_re dst_re;
#X msg 118 299 dst_im dst_im;
#X msg 139 322 fftsize 64;
-#X floatatom 474 22 5 0 63 0 - - -;
+#X floatatom 473 22 5 0 63 0 - - -;
#X msg 546 341 \; dst_re const 0 \; dst_im const 0;
#X text 10 0 tab_fft;
#X text 93 -1 complex FTT with arrays;
#X text 102 464 IEM KUG;
-#X text 86 452 musil;
+#X text 81 452 musil;
#X text 116 452 @;
-#X text 122 452 iem.at;
+#X text 124 452 iem.at;
#X text 85 474 Graz \, Austria;
-#X text 37 441 (c) Thomas Musil 2000 - 2006;
-#N canvas 0 0 466 316 generate_a_dirac 0;
-#X msg 61 106 \$1 1 1;
-#X obj 61 83 t f b;
+#N canvas 0 22 474 324 generate_a_dirac 0;
#X obj 61 62 clip 0 63;
#X obj 61 32 inlet;
-#X obj 86 142 tab_const src_re;
-#X connect 0 0 4 0;
+#X msg 60 103 \; src_re const 0 \; src_re \$1 1;
+#X connect 0 0 2 0;
#X connect 1 0 0 0;
-#X connect 1 1 4 0;
-#X connect 2 0 1 0;
-#X connect 3 0 2 0;
#X restore 474 41 pd generate_a_dirac;
-#X floatatom 514 22 5 -31 31 0 - - -;
-#N canvas 0 0 479 403 generate_a_cos 0;
+#X floatatom 514 22 5 -32 32 0 - - -;
+#N canvas 0 22 531 484 generate_a_cos 0;
#X obj 120 18 inlet;
#X obj 219 176 t f f;
#X obj 219 211 / 32;
@@ -51,9 +45,7 @@
#X obj 219 283 cos;
#X obj 219 257 * 8;
#X obj 219 308 / 32;
-#X obj 219 106 clip 0 31;
#X obj 219 127 t b f;
-#X obj 219 153 for++ 0 63;
#X obj 219 331 tabwrite src_re;
#X obj 120 43 moses 0;
#X obj 39 178 t f f;
@@ -61,41 +53,79 @@
#X obj 39 234 * 3.14159;
#X obj 39 285 cos;
#X obj 39 259 * 8;
-#X obj 39 108 clip 0 31;
#X obj 39 129 t b f;
-#X obj 39 155 for++ 0 63;
#X obj 39 333 tabwrite src_re;
#X obj 90 70 * -1;
#X obj 39 310 / -32;
-#X connect 0 0 11 0;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 219 151 pd counter;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 38 154 pd counter;
+#X obj 219 106 clip 0 32;
+#X obj 39 108 clip 0 32;
+#X connect 0 0 9 0;
#X connect 1 0 2 0;
-#X connect 1 1 10 1;
+#X connect 1 1 8 1;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
#X connect 4 0 6 0;
#X connect 5 0 4 0;
-#X connect 6 0 10 0;
-#X connect 7 0 8 0;
-#X connect 8 0 9 0;
-#X connect 8 1 5 1;
-#X connect 9 0 1 0;
-#X connect 11 0 21 0;
-#X connect 11 1 7 0;
-#X connect 12 0 13 0;
-#X connect 12 1 20 1;
-#X connect 13 0 14 0;
-#X connect 14 0 16 0;
-#X connect 15 0 22 0;
-#X connect 16 0 15 0;
-#X connect 17 0 18 0;
-#X connect 18 0 19 0;
-#X connect 18 1 16 1;
-#X connect 19 0 12 0;
-#X connect 21 0 17 0;
-#X connect 22 0 20 0;
+#X connect 6 0 8 0;
+#X connect 7 0 19 0;
+#X connect 7 1 5 1;
+#X connect 9 0 17 0;
+#X connect 9 1 21 0;
+#X connect 10 0 11 0;
+#X connect 10 1 16 1;
+#X connect 11 0 12 0;
+#X connect 12 0 14 0;
+#X connect 13 0 18 0;
+#X connect 14 0 13 0;
+#X connect 15 0 20 0;
+#X connect 15 1 14 1;
+#X connect 17 0 22 0;
+#X connect 18 0 16 0;
+#X connect 19 0 1 0;
+#X connect 20 0 10 0;
+#X connect 21 0 7 0;
+#X connect 22 0 15 0;
#X restore 514 61 pd generate_a_cos;
#X floatatom 555 22 5 -31 31 0 - - -;
-#N canvas 0 0 483 407 generate_a_sin 0;
+#N canvas 0 22 491 415 generate_a_sin 0;
#X obj 102 37 inlet;
#X obj 246 182 t f f;
#X obj 246 217 / 32;
@@ -104,7 +134,6 @@
#X obj 246 314 / 32;
#X obj 246 112 clip 0 31;
#X obj 246 133 t b f;
-#X obj 246 159 for++ 0 63;
#X obj 246 337 tabwrite src_re;
#X obj 246 289 sin;
#X obj 54 180 t f f;
@@ -112,41 +141,78 @@
#X obj 54 236 * 3.14159;
#X obj 54 261 * 8;
#X obj 54 110 clip 0 31;
-#X obj 54 131 t b f;
-#X obj 54 157 for++ 0 63;
+#X obj 54 132 t b f;
#X obj 54 335 tabwrite src_re;
#X obj 54 287 sin;
#X obj 54 312 / -32;
#X obj 102 60 moses 0;
#X obj 54 88 * -1;
-#X connect 0 0 21 0;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 54 156 pd counter;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 246 156 pd counter;
+#X connect 0 0 19 0;
#X connect 1 0 2 0;
-#X connect 1 1 9 1;
+#X connect 1 1 8 1;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
-#X connect 4 0 10 0;
-#X connect 5 0 9 0;
+#X connect 4 0 9 0;
+#X connect 5 0 8 0;
#X connect 6 0 7 0;
-#X connect 7 0 8 0;
+#X connect 7 0 22 0;
#X connect 7 1 4 1;
-#X connect 8 0 1 0;
-#X connect 10 0 5 0;
+#X connect 9 0 5 0;
+#X connect 10 0 11 0;
+#X connect 10 1 16 1;
#X connect 11 0 12 0;
-#X connect 11 1 18 1;
#X connect 12 0 13 0;
-#X connect 13 0 14 0;
-#X connect 14 0 19 0;
-#X connect 15 0 16 0;
-#X connect 16 0 17 0;
-#X connect 16 1 14 1;
-#X connect 17 0 11 0;
+#X connect 13 0 17 0;
+#X connect 14 0 15 0;
+#X connect 15 0 21 0;
+#X connect 15 1 13 1;
+#X connect 17 0 18 0;
+#X connect 18 0 16 0;
#X connect 19 0 20 0;
-#X connect 20 0 18 0;
-#X connect 21 0 22 0;
-#X connect 21 1 6 0;
-#X connect 22 0 15 0;
+#X connect 19 1 6 0;
+#X connect 20 0 14 0;
+#X connect 21 0 10 0;
+#X connect 22 0 1 0;
#X restore 555 82 pd generate_a_sin;
-#X text 299 355 initial arguments:;
+#X text 299 365 initial arguments:;
#X text 45 56 <bang> calculates a complex fourier transformation of
complex src-arrays to complex dst-arrays;
#X text 37 147 list of 4 floats:;
@@ -155,35 +221,30 @@ complex src-arrays to complex dst-arrays;
#X text 49 158 1.) src_re-onset;
#X text 49 168 2.) src_im-onset;
#X msg 62 207 20 20 30 30;
-#X text 259 402 4.arg: <symbol> imag_destination-name;
-#X text 259 390 3.arg: <symbol> real_destination-name;
-#X text 259 379 2.arg: <symbol> imag_source-name;
-#X text 259 368 1.arg: <symbol> real_source-name;
-#X text 259 414 5.arg: <float> fftsize;
-#N canvas 0 0 450 300 graph1 0;
+#X text 259 412 4.arg: <symbol> imag_destination-name;
+#X text 259 400 3.arg: <symbol> real_destination-name;
+#X text 259 389 2.arg: <symbol> imag_source-name;
+#X text 259 378 1.arg: <symbol> real_source-name;
+#X text 259 424 5.arg: <float> fftsize;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src_im 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 124 graph;
+#X restore 694 124 graph;
#X obj 24 94 tab_fft src_re src_im dst_re dst_im 64;
#X msg 76 230 src_re src_re;
#X msg 90 253 src_im src_im;
#X obj 62 348 tab_fft src_re src_im dst_re dst_im 64;
#X msg 546 283 \; src_re const 0 \; src_im const 0;
#X floatatom 474 132 5 0 63 0 - - -;
-#N canvas 0 0 470 320 generate_a_dirac 0;
-#X msg 61 106 \$1 1 1;
-#X obj 61 83 t f b;
+#N canvas 0 22 478 328 generate_a_dirac 0;
#X obj 61 62 clip 0 63;
#X obj 61 32 inlet;
-#X obj 86 142 tab_const src_im;
-#X connect 0 0 4 0;
+#X msg 62 88 \; src_im const 0 \; src_im \$1 1;
+#X connect 0 0 2 0;
#X connect 1 0 0 0;
-#X connect 1 1 4 0;
-#X connect 2 0 1 0;
-#X connect 3 0 2 0;
#X restore 474 151 pd generate_a_dirac;
-#X floatatom 514 132 5 -31 31 0 - - -;
-#N canvas 0 0 483 407 generate_a_cos 0;
+#X floatatom 514 132 5 -32 32 0 - - -;
+#N canvas 0 22 495 419 generate_a_cos 0;
#X obj 120 18 inlet;
#X obj 219 176 t f f;
#X obj 219 211 / 32;
@@ -191,51 +252,87 @@ complex src-arrays to complex dst-arrays;
#X obj 219 283 cos;
#X obj 219 257 * 8;
#X obj 219 308 / 32;
-#X obj 219 106 clip 0 31;
#X obj 219 127 t b f;
-#X obj 219 153 for++ 0 63;
#X obj 120 43 moses 0;
#X obj 39 178 t f f;
#X obj 39 213 / 32;
#X obj 39 234 * 3.14159;
#X obj 39 285 cos;
#X obj 39 259 * 8;
-#X obj 39 108 clip 0 31;
#X obj 39 129 t b f;
-#X obj 39 155 for++ 0 63;
#X obj 90 70 * -1;
#X obj 39 310 / -32;
#X obj 40 334 tabwrite src_im;
#X obj 220 331 tabwrite src_im;
-#X connect 0 0 10 0;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 39 153 pd counter;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 219 153 pd counter;
+#X obj 218 106 clip 0 32;
+#X obj 39 108 clip 0 32;
+#X connect 0 0 8 0;
#X connect 1 0 2 0;
-#X connect 1 1 22 1;
+#X connect 1 1 18 1;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
#X connect 4 0 6 0;
#X connect 5 0 4 0;
-#X connect 6 0 22 0;
-#X connect 7 0 8 0;
-#X connect 8 0 9 0;
-#X connect 8 1 5 1;
-#X connect 9 0 1 0;
-#X connect 10 0 19 0;
-#X connect 10 1 7 0;
-#X connect 11 0 12 0;
-#X connect 11 1 21 1;
-#X connect 12 0 13 0;
-#X connect 13 0 15 0;
-#X connect 14 0 20 0;
-#X connect 15 0 14 0;
+#X connect 6 0 18 0;
+#X connect 7 0 20 0;
+#X connect 7 1 5 1;
+#X connect 8 0 15 0;
+#X connect 8 1 21 0;
+#X connect 9 0 10 0;
+#X connect 9 1 17 1;
+#X connect 10 0 11 0;
+#X connect 11 0 13 0;
+#X connect 12 0 16 0;
+#X connect 13 0 12 0;
+#X connect 14 0 19 0;
+#X connect 14 1 13 1;
+#X connect 15 0 22 0;
#X connect 16 0 17 0;
-#X connect 17 0 18 0;
-#X connect 17 1 15 1;
-#X connect 18 0 11 0;
-#X connect 19 0 16 0;
-#X connect 20 0 21 0;
+#X connect 19 0 9 0;
+#X connect 20 0 1 0;
+#X connect 21 0 7 0;
+#X connect 22 0 14 0;
#X restore 514 171 pd generate_a_cos;
#X floatatom 555 132 5 -31 31 0 - - -;
-#N canvas 0 0 487 411 generate_a_sin 0;
+#N canvas 0 22 491 415 generate_a_sin 0;
#X obj 102 37 inlet;
#X obj 246 182 t f f;
#X obj 246 217 / 32;
@@ -244,7 +341,6 @@ complex src-arrays to complex dst-arrays;
#X obj 246 314 / 32;
#X obj 246 112 clip 0 31;
#X obj 246 133 t b f;
-#X obj 246 159 for++ 0 63;
#X obj 246 289 sin;
#X obj 54 180 t f f;
#X obj 54 215 / 32;
@@ -252,52 +348,90 @@ complex src-arrays to complex dst-arrays;
#X obj 54 261 * 8;
#X obj 54 110 clip 0 31;
#X obj 54 131 t b f;
-#X obj 54 157 for++ 0 63;
#X obj 54 287 sin;
#X obj 54 312 / -32;
#X obj 102 60 moses 0;
#X obj 54 88 * -1;
#X obj 246 337 tabwrite src_im;
#X obj 54 336 tabwrite src_im;
-#X connect 0 0 19 0;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 54 156 pd counter;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 246 156 pd counter;
+#X connect 0 0 17 0;
#X connect 1 0 2 0;
-#X connect 1 1 21 1;
+#X connect 1 1 19 1;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
-#X connect 4 0 9 0;
-#X connect 5 0 21 0;
+#X connect 4 0 8 0;
+#X connect 5 0 19 0;
#X connect 6 0 7 0;
-#X connect 7 0 8 0;
+#X connect 7 0 22 0;
#X connect 7 1 4 1;
-#X connect 8 0 1 0;
-#X connect 9 0 5 0;
+#X connect 8 0 5 0;
+#X connect 9 0 10 0;
+#X connect 9 1 20 1;
#X connect 10 0 11 0;
-#X connect 10 1 22 1;
#X connect 11 0 12 0;
-#X connect 12 0 13 0;
-#X connect 13 0 17 0;
-#X connect 14 0 15 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 21 0;
+#X connect 14 1 12 1;
#X connect 15 0 16 0;
-#X connect 15 1 13 1;
-#X connect 16 0 10 0;
+#X connect 16 0 20 0;
#X connect 17 0 18 0;
-#X connect 18 0 22 0;
-#X connect 19 0 20 0;
-#X connect 19 1 6 0;
-#X connect 20 0 14 0;
+#X connect 17 1 6 0;
+#X connect 18 0 13 0;
+#X connect 21 0 9 0;
+#X connect 22 0 1 0;
#X restore 555 192 pd generate_a_sin;
-#X connect 2 0 38 0;
-#X connect 6 0 41 0;
-#X connect 7 0 41 0;
-#X connect 8 0 41 0;
-#X connect 9 0 19 0;
-#X connect 20 0 21 0;
-#X connect 22 0 23 0;
-#X connect 31 0 41 0;
-#X connect 38 0 3 0;
-#X connect 39 0 41 0;
-#X connect 40 0 41 0;
-#X connect 41 0 4 0;
-#X connect 43 0 44 0;
-#X connect 45 0 46 0;
-#X connect 47 0 48 0;
+#X text 37 441 (c) Thomas Musil 2000 - 2009;
+#X connect 2 0 37 0;
+#X connect 6 0 40 0;
+#X connect 7 0 40 0;
+#X connect 8 0 40 0;
+#X connect 9 0 18 0;
+#X connect 19 0 20 0;
+#X connect 21 0 22 0;
+#X connect 30 0 40 0;
+#X connect 37 0 3 0;
+#X connect 38 0 40 0;
+#X connect 39 0 40 0;
+#X connect 40 0 4 0;
+#X connect 42 0 43 0;
+#X connect 44 0 45 0;
+#X connect 46 0 47 0;
diff --git a/tab_find_exact_peaks-help.pd b/tab_find_exact_peaks-help.pd
index 8a2981c..2d85bc5 100644
--- a/tab_find_exact_peaks-help.pd
+++ b/tab_find_exact_peaks-help.pd
@@ -1,88 +1,90 @@
-#N canvas 116 92 824 482 10;
-#X obj 60 52 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 31 331 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X text 200 306 1.arg: <symbol> source-name;
-#X floatatom 94 372 5 0 0 0 - - -;
-#X floatatom 143 373 5 0 0 0 - - -;
-#X msg 88 78 src src;
-#X msg 118 102 amp_sort;
-#X msg 120 124 freq_sort;
-#X floatatom 198 371 5 0 0 0 - - -;
-#X obj 263 369 pack 0 0 0;
-#X obj 263 392 print;
-#X msg 233 173 abs_min_height_diff 10;
-#X text 69 385 sort_index;
-#X text 204 382 amp;
-#X text 147 387 index;
-#N canvas 0 0 450 300 graph1 0;
-#X array src 100 float 1;
-#A 0 9.99997 9.28569 9.28569 10.7143 7.14284 7.85712 8.5714 39 10 11
-38 8.5714 7.85712 8.5714 9.28569 8.5714 9.99997 39 40 41 38 12.8571
-12.8571 14.2857 12.8571 11.4285 12.1428 11.4285 9.99997 10.7143 11.4285
-9.99997 9.28569 9.28569 9.99997 10.7143 10.7143 45 9.99997 9.99997
-10.7143 11.4285 12.1428 10.7143 11.4285 12.1428 11.4285 46 11.4285
-11.4285 11.4285 12.1428 12.8571 11.4285 11.4285 12.1428 12.8571 12.1428
-12.1428 12.1428 12.1428 12.1428 11.4285 11.4285 11.4285 11.4285 10.7143
-48 49 43 11.4285 12.1428 13.5714 15 13.5714 13.5714 14.2857 14.2857
-15 15 14.2857 14.2857 14.2857 15 15 15.7142 15.7142 51 53 15 15 15
-15 15 14.2857 14.2857 15 15.7142 16.4285 16.4285;
-#X coords 0 100 99 0 200 140 1;
-#X restore 578 93 graph;
-#X msg 171 149 max_peaks 9;
-#X text 20 347 ready;
-#X msg 289 194 width_range 1 4;
-#X msg 289 216 width_range 1 1;
-#N canvas 0 0 466 316 Pd 0;
-#X msg 355 125 \; src const 0;
-#X msg 303 175 \; src 37 45;
-#X msg 310 223 \; src 47 46;
-#X msg 187 177 \; src 67 48 49 43;
-#X msg 180 218 \; src 87 51 53;
-#X msg 44 223 \; src 7 39 10 11 38;
-#X msg 50 181 \; src 17 39 40 41 38;
-#X obj 65 25 loadbang;
-#X msg 33 50 \; src xticks 0 1 5;
-#X msg 34 84 \; src xlabel -5.15 0 10 20 30 40 50 60 70 80 90;
-#X connect 7 0 8 0;
-#X connect 7 0 9 0;
-#X restore 636 289 pd;
-#X obj 297 69 loadbang;
-#X text 89 50 <bang> calculate all peaks (index bin amplitude);
-#X text 218 61 of an array;
-#X text 78 442 IEM KUG;
-#X text 62 430 musil;
-#X text 92 430 @;
-#X text 98 430 iem.at;
-#X text 61 452 Graz \, Austria;
-#X text 13 419 (c) Thomas Musil 2000 - 2006;
-#X text 218 296 initial arguments:;
-#X text 184 112 kind of order;
-#X text 250 148 maximum number of peaks detected;
-#X text 373 168 vertical difference between peak;
-#X text 386 177 and noise;
-#X text 391 202 width range of peak in bins;
-#X text 21 6 tab_exact_find_peaks;
-#X obj 60 302 tab_find_exact_peaks src;
-#X text 184 7 same like tab_find_peaks;
-#X connect 0 0 37 0;
-#X connect 5 0 37 0;
-#X connect 6 0 37 0;
-#X connect 7 0 37 0;
-#X connect 9 0 10 0;
-#X connect 11 0 37 0;
-#X connect 16 0 37 0;
-#X connect 18 0 37 0;
-#X connect 19 0 37 0;
-#X connect 21 0 6 0;
-#X connect 21 0 16 0;
-#X connect 21 0 11 0;
-#X connect 21 0 18 0;
-#X connect 37 0 1 0;
-#X connect 37 1 3 0;
-#X connect 37 1 9 0;
-#X connect 37 2 4 0;
-#X connect 37 2 9 1;
-#X connect 37 3 8 0;
-#X connect 37 3 9 2;
+#N canvas 178 103 949 490 10;
+#X obj 60 52 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 31 331 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 249 306 1.arg: <symbol> source-name;
+#X floatatom 94 372 5 0 0 0 - - -;
+#X floatatom 143 373 5 0 0 0 - - -;
+#X msg 88 78 src src;
+#X msg 118 102 amp_sort;
+#X msg 120 124 freq_sort;
+#X floatatom 198 371 5 0 0 0 - - -;
+#X obj 263 369 pack 0 0 0;
+#X obj 263 392 print;
+#X msg 233 173 abs_min_height_diff 10;
+#X text 69 385 sort_index;
+#X text 204 382 amp;
+#X text 147 387 index;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array src 100 float 1;
+#A 0 9.99997 9.28569 9.28569 10.7143 7.14284 7.85712 8.5714 39 10 11
+38 8.5714 7.85712 8.5714 9.28569 8.5714 9.99997 39 40 41 38 12.8571
+12.8571 14.2857 12.8571 11.4285 12.1428 11.4285 9.99997 10.7143 11.4285
+9.99997 9.28569 9.28569 9.99997 10.7143 10.7143 45 9.99997 9.99997
+10.7143 11.4285 12.1428 10.7143 11.4285 12.1428 11.4285 46 11.4285
+11.4285 11.4285 12.1428 12.8571 11.4285 11.4285 12.1428 12.8571 12.1428
+12.1428 12.1428 12.1428 12.1428 11.4285 11.4285 11.4285 11.4285 10.7143
+48 49 43 11.4285 12.1428 13.5714 15 13.5714 13.5714 14.2857 14.2857
+15 15 14.2857 14.2857 14.2857 15 15 15.7142 15.7142 51 53 15 15 15
+15 15 14.2857 14.2857 15 15.7142 16.4285 16.4285;
+#X coords 0 100 99 0 200 140 1;
+#X restore 658 93 graph;
+#X msg 171 149 max_peaks 9;
+#X text 20 347 ready;
+#X msg 289 194 width_range 1 4;
+#X msg 289 216 width_range 1 1;
+#N canvas 0 22 466 316 (subpatch) 0;
+#X msg 355 125 \; src const 0;
+#X msg 303 175 \; src 37 45;
+#X msg 310 223 \; src 47 46;
+#X msg 187 177 \; src 67 48 49 43;
+#X msg 180 218 \; src 87 51 53;
+#X msg 44 223 \; src 7 39 10 11 38;
+#X msg 50 181 \; src 17 39 40 41 38;
+#X obj 65 25 loadbang;
+#X msg 33 50 \; src xticks 0 1 5;
+#X msg 34 84 \; src xlabel -5.15 0 10 20 30 40 50 60 70 80 90;
+#X connect 7 0 8 0;
+#X connect 7 0 9 0;
+#X restore 716 289 pd;
+#X obj 314 73 loadbang;
+#X text 89 50 <bang> calculate all peaks (index bin amplitude);
+#X text 218 61 of an array;
+#X text 78 442 IEM KUG;
+#X text 57 430 musil;
+#X text 92 430 @;
+#X text 100 430 iem.at;
+#X text 61 452 Graz \, Austria;
+#X text 267 296 initial arguments:;
+#X text 192 111 kind of order;
+#X text 258 150 maximum number of peaks detected;
+#X text 395 168 vertical difference between peak;
+#X text 399 177 and noise;
+#X text 406 205 width range of peak in bins;
+#X text 21 6 tab_exact_find_peaks;
+#X obj 60 302 tab_find_exact_peaks src;
+#X text 184 7 same like tab_find_peaks;
+#X text 13 419 (c) Thomas Musil 2000 - 2009;
+#X msg 289 240 width_range 3 5;
+#X connect 0 0 36 0;
+#X connect 5 0 36 0;
+#X connect 6 0 36 0;
+#X connect 7 0 36 0;
+#X connect 9 0 10 0;
+#X connect 11 0 36 0;
+#X connect 16 0 36 0;
+#X connect 18 0 36 0;
+#X connect 19 0 36 0;
+#X connect 21 0 6 0;
+#X connect 21 0 16 0;
+#X connect 21 0 11 0;
+#X connect 21 0 18 0;
+#X connect 36 0 1 0;
+#X connect 36 1 3 0;
+#X connect 36 1 9 0;
+#X connect 36 2 4 0;
+#X connect 36 2 9 1;
+#X connect 36 3 8 0;
+#X connect 36 3 9 2;
+#X connect 39 0 36 0;
diff --git a/tab_find_peaks-help.pd b/tab_find_peaks-help.pd
index 0543166..7e2e5ba 100644
--- a/tab_find_peaks-help.pd
+++ b/tab_find_peaks-help.pd
@@ -1,4 +1,4 @@
-#N canvas 116 92 820 478 10;
+#N canvas 191 230 938 537 10;
#X obj 60 52 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 31 331 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
@@ -17,7 +17,7 @@
#X text 69 385 sort_index;
#X text 204 382 amp;
#X text 147 387 index;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src 100 float 1;
#A 0 9.99997 9.28569 9.28569 10.7143 7.14284 7.85712 8.5714 39 10 11
38 8.5714 7.85712 8.5714 9.28569 8.5714 9.99997 39 40 41 38 12.8571
@@ -30,13 +30,13 @@
15 15 14.2857 14.2857 14.2857 15 15 15.7142 15.7142 51 53 15 15 15
15 15 14.2857 14.2857 15 15.7142 16.4285 16.4285;
#X coords 0 100 99 0 200 140 1;
-#X restore 578 93 graph;
+#X restore 638 93 graph;
#X msg 171 149 max_peaks 9;
#X text 20 347 ready;
#X msg 289 194 width_range 1 4;
#X text 21 6 tab_find_peaks;
#X msg 289 216 width_range 1 1;
-#N canvas 0 0 466 316 Pd 0;
+#N canvas 0 22 470 320 (subpatch) 0;
#X msg 355 125 \; src const 0;
#X msg 303 175 \; src 37 45;
#X msg 310 223 \; src 47 46;
@@ -49,22 +49,22 @@
#X msg 34 84 \; src xlabel -5.15 0 10 20 30 40 50 60 70 80 90;
#X connect 7 0 8 0;
#X connect 7 0 9 0;
-#X restore 636 289 pd;
-#X obj 297 69 loadbang;
+#X restore 696 289 pd;
+#X obj 311 69 loadbang;
#X text 89 50 <bang> calculate all peaks (index bin amplitude);
#X text 218 61 of an array;
#X text 78 442 IEM KUG;
-#X text 62 430 musil;
+#X text 57 430 musil;
#X text 92 430 @;
-#X text 98 430 iem.at;
+#X text 100 430 iem.at;
#X text 61 452 Graz \, Austria;
-#X text 13 419 (c) Thomas Musil 2000 - 2006;
#X text 218 296 initial arguments:;
-#X text 184 112 kind of order;
-#X text 250 148 maximum number of peaks detected;
-#X text 373 168 vertical difference between peak;
-#X text 386 177 and noise;
-#X text 391 202 width range of peak in bins;
+#X text 190 111 kind of order;
+#X text 257 148 maximum number of peaks detected;
+#X text 395 171 vertical difference between peak;
+#X text 397 180 and noise;
+#X text 413 205 width range of peak in bins;
+#X text 13 419 (c) Thomas Musil 2000 - 2009;
#X connect 0 0 8 0;
#X connect 5 0 8 0;
#X connect 6 0 8 0;
diff --git a/tab_ifft-help.pd b/tab_ifft-help.pd
index 9e38776..7dbf73d 100644
--- a/tab_ifft-help.pd
+++ b/tab_ifft-help.pd
@@ -1,56 +1,48 @@
-#N canvas 29 19 957 536 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 265 105 961 540 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src_re 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 10 graph;
-#N canvas 0 0 450 300 graph1 0;
+#X restore 694 10 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst_re 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 239 graph;
+#X restore 694 239 graph;
#X obj 24 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 24 122 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 62 371 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst_im 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 353 graph;
+#X restore 694 353 graph;
#X msg 103 276 dst_re dst_re;
#X msg 118 299 dst_im dst_im;
#X msg 139 322 fftsize 64;
#X floatatom 474 22 5 0 63 0 - - -;
#X msg 546 341 \; dst_re const 0 \; dst_im const 0;
#X text 102 464 IEM KUG;
-#X text 86 452 musil;
+#X text 81 452 musil;
#X text 116 452 @;
-#X text 122 452 iem.at;
+#X text 124 452 iem.at;
#X text 85 474 Graz \, Austria;
-#X text 37 441 (c) Thomas Musil 2000 - 2006;
-#N canvas 0 0 470 320 generate_a_dirac 0;
-#X msg 61 106 \$1 1 1;
-#X obj 61 83 t f b;
+#N canvas 0 22 478 328 generate_a_dirac 0;
#X obj 61 62 clip 0 63;
#X obj 61 32 inlet;
-#X obj 86 142 tab_const src_re;
-#X connect 0 0 4 0;
+#X msg 60 103 \; src_re const 0 \; src_re \$1 1;
+#X connect 0 0 2 0;
#X connect 1 0 0 0;
-#X connect 1 1 4 0;
-#X connect 2 0 1 0;
-#X connect 3 0 2 0;
#X restore 474 41 pd generate_a_dirac;
-#X floatatom 514 22 5 -31 31 0 - - -;
-#N canvas 0 0 487 411 generate_a_cos 0;
+#X floatatom 514 22 5 -32 32 0 - - -;
+#N canvas 0 22 543 496 generate_a_cos 0;
#X obj 120 18 inlet;
#X obj 219 176 t f f;
#X obj 219 211 / 32;
#X obj 219 232 * 3.14159;
#X obj 219 283 cos;
#X obj 219 257 * 8;
-#X obj 219 106 clip 0 31;
#X obj 219 127 t b f;
-#X obj 219 153 for++ 0 63;
#X obj 219 331 tabwrite src_re;
#X obj 120 43 moses 0;
#X obj 39 178 t f f;
@@ -58,40 +50,78 @@
#X obj 39 234 * 3.14159;
#X obj 39 285 cos;
#X obj 39 259 * 8;
-#X obj 39 108 clip 0 31;
#X obj 39 129 t b f;
-#X obj 39 155 for++ 0 63;
#X obj 39 333 tabwrite src_re;
#X obj 90 70 * -1;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 219 151 pd counter;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 38 154 pd counter;
#X obj 39 310 * -1;
-#X connect 0 0 10 0;
+#X obj 219 106 clip 0 32;
+#X obj 39 108 clip 0 32;
+#X connect 0 0 8 0;
#X connect 1 0 2 0;
-#X connect 1 1 9 1;
+#X connect 1 1 7 1;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
-#X connect 4 0 9 0;
+#X connect 4 0 7 0;
#X connect 5 0 4 0;
-#X connect 6 0 7 0;
-#X connect 7 0 8 0;
-#X connect 7 1 5 1;
-#X connect 8 0 1 0;
-#X connect 10 0 20 0;
-#X connect 10 1 6 0;
-#X connect 11 0 12 0;
-#X connect 11 1 19 1;
-#X connect 12 0 13 0;
-#X connect 13 0 15 0;
-#X connect 14 0 21 0;
-#X connect 15 0 14 0;
-#X connect 16 0 17 0;
-#X connect 17 0 18 0;
-#X connect 17 1 15 1;
-#X connect 18 0 11 0;
-#X connect 20 0 16 0;
-#X connect 21 0 19 0;
+#X connect 6 0 17 0;
+#X connect 6 1 5 1;
+#X connect 8 0 16 0;
+#X connect 8 1 20 0;
+#X connect 9 0 10 0;
+#X connect 9 1 15 1;
+#X connect 10 0 11 0;
+#X connect 11 0 13 0;
+#X connect 12 0 19 0;
+#X connect 13 0 12 0;
+#X connect 14 0 18 0;
+#X connect 14 1 13 1;
+#X connect 16 0 21 0;
+#X connect 17 0 1 0;
+#X connect 18 0 9 0;
+#X connect 19 0 15 0;
+#X connect 20 0 6 0;
+#X connect 21 0 14 0;
#X restore 514 61 pd generate_a_cos;
#X floatatom 555 22 5 -31 31 0 - - -;
-#N canvas 0 0 487 411 generate_a_sin 0;
+#N canvas 0 22 499 423 generate_a_sin 0;
#X obj 102 37 inlet;
#X obj 246 182 t f f;
#X obj 246 217 / 32;
@@ -99,7 +129,6 @@
#X obj 246 263 * 8;
#X obj 246 112 clip 0 31;
#X obj 246 133 t b f;
-#X obj 246 159 for++ 0 63;
#X obj 246 337 tabwrite src_re;
#X obj 246 289 sin;
#X obj 54 180 t f f;
@@ -107,123 +136,190 @@
#X obj 54 236 * 3.14159;
#X obj 54 261 * 8;
#X obj 54 110 clip 0 31;
-#X obj 54 131 t b f;
-#X obj 54 157 for++ 0 63;
+#X obj 54 132 t b f;
#X obj 54 335 tabwrite src_re;
#X obj 54 287 sin;
#X obj 102 60 moses 0;
#X obj 54 88 * -1;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 54 156 pd counter;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 246 156 pd counter;
#X obj 54 312 * -1;
-#X connect 0 0 19 0;
+#X connect 0 0 17 0;
#X connect 1 0 2 0;
-#X connect 1 1 8 1;
+#X connect 1 1 7 1;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
-#X connect 4 0 9 0;
+#X connect 4 0 8 0;
#X connect 5 0 6 0;
-#X connect 6 0 7 0;
+#X connect 6 0 20 0;
#X connect 6 1 4 1;
-#X connect 7 0 1 0;
-#X connect 9 0 8 0;
+#X connect 8 0 7 0;
+#X connect 9 0 10 0;
+#X connect 9 1 15 1;
#X connect 10 0 11 0;
-#X connect 10 1 17 1;
#X connect 11 0 12 0;
-#X connect 12 0 13 0;
-#X connect 13 0 18 0;
-#X connect 14 0 15 0;
-#X connect 15 0 16 0;
-#X connect 15 1 13 1;
-#X connect 16 0 10 0;
-#X connect 18 0 21 0;
-#X connect 19 0 20 0;
-#X connect 19 1 5 0;
-#X connect 20 0 14 0;
-#X connect 21 0 17 0;
+#X connect 12 0 16 0;
+#X connect 13 0 14 0;
+#X connect 14 0 19 0;
+#X connect 14 1 12 1;
+#X connect 16 0 21 0;
+#X connect 17 0 18 0;
+#X connect 17 1 5 0;
+#X connect 18 0 13 0;
+#X connect 19 0 9 0;
+#X connect 20 0 1 0;
+#X connect 21 0 15 0;
#X restore 555 82 pd generate_a_sin;
-#X text 309 355 initial arguments:;
+#X text 299 365 initial arguments:;
#X text 37 147 list of 4 floats:;
#X text 49 178 3.) dst_re-onset;
#X text 49 188 4.) dst_im-onset;
#X text 49 158 1.) src_re-onset;
#X text 49 168 2.) src_im-onset;
#X msg 62 207 20 20 30 30;
-#X text 269 402 4.arg: <symbol> imag_destination-name;
-#X text 269 390 3.arg: <symbol> real_destination-name;
-#X text 269 379 2.arg: <symbol> imag_source-name;
-#X text 269 368 1.arg: <symbol> real_source-name;
-#X text 269 414 5.arg: <float> fftsize;
-#N canvas 0 0 450 300 graph1 0;
+#X text 259 412 4.arg: <symbol> imag_destination-name;
+#X text 259 400 3.arg: <symbol> real_destination-name;
+#X text 259 389 2.arg: <symbol> imag_source-name;
+#X text 259 378 1.arg: <symbol> real_source-name;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src_im 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 124 graph;
+#X restore 694 124 graph;
#X msg 76 230 src_re src_re;
#X msg 90 253 src_im src_im;
#X msg 546 283 \; src_re const 0 \; src_im const 0;
#X floatatom 474 132 5 0 63 0 - - -;
-#N canvas 0 0 470 320 generate_a_dirac 0;
-#X msg 61 106 \$1 1 1;
-#X obj 61 83 t f b;
+#N canvas 0 22 478 328 generate_a_dirac 0;
#X obj 61 62 clip 0 63;
#X obj 61 32 inlet;
-#X obj 86 142 tab_const src_im;
-#X connect 0 0 4 0;
+#X msg 61 99 \; src_im const 0 \; src_im \$1 1;
+#X connect 0 0 2 0;
#X connect 1 0 0 0;
-#X connect 1 1 4 0;
-#X connect 2 0 1 0;
-#X connect 3 0 2 0;
#X restore 474 151 pd generate_a_dirac;
-#X floatatom 514 132 5 -31 31 0 - - -;
-#N canvas 0 0 487 411 generate_a_cos 0;
+#X floatatom 514 132 5 -32 32 0 - - -;
+#N canvas 0 22 499 423 generate_a_cos 0;
#X obj 120 18 inlet;
#X obj 219 176 t f f;
#X obj 219 211 / 32;
#X obj 219 232 * 3.14159;
#X obj 219 283 cos;
#X obj 219 257 * 8;
-#X obj 219 106 clip 0 31;
#X obj 219 127 t b f;
-#X obj 219 153 for++ 0 63;
#X obj 120 43 moses 0;
#X obj 39 178 t f f;
#X obj 39 213 / 32;
#X obj 39 234 * 3.14159;
#X obj 39 285 cos;
#X obj 39 259 * 8;
-#X obj 39 108 clip 0 31;
#X obj 39 129 t b f;
-#X obj 39 155 for++ 0 63;
#X obj 90 70 * -1;
#X obj 40 334 tabwrite src_im;
#X obj 220 331 tabwrite src_im;
-#X obj 39 310 * -1;
-#X connect 0 0 9 0;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 39 153 pd counter;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 219 153 pd counter;
+#X obj 39 311 * -1;
+#X obj 219 106 clip 0 32;
+#X obj 39 108 clip 0 32;
+#X connect 0 0 7 0;
#X connect 1 0 2 0;
-#X connect 1 1 20 1;
+#X connect 1 1 16 1;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
-#X connect 4 0 20 0;
+#X connect 4 0 16 0;
#X connect 5 0 4 0;
-#X connect 6 0 7 0;
-#X connect 7 0 8 0;
-#X connect 7 1 5 1;
-#X connect 8 0 1 0;
-#X connect 9 0 18 0;
-#X connect 9 1 6 0;
-#X connect 10 0 11 0;
-#X connect 10 1 19 1;
-#X connect 11 0 12 0;
-#X connect 12 0 14 0;
-#X connect 13 0 21 0;
-#X connect 14 0 13 0;
-#X connect 15 0 16 0;
-#X connect 16 0 17 0;
-#X connect 16 1 14 1;
-#X connect 17 0 10 0;
-#X connect 18 0 15 0;
-#X connect 21 0 19 0;
+#X connect 6 0 18 0;
+#X connect 6 1 5 1;
+#X connect 7 0 14 0;
+#X connect 7 1 20 0;
+#X connect 8 0 9 0;
+#X connect 8 1 15 1;
+#X connect 9 0 10 0;
+#X connect 10 0 12 0;
+#X connect 11 0 19 0;
+#X connect 12 0 11 0;
+#X connect 13 0 17 0;
+#X connect 13 1 12 1;
+#X connect 14 0 21 0;
+#X connect 17 0 8 0;
+#X connect 18 0 1 0;
+#X connect 19 0 15 0;
+#X connect 20 0 6 0;
+#X connect 21 0 13 0;
#X restore 514 171 pd generate_a_cos;
#X floatatom 555 132 5 -31 31 0 - - -;
-#N canvas 0 0 491 415 generate_a_sin 0;
+#N canvas 0 22 495 419 generate_a_sin 0;
#X obj 102 37 inlet;
#X obj 246 182 t f f;
#X obj 246 217 / 32;
@@ -231,7 +327,6 @@
#X obj 246 263 * 8;
#X obj 246 112 clip 0 31;
#X obj 246 133 t b f;
-#X obj 246 159 for++ 0 63;
#X obj 246 289 sin;
#X obj 54 180 t f f;
#X obj 54 215 / 32;
@@ -239,57 +334,96 @@
#X obj 54 261 * 8;
#X obj 54 110 clip 0 31;
#X obj 54 131 t b f;
-#X obj 54 157 for++ 0 63;
#X obj 54 287 sin;
#X obj 102 60 moses 0;
#X obj 54 88 * -1;
#X obj 246 337 tabwrite src_im;
#X obj 54 336 tabwrite src_im;
-#X obj 54 312 * -1;
-#X connect 0 0 17 0;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 54 156 pd counter;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 246 156 pd counter;
+#X obj 53 312 * -1;
+#X connect 0 0 15 0;
#X connect 1 0 2 0;
-#X connect 1 1 19 1;
+#X connect 1 1 17 1;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
-#X connect 4 0 8 0;
+#X connect 4 0 7 0;
#X connect 5 0 6 0;
-#X connect 6 0 7 0;
+#X connect 6 0 20 0;
#X connect 6 1 4 1;
-#X connect 7 0 1 0;
-#X connect 8 0 19 0;
+#X connect 7 0 17 0;
+#X connect 8 0 9 0;
+#X connect 8 1 18 1;
#X connect 9 0 10 0;
-#X connect 9 1 20 1;
#X connect 10 0 11 0;
-#X connect 11 0 12 0;
-#X connect 12 0 16 0;
-#X connect 13 0 14 0;
-#X connect 14 0 15 0;
-#X connect 14 1 12 1;
-#X connect 15 0 9 0;
-#X connect 16 0 21 0;
-#X connect 17 0 18 0;
-#X connect 17 1 5 0;
-#X connect 18 0 13 0;
-#X connect 21 0 20 0;
+#X connect 11 0 14 0;
+#X connect 12 0 13 0;
+#X connect 13 0 19 0;
+#X connect 13 1 11 1;
+#X connect 14 0 21 0;
+#X connect 15 0 16 0;
+#X connect 15 1 5 0;
+#X connect 16 0 12 0;
+#X connect 19 0 8 0;
+#X connect 20 0 1 0;
+#X connect 21 0 18 0;
#X restore 555 192 pd generate_a_sin;
+#X text 37 441 (c) Thomas Musil 2000 - 2009;
#X text 10 0 tab_ifft;
#X text 93 -1 complex inverse FTT with arrays;
#X text 45 56 <bang> calculates a complex inverse fourier transformation
of complex src-arrays to complex dst-arrays;
#X obj 24 94 tab_ifft src_re src_im dst_re dst_im 64;
#X obj 62 348 tab_ifft src_re src_im dst_re dst_im 64;
-#X connect 2 0 47 0;
-#X connect 6 0 48 0;
-#X connect 7 0 48 0;
-#X connect 8 0 48 0;
-#X connect 9 0 17 0;
-#X connect 18 0 19 0;
-#X connect 20 0 21 0;
-#X connect 28 0 48 0;
-#X connect 35 0 48 0;
-#X connect 36 0 48 0;
+#X text 259 424 5.arg: <float> ifftsize;
+#X connect 2 0 46 0;
+#X connect 6 0 47 0;
+#X connect 7 0 47 0;
+#X connect 8 0 47 0;
+#X connect 9 0 16 0;
+#X connect 17 0 18 0;
+#X connect 19 0 20 0;
+#X connect 27 0 47 0;
+#X connect 33 0 47 0;
+#X connect 34 0 47 0;
+#X connect 36 0 37 0;
#X connect 38 0 39 0;
#X connect 40 0 41 0;
-#X connect 42 0 43 0;
-#X connect 47 0 3 0;
-#X connect 48 0 4 0;
+#X connect 46 0 3 0;
+#X connect 47 0 4 0;
diff --git a/tab_rfft-help.pd b/tab_rfft-help.pd
index 34d0c1a..f3ce27c 100644
--- a/tab_rfft-help.pd
+++ b/tab_rfft-help.pd
@@ -1,148 +1,209 @@
-#N canvas 29 19 957 536 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 965 544 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 10 graph;
-#N canvas 0 0 450 300 graph1 0;
+#X restore 694 10 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst_re 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 239 graph;
+#X restore 694 239 graph;
#X obj 24 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 24 122 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 61 345 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst_im 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 353 graph;
+#X restore 694 353 graph;
#X msg 89 252 dst_re dst_re;
#X msg 104 275 dst_im dst_im;
#X msg 125 298 fftsize 64;
#X floatatom 474 22 5 0 63 0 - - -;
#X msg 546 341 \; dst_re const 0 \; dst_im const 0;
-#X text 102 464 IEM KUG;
-#X text 86 452 musil;
-#X text 116 452 @;
-#X text 122 452 iem.at;
-#X text 85 474 Graz \, Austria;
-#X text 37 441 (c) Thomas Musil 2000 - 2006;
-#N canvas 0 0 474 324 generate_a_dirac 0;
-#X msg 61 106 \$1 1 1;
-#X obj 61 83 t f b;
+#N canvas 0 22 482 332 generate_a_dirac 0;
#X obj 61 62 clip 0 63;
#X obj 61 32 inlet;
-#X obj 86 142 tab_const src;
-#X connect 0 0 4 0;
+#X msg 61 89 \; src const 0 \; src \$1 1;
+#X connect 0 0 2 0;
#X connect 1 0 0 0;
-#X connect 1 1 4 0;
-#X connect 2 0 1 0;
-#X connect 3 0 2 0;
#X restore 474 41 pd generate_a_dirac;
-#X floatatom 514 22 5 -31 31 0 - - -;
-#N canvas 0 0 495 419 generate_a_cos 0;
+#X floatatom 514 22 5 -32 32 0 - - -;
+#N canvas 0 22 507 431 generate_a_cos 0;
#X obj 120 18 inlet;
#X obj 219 176 t f f;
#X obj 219 211 / 32;
#X obj 219 232 * 3.14159;
#X obj 219 283 cos;
#X obj 219 257 * 8;
-#X obj 219 106 clip 0 31;
+#X obj 219 308 / 32;
#X obj 219 127 t b f;
-#X obj 219 153 for++ 0 63;
#X obj 120 43 moses 0;
#X obj 39 178 t f f;
#X obj 39 213 / 32;
#X obj 39 234 * 3.14159;
#X obj 39 285 cos;
#X obj 39 259 * 8;
-#X obj 39 108 clip 0 31;
#X obj 39 129 t b f;
-#X obj 39 155 for++ 0 63;
#X obj 90 70 * -1;
-#X obj 219 331 tabwrite src;
-#X obj 39 333 tabwrite src;
#X obj 39 310 / -32;
-#X obj 219 308 / 32;
-#X connect 0 0 9 0;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 219 151 pd counter;
+#N canvas 193 158 458 308 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 38 154 pd counter;
+#X obj 219 106 clip 0 32;
+#X obj 39 108 clip 0 32;
+#X obj 39 333 tabwrite src;
+#X obj 219 331 tabwrite src;
+#X connect 0 0 8 0;
#X connect 1 0 2 0;
-#X connect 1 1 19 1;
+#X connect 1 1 22 1;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
-#X connect 4 0 22 0;
+#X connect 4 0 6 0;
#X connect 5 0 4 0;
-#X connect 6 0 7 0;
-#X connect 7 0 8 0;
+#X connect 6 0 22 0;
+#X connect 7 0 17 0;
#X connect 7 1 5 1;
-#X connect 8 0 1 0;
-#X connect 9 0 18 0;
-#X connect 9 1 6 0;
+#X connect 8 0 15 0;
+#X connect 8 1 19 0;
+#X connect 9 0 10 0;
+#X connect 9 1 21 1;
#X connect 10 0 11 0;
-#X connect 10 1 20 1;
-#X connect 11 0 12 0;
-#X connect 12 0 14 0;
-#X connect 13 0 21 0;
-#X connect 14 0 13 0;
-#X connect 15 0 16 0;
-#X connect 16 0 17 0;
-#X connect 16 1 14 1;
-#X connect 17 0 10 0;
-#X connect 18 0 15 0;
-#X connect 21 0 20 0;
-#X connect 22 0 19 0;
+#X connect 11 0 13 0;
+#X connect 12 0 16 0;
+#X connect 13 0 12 0;
+#X connect 14 0 18 0;
+#X connect 14 1 13 1;
+#X connect 15 0 20 0;
+#X connect 16 0 21 0;
+#X connect 17 0 1 0;
+#X connect 18 0 9 0;
+#X connect 19 0 7 0;
+#X connect 20 0 14 0;
#X restore 514 61 pd generate_a_cos;
#X floatatom 555 22 5 -31 31 0 - - -;
-#N canvas 0 0 499 423 generate_a_sin 0;
+#N canvas 0 22 503 427 generate_a_sin 0;
#X obj 102 37 inlet;
#X obj 246 182 t f f;
#X obj 246 217 / 32;
#X obj 246 238 * 3.14159;
#X obj 246 263 * 8;
+#X obj 246 314 / 32;
#X obj 246 112 clip 0 31;
#X obj 246 133 t b f;
-#X obj 246 159 for++ 0 63;
#X obj 246 289 sin;
#X obj 54 180 t f f;
#X obj 54 215 / 32;
#X obj 54 236 * 3.14159;
#X obj 54 261 * 8;
#X obj 54 110 clip 0 31;
-#X obj 54 131 t b f;
-#X obj 54 157 for++ 0 63;
+#X obj 54 132 t b f;
#X obj 54 287 sin;
+#X obj 54 312 / -32;
#X obj 102 60 moses 0;
#X obj 54 88 * -1;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 54 156 pd counter;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 246 156 pd counter;
+#X obj 54 334 tabwrite src;
#X obj 246 337 tabwrite src;
-#X obj 54 335 tabwrite src;
-#X obj 54 311 / -32;
-#X obj 246 313 / 32;
#X connect 0 0 17 0;
#X connect 1 0 2 0;
-#X connect 1 1 19 1;
+#X connect 1 1 22 1;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 8 0;
-#X connect 5 0 6 0;
+#X connect 5 0 22 0;
#X connect 6 0 7 0;
-#X connect 6 1 4 1;
-#X connect 7 0 1 0;
-#X connect 8 0 22 0;
+#X connect 7 0 20 0;
+#X connect 7 1 4 1;
+#X connect 8 0 5 0;
#X connect 9 0 10 0;
-#X connect 9 1 20 1;
+#X connect 9 1 21 1;
#X connect 10 0 11 0;
#X connect 11 0 12 0;
-#X connect 12 0 16 0;
+#X connect 12 0 15 0;
#X connect 13 0 14 0;
-#X connect 14 0 15 0;
+#X connect 14 0 19 0;
#X connect 14 1 12 1;
-#X connect 15 0 9 0;
+#X connect 15 0 16 0;
#X connect 16 0 21 0;
#X connect 17 0 18 0;
-#X connect 17 1 5 0;
+#X connect 17 1 6 0;
#X connect 18 0 13 0;
-#X connect 21 0 20 0;
-#X connect 22 0 19 0;
+#X connect 19 0 9 0;
+#X connect 20 0 1 0;
#X restore 555 82 pd generate_a_sin;
#X text 309 355 initial arguments:;
#X msg 546 283 \; src const 0;
@@ -162,14 +223,20 @@
real src-array to complex dst-arrays;
#X obj 24 94 tab_rfft src dst_re dst_im 64;
#X obj 62 322 tab_rfft src dst_re dst_im 64;
-#X connect 2 0 37 0;
-#X connect 6 0 38 0;
-#X connect 7 0 38 0;
-#X connect 8 0 38 0;
-#X connect 9 0 17 0;
-#X connect 18 0 19 0;
-#X connect 20 0 21 0;
-#X connect 24 0 38 0;
-#X connect 25 0 38 0;
-#X connect 37 0 3 0;
-#X connect 38 0 4 0;
+#X text 102 464 IEM KUG;
+#X text 81 452 musil;
+#X text 116 452 @;
+#X text 124 452 iem.at;
+#X text 85 474 Graz \, Austria;
+#X text 37 441 (c) Thomas Musil 2000 - 2009;
+#X connect 2 0 31 0;
+#X connect 6 0 32 0;
+#X connect 7 0 32 0;
+#X connect 8 0 32 0;
+#X connect 9 0 11 0;
+#X connect 12 0 13 0;
+#X connect 14 0 15 0;
+#X connect 18 0 32 0;
+#X connect 19 0 32 0;
+#X connect 31 0 3 0;
+#X connect 32 0 4 0;
diff --git a/tab_rifft-help.pd b/tab_rifft-help.pd
index 3349528..16ad4c3 100644
--- a/tab_rifft-help.pd
+++ b/tab_rifft-help.pd
@@ -1,36 +1,28 @@
-#N canvas 29 19 961 540 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 24 39 983 666 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src_re 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 10 graph;
-#N canvas 0 0 450 300 graph1 0;
+#X restore 694 210 graph;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src_im 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 127 graph;
+#X restore 694 327 graph;
#X obj 24 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 24 122 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 61 345 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array dst 100 float 0;
#X coords 0 1 99 -1 199 100 1;
-#X restore 674 353 graph;
+#X restore 694 513 graph;
#X msg 125 298 fftsize 64;
-#X text 102 464 IEM KUG;
-#X text 86 452 musil;
-#X text 116 452 @;
-#X text 122 452 iem.at;
-#X text 85 474 Graz \, Austria;
-#X text 37 441 (c) Thomas Musil 2000 - 2006;
-#X text 309 355 initial arguments:;
+#X text 309 425 initial arguments:;
#X text 10 0 tab_rifft;
#X text 93 -1 real inverse FTT with arrays;
#X text 37 147 list of 3 floats:;
-#X text 269 404 4.arg: <float> fftsize;
-#X msg 546 341 \; dst const 0;
-#X msg 546 283 \; src_re const 0 \; src_im const 0;
+#X msg 587 540 \; dst const 0;
#X obj 62 322 tab_rifft src_re src_im dst 64;
#X obj 24 94 tab_rifft src_re src_im dst 64;
#X text 49 158 1.) src_re-onset;
@@ -40,248 +32,222 @@
#X msg 76 230 src_re src_re;
#X msg 89 252 src_im src_im;
#X msg 104 275 dst dst;
-#X text 269 368 1.arg: <symbol> real source-name;
-#X text 269 380 2.arg: <symbol> imag_source-name;
-#X text 269 392 3.arg: <symbol> destination-name;
-#X floatatom 474 22 5 0 63 0 - - -;
-#N canvas 0 0 470 320 generate_a_dirac 0;
-#X msg 61 106 \$1 1 1;
-#X obj 61 83 t f b;
+#X text 269 438 1.arg: <symbol> real source-name;
+#X text 269 450 2.arg: <symbol> imag_source-name;
+#X text 269 462 3.arg: <symbol> destination-name;
+#X text 45 56 <bang> calculates a real inverse fourier transformation
+of complex src-arrays to a real dst-array;
+#X text 269 474 4.arg: <float> ifftsize;
+#N canvas 0 22 450 300 (subpatch) 0;
+#X array src 100 float 0;
+#X coords 0 1 99 -1 199 100 1;
+#X restore 694 31 graph;
+#X floatatom 479 40 5 0 63 0 - - -;
+#N canvas 0 22 486 336 generate_a_dirac 0;
#X obj 61 62 clip 0 63;
#X obj 61 32 inlet;
-#X obj 86 142 tab_const src_re;
-#X connect 0 0 4 0;
+#X msg 61 89 \; src const 0 \; src \$1 1;
+#X connect 0 0 2 0;
#X connect 1 0 0 0;
-#X connect 1 1 4 0;
-#X connect 2 0 1 0;
-#X connect 3 0 2 0;
-#X restore 474 41 pd generate_a_dirac;
-#X floatatom 514 22 5 -31 31 0 - - -;
-#N canvas 0 0 487 411 generate_a_cos 0;
+#X restore 479 59 pd generate_a_dirac;
+#X floatatom 519 40 5 -32 32 0 - - -;
+#N canvas 0 22 515 439 generate_a_cos 0;
#X obj 120 18 inlet;
#X obj 219 176 t f f;
#X obj 219 211 / 32;
#X obj 219 232 * 3.14159;
#X obj 219 283 cos;
#X obj 219 257 * 8;
-#X obj 219 106 clip 0 31;
+#X obj 219 308 / 32;
#X obj 219 127 t b f;
-#X obj 219 153 for++ 0 63;
-#X obj 219 331 tabwrite src_re;
#X obj 120 43 moses 0;
#X obj 39 178 t f f;
#X obj 39 213 / 32;
#X obj 39 234 * 3.14159;
#X obj 39 285 cos;
#X obj 39 259 * 8;
-#X obj 39 108 clip 0 31;
#X obj 39 129 t b f;
-#X obj 39 155 for++ 0 63;
-#X obj 39 333 tabwrite src_re;
#X obj 90 70 * -1;
-#X obj 39 310 * -1;
-#X connect 0 0 10 0;
-#X connect 1 0 2 0;
-#X connect 1 1 9 1;
-#X connect 2 0 3 0;
-#X connect 3 0 5 0;
-#X connect 4 0 9 0;
-#X connect 5 0 4 0;
-#X connect 6 0 7 0;
-#X connect 7 0 8 0;
-#X connect 7 1 5 1;
-#X connect 8 0 1 0;
-#X connect 10 0 20 0;
-#X connect 10 1 6 0;
-#X connect 11 0 12 0;
-#X connect 11 1 19 1;
-#X connect 12 0 13 0;
-#X connect 13 0 15 0;
-#X connect 14 0 21 0;
-#X connect 15 0 14 0;
-#X connect 16 0 17 0;
-#X connect 17 0 18 0;
-#X connect 17 1 15 1;
-#X connect 18 0 11 0;
-#X connect 20 0 16 0;
-#X connect 21 0 19 0;
-#X restore 514 61 pd generate_a_cos;
-#X floatatom 555 22 5 -31 31 0 - - -;
-#N canvas 0 0 487 411 generate_a_sin 0;
-#X obj 102 37 inlet;
-#X obj 246 182 t f f;
-#X obj 246 217 / 32;
-#X obj 246 238 * 3.14159;
-#X obj 246 263 * 8;
-#X obj 246 112 clip 0 31;
-#X obj 246 133 t b f;
-#X obj 246 159 for++ 0 63;
-#X obj 246 337 tabwrite src_re;
-#X obj 246 289 sin;
-#X obj 54 180 t f f;
-#X obj 54 215 / 32;
-#X obj 54 236 * 3.14159;
-#X obj 54 261 * 8;
-#X obj 54 110 clip 0 31;
-#X obj 54 131 t b f;
-#X obj 54 157 for++ 0 63;
-#X obj 54 335 tabwrite src_re;
-#X obj 54 287 sin;
-#X obj 102 60 moses 0;
-#X obj 54 88 * -1;
-#X obj 54 312 * -1;
-#X connect 0 0 19 0;
-#X connect 1 0 2 0;
-#X connect 1 1 8 1;
+#X obj 39 310 / -32;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
#X connect 2 0 3 0;
-#X connect 3 0 4 0;
-#X connect 4 0 9 0;
-#X connect 5 0 6 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
#X connect 6 0 7 0;
-#X connect 6 1 4 1;
-#X connect 7 0 1 0;
-#X connect 9 0 8 0;
-#X connect 10 0 11 0;
-#X connect 10 1 17 1;
-#X connect 11 0 12 0;
-#X connect 12 0 13 0;
-#X connect 13 0 18 0;
-#X connect 14 0 15 0;
-#X connect 15 0 16 0;
-#X connect 15 1 13 1;
-#X connect 16 0 10 0;
-#X connect 18 0 21 0;
-#X connect 19 0 20 0;
-#X connect 19 1 5 0;
-#X connect 20 0 14 0;
-#X connect 21 0 17 0;
-#X restore 555 82 pd generate_a_sin;
-#X floatatom 474 132 5 0 63 0 - - -;
-#N canvas 0 0 470 320 generate_a_dirac 0;
-#X msg 61 106 \$1 1 1;
-#X obj 61 83 t f b;
-#X obj 61 62 clip 0 63;
-#X obj 61 32 inlet;
-#X obj 86 142 tab_const src_im;
+#X connect 7 0 2 0;
+#X restore 219 151 pd counter;
+#N canvas 193 158 458 308 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
#X connect 0 0 4 0;
-#X connect 1 0 0 0;
-#X connect 1 1 4 0;
+#X connect 2 0 3 0;
#X connect 2 0 1 0;
-#X connect 3 0 2 0;
-#X restore 474 151 pd generate_a_dirac;
-#X floatatom 514 132 5 -31 31 0 - - -;
-#N canvas 0 0 487 411 generate_a_cos 0;
-#X obj 120 18 inlet;
-#X obj 219 176 t f f;
-#X obj 219 211 / 32;
-#X obj 219 232 * 3.14159;
-#X obj 219 283 cos;
-#X obj 219 257 * 8;
-#X obj 219 106 clip 0 31;
-#X obj 219 127 t b f;
-#X obj 219 153 for++ 0 63;
-#X obj 120 43 moses 0;
-#X obj 39 178 t f f;
-#X obj 39 213 / 32;
-#X obj 39 234 * 3.14159;
-#X obj 39 285 cos;
-#X obj 39 259 * 8;
-#X obj 39 108 clip 0 31;
-#X obj 39 129 t b f;
-#X obj 39 155 for++ 0 63;
-#X obj 90 70 * -1;
-#X obj 40 334 tabwrite src_im;
-#X obj 220 331 tabwrite src_im;
-#X obj 39 310 * -1;
-#X connect 0 0 9 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 38 154 pd counter;
+#X obj 219 106 clip 0 32;
+#X obj 39 108 clip 0 32;
+#X obj 39 333 tabwrite src;
+#X obj 219 331 tabwrite src;
+#X connect 0 0 8 0;
#X connect 1 0 2 0;
-#X connect 1 1 20 1;
+#X connect 1 1 22 1;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
-#X connect 4 0 20 0;
+#X connect 4 0 6 0;
#X connect 5 0 4 0;
-#X connect 6 0 7 0;
-#X connect 7 0 8 0;
+#X connect 6 0 22 0;
+#X connect 7 0 17 0;
#X connect 7 1 5 1;
-#X connect 8 0 1 0;
-#X connect 9 0 18 0;
-#X connect 9 1 6 0;
+#X connect 8 0 15 0;
+#X connect 8 1 19 0;
+#X connect 9 0 10 0;
+#X connect 9 1 21 1;
#X connect 10 0 11 0;
-#X connect 10 1 19 1;
-#X connect 11 0 12 0;
-#X connect 12 0 14 0;
-#X connect 13 0 21 0;
-#X connect 14 0 13 0;
-#X connect 15 0 16 0;
-#X connect 16 0 17 0;
-#X connect 16 1 14 1;
-#X connect 17 0 10 0;
-#X connect 18 0 15 0;
-#X connect 21 0 19 0;
-#X restore 514 171 pd generate_a_cos;
-#X floatatom 555 132 5 -31 31 0 - - -;
-#N canvas 0 0 495 419 generate_a_sin 0;
+#X connect 11 0 13 0;
+#X connect 12 0 16 0;
+#X connect 13 0 12 0;
+#X connect 14 0 18 0;
+#X connect 14 1 13 1;
+#X connect 15 0 20 0;
+#X connect 16 0 21 0;
+#X connect 17 0 1 0;
+#X connect 18 0 9 0;
+#X connect 19 0 7 0;
+#X connect 20 0 14 0;
+#X restore 519 79 pd generate_a_cos;
+#X floatatom 560 40 5 -31 31 0 - - -;
+#N canvas 0 22 507 431 generate_a_sin 0;
#X obj 102 37 inlet;
#X obj 246 182 t f f;
#X obj 246 217 / 32;
#X obj 246 238 * 3.14159;
#X obj 246 263 * 8;
+#X obj 246 314 / 32;
#X obj 246 112 clip 0 31;
#X obj 246 133 t b f;
-#X obj 246 159 for++ 0 63;
#X obj 246 289 sin;
#X obj 54 180 t f f;
#X obj 54 215 / 32;
#X obj 54 236 * 3.14159;
#X obj 54 261 * 8;
#X obj 54 110 clip 0 31;
-#X obj 54 131 t b f;
-#X obj 54 157 for++ 0 63;
+#X obj 54 132 t b f;
#X obj 54 287 sin;
+#X obj 54 312 / -32;
#X obj 102 60 moses 0;
#X obj 54 88 * -1;
-#X obj 246 337 tabwrite src_im;
-#X obj 54 336 tabwrite src_im;
-#X obj 54 312 * -1;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 54 156 pd counter;
+#N canvas 193 158 454 304 counter 0;
+#X obj 108 25 inlet;
+#X obj 109 163 outlet;
+#X obj 109 133 f;
+#X obj 142 133 + 1;
+#X obj 108 50 t b b;
+#X msg 154 76 0;
+#X msg 109 75 64;
+#X obj 110 98 until;
+#X connect 0 0 4 0;
+#X connect 2 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 1;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X restore 246 156 pd counter;
+#X obj 54 334 tabwrite src;
+#X obj 246 337 tabwrite src;
#X connect 0 0 17 0;
#X connect 1 0 2 0;
-#X connect 1 1 19 1;
+#X connect 1 1 22 1;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 8 0;
-#X connect 5 0 6 0;
+#X connect 5 0 22 0;
#X connect 6 0 7 0;
-#X connect 6 1 4 1;
-#X connect 7 0 1 0;
-#X connect 8 0 19 0;
+#X connect 7 0 20 0;
+#X connect 7 1 4 1;
+#X connect 8 0 5 0;
#X connect 9 0 10 0;
-#X connect 9 1 20 1;
+#X connect 9 1 21 1;
#X connect 10 0 11 0;
#X connect 11 0 12 0;
-#X connect 12 0 16 0;
+#X connect 12 0 15 0;
#X connect 13 0 14 0;
-#X connect 14 0 15 0;
+#X connect 14 0 19 0;
#X connect 14 1 12 1;
-#X connect 15 0 9 0;
+#X connect 15 0 16 0;
#X connect 16 0 21 0;
#X connect 17 0 18 0;
-#X connect 17 1 5 0;
+#X connect 17 1 6 0;
#X connect 18 0 13 0;
-#X connect 21 0 20 0;
-#X restore 555 192 pd generate_a_sin;
-#X text 45 56 <bang> calculates a real inverse fourier transformation
-of complex src-arrays to a real dst-array;
-#X connect 2 0 21 0;
-#X connect 6 0 20 0;
-#X connect 20 0 4 0;
-#X connect 21 0 3 0;
-#X connect 25 0 20 0;
-#X connect 26 0 20 0;
-#X connect 27 0 20 0;
-#X connect 28 0 20 0;
-#X connect 32 0 33 0;
-#X connect 34 0 35 0;
-#X connect 36 0 37 0;
-#X connect 38 0 39 0;
-#X connect 40 0 41 0;
-#X connect 42 0 43 0;
+#X connect 19 0 9 0;
+#X connect 20 0 1 0;
+#X restore 560 100 pd generate_a_sin;
+#X obj 471 258 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 471 333 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 471 305 tab_rfft src src_re src_im 64;
+#X msg 590 127 \; src const 0;
+#X text 102 464 IEM KUG;
+#X text 81 452 musil;
+#X text 116 452 @;
+#X text 124 452 iem.at;
+#X text 85 474 Graz \, Austria;
+#X text 37 441 (c) Thomas Musil 2000 - 2009;
+#X connect 2 0 13 0;
+#X connect 6 0 12 0;
+#X connect 12 0 4 0;
+#X connect 13 0 3 0;
+#X connect 17 0 12 0;
+#X connect 18 0 12 0;
+#X connect 19 0 12 0;
+#X connect 20 0 12 0;
+#X connect 27 0 28 0;
+#X connect 29 0 30 0;
+#X connect 31 0 32 0;
+#X connect 33 0 35 0;
+#X connect 35 0 34 0;
diff --git a/tab_sum-help.pd b/tab_sum-help.pd
index a61ef99..d9346aa 100644
--- a/tab_sum-help.pd
+++ b/tab_sum-help.pd
@@ -1,5 +1,5 @@
-#N canvas 116 92 794 421 10;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 116 92 798 425 10;
+#N canvas 0 22 450 300 (subpatch) 0;
#X array src 100 float 1;
#A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572
-0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144
@@ -30,11 +30,10 @@
#X msg 59 188 50 20;
#X floatatom 120 305 5 0 0 0 - - -;
#X text 75 364 IEM KUG;
-#X text 59 352 musil;
+#X text 54 352 musil;
#X text 89 352 @;
-#X text 95 352 iem.at;
+#X text 97 352 iem.at;
#X text 58 374 Graz \, Austria;
-#X text 10 341 (c) Thomas Musil 2000 - 2006;
#X text 90 29 <bang> calc sum of all array elements;
#X text 182 234 initial arguments:;
#X text 65 260 <bang> output;
@@ -46,6 +45,8 @@
#X text 118 118 sum value;
#X text 43 150 list of 2 floats:;
#X text 55 160 1.) src onset;
+#X msg 391 84 \; src const 0.5;
+#X text 10 341 (c) Thomas Musil 2000 - 2009;
#X connect 1 0 5 0;
#X connect 4 0 7 0;
#X connect 5 0 2 0;