1 /* 2 fhtfun.h: 3 4 Copyright (C) 1997 Paris Smaragdis, John ffitch 5 6 This file is part of Csound. 7 8 The Csound Library is free software; you can redistribute it 9 and/or modify it under the terms of the GNU Lesser General Public 10 License as published by the Free Software Foundation; either 11 version 2.1 of the License, or (at your option) any later version. 12 13 Csound is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU Lesser General Public License for more details. 17 18 You should have received a copy of the GNU Lesser General Public 19 License along with Csound; if not, write to the Free Software 20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 21 02110-1301 USA 22 */ 23 24 typedef struct{ 25 OPDS h; 26 MYFLT *out, *as, *af, *len, *ovlp, *iwin, *bias; 27 AUXCH mem; 28 MYFLT *buffer_in1, *buffer_in2, *buffer_out; 29 FUNC *win; 30 MYFLT *in1, *in2, *w; 31 int32 m, count; 32 MYFLT s_ovlp; 33 } CON; 34 35 /* typedef struct{ */ 36 /* OPDS h; */ 37 /* MYFLT *out, *as, *imp, *iwin, *ienv; */ 38 /* AUXCH mem; */ 39 /* MYFLT *buffer_in, *buffer_out; */ 40 /* FUNC *win; */ 41 /* MYFLT *in, *in2, norm; */ 42 /* int32 flen, count, count2; */ 43 /* } CNV; */ 44 45 /* typedef struct{ */ 46 /* OPDS h; */ 47 /* MYFLT *out, *as, *str, *len, *ovlp, *iwin; */ 48 /* AUXCH mem; */ 49 /* MYFLT *buffer_in, *buffer_out; */ 50 /* FUNC *win; */ 51 /* MYFLT *in; */ 52 /* int32 m, count; */ 53 /* } STCH; */ 54 55 /* typedef struct{ */ 56 /* OPDS h; */ 57 /* MYFLT *out, *as, *af, *len, *ovlp, *iwin, *bias, *peaks; */ 58 /* AUXCH mem; */ 59 /* MYFLT *buffer_in, *buffer_in2, *buffer_out; */ 60 /* FUNC *win; */ 61 /* MYFLT *in, *in2, *mor; */ 62 /* int32 *clx, *cly; */ 63 /* int32 m, count; */ 64 /* } MRH; */ 65 66 static void getmag(MYFLT *x, int32 size); 67 static void mult(MYFLT *x, MYFLT *y, int32 size, MYFLT w); 68 static void lineaprox(MYFLT *x, int32 size, int32 m); 69 static void do_fht(MYFLT *real, int32 n); 70 static void do_ifht(MYFLT *real, int32 n); 71 static void pfht(MYFLT *fz, int32 n); 72 73