aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranz Zotter <fzotter@users.sourceforge.net>2008-07-22 09:18:54 +0000
committerFranz Zotter <fzotter@users.sourceforge.net>2008-07-22 09:18:54 +0000
commit9f78b7b8b2ea1729389a1bbb09364a2a1c6f2781 (patch)
treed762cc4340fe8dc40005bd85a1db22f908f806f2
parente57133af3f8ba27be56c5b9eb59a9ff747783874 (diff)
changed from mtx_rowrfft and mtx_rowrifft to
mtx_rfft and mtx_rifft svn path=/trunk/externals/iem/iemmatrix/; revision=10193
-rw-r--r--doc/mtx_rfft-help.pd (renamed from doc/mtx_rowrfft-help.pd)38
-rw-r--r--doc/mtx_rifft-help.pd (renamed from doc/mtx_rowrifft-help.pd)26
-rw-r--r--src/mtx_rfft.c (renamed from src/mtx_rowrfft.c)42
-rw-r--r--src/mtx_rifft.c (renamed from src/mtx_rowrifft.c)56
4 files changed, 81 insertions, 81 deletions
diff --git a/doc/mtx_rowrfft-help.pd b/doc/mtx_rfft-help.pd
index 2c253cf..2d20bc0 100644
--- a/doc/mtx_rowrfft-help.pd
+++ b/doc/mtx_rfft-help.pd
@@ -4,7 +4,6 @@
#X obj 594 43 matrix;
#X text 464 42 see also help for;
#X msg 11 124 bang;
-#X text 89 15 [mtx_rowrfft];
#X text 46 34 real fft in each matrix row;
#X text 7 60 you can calculate real ffts in column direction \; matrix
has to have 2^k columns \; a N/2+1 columns matrix is the result \;
@@ -17,31 +16,32 @@ has to have 2^k columns \; a N/2+1 columns matrix is the result \;
#X floatatom 172 234 5 0 0 0 - - -;
#X text 212 232 <-- scroll here to select frequency;
#X obj 172 255 / 8;
-#X obj 49 330 mtx_rowrfft;
#X obj 49 306 t a a;
#X obj 92 306 mtx_print original;
#X obj 49 394 mtx_print rfft_realpart;
#X obj 121 372 mtx_print rfft_imagpart;
-#X obj 261 438 mtx_rowrifft;
#X text 266 419 see also:;
#X obj 49 280 mtx_cos;
#X obj 103 255 * 3.14159;
#X text 109 280 cosine wave;
#X obj 121 352 mtx_int;
#X obj 49 373 mtx_int;
-#X connect 4 0 9 0;
-#X connect 8 0 11 0;
-#X connect 9 0 10 0;
-#X connect 10 0 8 0;
-#X connect 11 0 12 0;
-#X connect 12 0 23 0;
-#X connect 13 0 15 0;
-#X connect 15 0 24 0;
-#X connect 16 0 27 0;
-#X connect 16 1 26 0;
-#X connect 17 0 16 0;
-#X connect 17 1 18 0;
-#X connect 23 0 17 0;
-#X connect 24 0 12 1;
-#X connect 26 0 20 0;
-#X connect 27 0 19 0;
+#X text 89 15 [mtx_rfft];
+#X obj 49 330 mtx_rfft;
+#X obj 261 438 mtx_rifft;
+#X connect 4 0 8 0;
+#X connect 7 0 10 0;
+#X connect 8 0 9 0;
+#X connect 9 0 7 0;
+#X connect 10 0 11 0;
+#X connect 11 0 20 0;
+#X connect 12 0 14 0;
+#X connect 14 0 21 0;
+#X connect 15 0 26 0;
+#X connect 15 1 16 0;
+#X connect 20 0 15 0;
+#X connect 21 0 11 1;
+#X connect 23 0 18 0;
+#X connect 24 0 17 0;
+#X connect 26 0 24 0;
+#X connect 26 1 23 0;
diff --git a/doc/mtx_rowrifft-help.pd b/doc/mtx_rifft-help.pd
index 0be652d..94ea8ed 100644
--- a/doc/mtx_rowrifft-help.pd
+++ b/doc/mtx_rifft-help.pd
@@ -12,7 +12,6 @@
#X obj 177 255 / 8;
#X obj 49 278 t a a;
#X text 266 443 see also:;
-#X text 89 15 [mtx_rowrifft];
#X text 46 34 real ifft in each matrix row;
#X text 7 60 you can calculate real inverse ffts in column direction
\; matrix has to have 2^(k-1)+1 columns \; a 2^k columns matrix is
@@ -21,23 +20,24 @@ the result \;;
#X obj 49 307 mtx_cos;
#X obj 104 307 mtx_sin;
#X text 217 232 <-- scroll here to select delay;
-#X obj 49 336 mtx_rowrifft;
#X obj 49 381 mtx_print rifft;
-#X obj 261 462 mtx_rowrfft;
#X obj 49 359 mtx_int;
#X obj 103 255 * -3.14159;
-#X connect 4 0 16 0;
+#X text 89 15 [mtx_rifft];
+#X obj 262 463 mtx_rfft;
+#X obj 49 336 mtx_rifft;
+#X connect 4 0 15 0;
#X connect 5 0 7 0;
#X connect 6 0 5 0;
#X connect 7 0 8 0;
#X connect 8 0 11 0;
#X connect 9 0 10 0;
-#X connect 10 0 24 0;
-#X connect 11 0 17 0;
-#X connect 11 1 18 0;
-#X connect 16 0 6 0;
-#X connect 17 0 20 0;
-#X connect 18 0 20 1;
-#X connect 20 0 23 0;
-#X connect 23 0 21 0;
-#X connect 24 0 8 1;
+#X connect 10 0 21 0;
+#X connect 11 0 16 0;
+#X connect 11 1 17 0;
+#X connect 15 0 6 0;
+#X connect 16 0 24 0;
+#X connect 17 0 24 1;
+#X connect 20 0 19 0;
+#X connect 21 0 8 1;
+#X connect 24 0 20 0;
diff --git a/src/mtx_rowrfft.c b/src/mtx_rfft.c
index b3d0517..e97f338 100644
--- a/src/mtx_rowrfft.c
+++ b/src/mtx_rfft.c
@@ -15,10 +15,10 @@
#include "iemmatrix.h"
#include <stdlib.h>
-static t_class *mtx_rowrfft_class;
+static t_class *mtx_rfft_class;
-typedef struct _MTXRowrfft_ MTXRowrfft;
-struct _MTXRowrfft_
+typedef struct _MTXRfft_ MTXRfft;
+struct _MTXRfft_
{
t_object x_obj;
int size;
@@ -34,7 +34,7 @@ struct _MTXRowrfft_
t_atom *list_im;
};
-static void deleteMTXRowrfft (MTXRowrfft *x)
+static void deleteMTXRfft (MTXRfft *x)
{
if (x->f_re)
free (x->f_re);
@@ -46,9 +46,9 @@ static void deleteMTXRowrfft (MTXRowrfft *x)
free (x->list_im);
}
-static void *newMTXRowrfft (t_symbol *s, int argc, t_atom *argv)
+static void *newMTXRfft (t_symbol *s, int argc, t_atom *argv)
{
- MTXRowrfft *x = (MTXRowrfft *) pd_new (mtx_rowrfft_class);
+ MTXRfft *x = (MTXRfft *) pd_new (mtx_rfft_class);
x->list_re_out = outlet_new (&x->x_obj, gensym("matrix"));
x->list_im_out = outlet_new (&x->x_obj, gensym("matrix"));
@@ -59,7 +59,7 @@ static void *newMTXRowrfft (t_symbol *s, int argc, t_atom *argv)
return ((void *) x);
}
-static void mTXrowrfftBang (MTXRowrfft *x)
+static void mTXRfftBang (MTXRfft *x)
{
if (x->list_im) {
outlet_anything(x->list_im_out, gensym("matrix"), x->size2, x->list_im);
@@ -100,7 +100,7 @@ static void readFloatFromList (int n, t_atom *l, t_float *f)
*f++ = atom_getfloat (l++);
}
-static void mTXrowrfftMatrix (MTXRowrfft *x, t_symbol *s,
+static void mTXRfftMatrix (MTXRfft *x, t_symbol *s,
int argc, t_atom *argv)
{
int rows = atom_getint (argv++);
@@ -117,11 +117,11 @@ static void mTXrowrfftMatrix (MTXRowrfft *x, t_symbol *s,
/* fftsize check */
if (!size)
- post("mtx_rowrfft: invalid dimensions");
+ post("mtx_rfft: invalid dimensions");
else if (in_size<size)
- post("mtx_rowrfft: sparse matrix not yet supported: use \"mtx_check\"");
+ post("mtx_rfft: sparse matrix not yet supported: use \"mtx_check\"");
else if (columns < 4){
- post("mtx_rowrfft: matrix must have at least 4 columns");
+ post("mtx_rfft: matrix must have at least 4 columns");
}
else if (columns == (1 << ilog2(columns))) {
/* ok, do the FFT! */
@@ -175,18 +175,18 @@ static void mTXrowrfftMatrix (MTXRowrfft *x, t_symbol *s,
}
-void mtx_rowrfft_setup (void)
+void mtx_rfft_setup (void)
{
- mtx_rowrfft_class = class_new
- (gensym("mtx_rowrfft"),
- (t_newmethod) newMTXRowrfft,
- (t_method) deleteMTXRowrfft,
- sizeof (MTXRowrfft),
+ mtx_rfft_class = class_new
+ (gensym("mtx_rfft"),
+ (t_newmethod) newMTXRfft,
+ (t_method) deleteMTXRfft,
+ sizeof (MTXRfft),
CLASS_DEFAULT, A_GIMME, 0);
- class_addbang (mtx_rowrfft_class, (t_method) mTXrowrfftBang);
- class_addmethod (mtx_rowrfft_class, (t_method) mTXrowrfftMatrix, gensym("matrix"), A_GIMME,0);
+ class_addbang (mtx_rfft_class, (t_method) mTXRfftBang);
+ class_addmethod (mtx_rfft_class, (t_method) mTXRfftMatrix, gensym("matrix"), A_GIMME,0);
}
-void iemtx_rowrfft_setup(void){
- mtx_rowrfft_setup();
+void iemtx_rfft_setup(void){
+ mtx_rfft_setup();
}
diff --git a/src/mtx_rowrifft.c b/src/mtx_rifft.c
index a70e405..7a1142f 100644
--- a/src/mtx_rowrifft.c
+++ b/src/mtx_rifft.c
@@ -15,9 +15,9 @@
#include "iemmatrix.h"
#include <stdlib.h>
-static t_class *mtx_rowrifft_class;
+static t_class *mtx_rifft_class;
-typedef struct _MTXRowrifft_
+typedef struct _MTXRifft_
{
t_object x_obj;
int rows;
@@ -35,7 +35,7 @@ typedef struct _MTXRowrifft_
t_atom *list_re;
t_atom *list_im;
-} MTXRowrifft;
+} MTXRifft;
/* helper functions: these should really go into a separate file! */
@@ -78,16 +78,16 @@ static void ifftPrepareReal (int n, t_float *re, t_float *im)
}
-static void *newMTXRowrifft (t_symbol *s, int argc, t_atom *argv)
+static void *newMTXRifft (t_symbol *s, int argc, t_atom *argv)
{
- MTXRowrifft *x = (MTXRowrifft *) pd_new (mtx_rowrifft_class);
+ MTXRifft *x = (MTXRifft *) pd_new (mtx_rifft_class);
inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"),gensym(""));
x->list_re_out = outlet_new (&x->x_obj, gensym("matrix"));
return ((void *) x);
}
-static void mTXrowrifftMatrixCold (MTXRowrifft *x, t_symbol *s,
+static void mTXRifftMatrixCold (MTXRifft *x, t_symbol *s,
int argc, t_atom *argv)
{
int rows = atom_getint (argv++);
@@ -103,13 +103,13 @@ static void mTXrowrifftMatrixCold (MTXRowrifft *x, t_symbol *s,
/* ifftsize check */
if (columns_re < 3)
- post("mtx_rowrifft: matrix must have at least 3 columns");
+ post("mtx_rifft: matrix must have at least 3 columns");
else if (!size)
- post("mtx_rowrifft: invalid dimensions");
+ post("mtx_rifft: invalid dimensions");
else if (in_size < size2)
- post("mtx_rowrifft: sparse matrix not yet supported: use \"mtx_check\"");
+ post("mtx_rifft: sparse matrix not yet supported: use \"mtx_check\"");
else if (columns<4)
- post("mtx_rowrifft: too small matrices");
+ post("mtx_rifft: too small matrices");
else if (columns == (1 << ilog2(columns))) {
/* memory things */
@@ -137,10 +137,10 @@ static void mTXrowrifftMatrixCold (MTXRowrifft *x, t_symbol *s,
/* do nothing else! */
}
else
- post("mtx_rowrifft: rowvector 2*(size+1) no power of 2!");
+ post("mtx_rifft: rowvector 2*(size+1) no power of 2!");
}
-static void mTXrowrifftMatrixHot (MTXRowrifft *x, t_symbol *s,
+static void mTXRifftMatrixHot (MTXRifft *x, t_symbol *s,
int argc, t_atom *argv)
{
int rows = atom_getint (argv++);
@@ -158,11 +158,11 @@ static void mTXrowrifftMatrixHot (MTXRowrifft *x, t_symbol *s,
/* ifftsize check */
if ((rows != x->rows) ||
(columns_re != x->columns_re))
- post("mtx_rowrifft: matrix dimensions do not match");
+ post("mtx_rifft: matrix dimensions do not match");
else if (in_size<size2)
- post("mtx_rowrifft: sparse matrix not yet supported: use \"mtx_check\"");
+ post("mtx_rifft: sparse matrix not yet supported: use \"mtx_check\"");
else if (!x->size2)
- post("mtx_rowrifft: invalid right side matrix");
+ post("mtx_rifft: invalid right side matrix");
else { /* main part */
ifft_count = rows;
ptr_re += 2;
@@ -188,7 +188,7 @@ static void mTXrowrifftMatrixHot (MTXRowrifft *x, t_symbol *s,
}
}
-static void mTXrowrifftBang (MTXRowrifft *x)
+static void mTXRifftBang (MTXRifft *x)
{
if (x->list_re)
outlet_anything(x->list_re_out, gensym("matrix"),
@@ -196,7 +196,7 @@ static void mTXrowrifftBang (MTXRowrifft *x)
}
-static void deleteMTXRowrifft (MTXRowrifft *x)
+static void deleteMTXRifft (MTXRifft *x)
{
if (x->f_re)
free(x->f_re);
@@ -208,19 +208,19 @@ static void deleteMTXRowrifft (MTXRowrifft *x)
free(x->list_im);
}
-static void mtx_rowrifft_setup (void)
+static void mtx_rifft_setup (void)
{
- mtx_rowrifft_class = class_new
- (gensym("mtx_rowrifft"),
- (t_newmethod) newMTXRowrifft,
- (t_method) deleteMTXRowrifft,
- sizeof (MTXRowrifft),
+ mtx_rifft_class = class_new
+ (gensym("mtx_rifft"),
+ (t_newmethod) newMTXRifft,
+ (t_method) deleteMTXRifft,
+ sizeof (MTXRifft),
CLASS_DEFAULT, A_GIMME, 0);
- class_addbang (mtx_rowrifft_class, (t_method) mTXrowrifftBang);
- class_addmethod (mtx_rowrifft_class, (t_method) mTXrowrifftMatrixHot, gensym("matrix"), A_GIMME,0);
- class_addmethod (mtx_rowrifft_class, (t_method) mTXrowrifftMatrixCold, gensym(""), A_GIMME,0);
+ class_addbang (mtx_rifft_class, (t_method) mTXRifftBang);
+ class_addmethod (mtx_rifft_class, (t_method) mTXRifftMatrixHot, gensym("matrix"), A_GIMME,0);
+ class_addmethod (mtx_rifft_class, (t_method) mTXRifftMatrixCold, gensym(""), A_GIMME,0);
}
-void iemtx_rowrifft_setup(void){
- mtx_rowrifft_setup();
+void iemtx_rifft_setup(void){
+ mtx_rifft_setup();
}