annotate src/xtract_window_private.h @ 107:3e648eec95cb

- Added new helper functions: xtract_windowed() and xtract_features_from_subframes() - Added windowing functions (window.c)
author Jamie Bullock <jamie@postlude.co.uk>
date Fri, 28 Dec 2007 19:34:51 +0000
parents
children e4f704649c50
rev   line source
jamie@107 1 /* libxtract feature extraction library
jamie@107 2 *
jamie@107 3 * Copyright (C) 2006 Jamie Bullock
jamie@107 4 *
jamie@107 5 * This program is free software; you can redistribute it and/or modify
jamie@107 6 * it under the terms of the GNU General Public License as published by
jamie@107 7 * the Free Software Foundation; either version 2 of the License, or
jamie@107 8 * (at your option) any later version.
jamie@107 9 *
jamie@107 10 * This program is distributed in the hope that it will be useful,
jamie@107 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jamie@107 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
jamie@107 13 * GNU General Public License for more details.
jamie@107 14 *
jamie@107 15 * You should have received a copy of the GNU General Public License
jamie@107 16 * along with this program; if not, write to the Free Software
jamie@107 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
jamie@107 18 * USA.
jamie@107 19 */
jamie@107 20
jamie@107 21 /* xtract_window_private.h: declares window generation functions */
jamie@107 22
jamie@107 23 #define PI 3.1415926535897931
jamie@107 24
jamie@107 25 /** \brief generate a Gaussian window
jamie@107 26 *
jamie@107 27 * \param *window a pointer to an array to contain the window data
jamie@107 28 * \param N the number of elements in the array pointed to by *window
jamie@107 29 * \param sd the standard deviation of the "distribution" represented by the Gaussian curve. The higher the value of sd, the wider the curve. Generally sd <= 0.5
jamie@107 30 *
jamie@107 31 */
jamie@107 32 void gauss(float *window, const int N, const float sd);
jamie@107 33
jamie@107 34 /** \brief generate a Hamming window
jamie@107 35 *
jamie@107 36 * \param *window a pointer to an array to contain the window data
jamie@107 37 * \param N the number of elements in the array pointed to by *window
jamie@107 38 *
jamie@107 39 */
jamie@107 40 void hamming(float *window, const int N);
jamie@107 41
jamie@107 42 /** \brief generate a Hann window
jamie@107 43 *
jamie@107 44 * \param *window a pointer to an array to contain the window data
jamie@107 45 * \param N the number of elements in the array pointed to by *window
jamie@107 46 *
jamie@107 47 */
jamie@107 48 void hann(float *window, const int N);
jamie@107 49
jamie@107 50 /** \brief generate a Bartlett window
jamie@107 51 *
jamie@107 52 * \param *window a pointer to an array to contain the window data
jamie@107 53 * \param N the number of elements in the array pointed to by *window
jamie@107 54 *
jamie@107 55 */
jamie@107 56 void bartlett(float *window, const int N);
jamie@107 57
jamie@107 58 /** \brief generate a Triangular window
jamie@107 59 *
jamie@107 60 * \param *window a pointer to an array to contain the window data
jamie@107 61 * \param N the number of elements in the array pointed to by *window
jamie@107 62 *
jamie@107 63 */
jamie@107 64 void triangular(float *window, const int N);
jamie@107 65
jamie@107 66 /** \brief generate a Bartlett-Hann window
jamie@107 67 *
jamie@107 68 * \param *window a pointer to an array to contain the window data
jamie@107 69 * \param N the number of elements in the array pointed to by *window
jamie@107 70 *
jamie@107 71 */
jamie@107 72 void bartlett_hann(float *window, const int N);
jamie@107 73
jamie@107 74 /** \brief generate a Blackman window
jamie@107 75 *
jamie@107 76 * \param *window a pointer to an array to contain the window data
jamie@107 77 * \param N the number of elements in the array pointed to by *window
jamie@107 78 *
jamie@107 79 */
jamie@107 80 void blackman(float *window, const int N);
jamie@107 81
jamie@107 82 /** \brief generate a Kaiser window
jamie@107 83 *
jamie@107 84 * \param *window a pointer to an array to contain the window data
jamie@107 85 * \param N the number of elements in the array pointed to by *window
jamie@107 86 * \param alpha The larger the value of |alpha|, the narrower the window becomes
jamie@107 87 *
jamie@107 88 */
jamie@107 89 void kaiser(float *window, const int N, const float alpha);
jamie@107 90
jamie@107 91 /** \brief generate a Blackman-Harris window
jamie@107 92 *
jamie@107 93 * \param *window a pointer to an array to contain the window data
jamie@107 94 * \param N the number of elements in the array pointed to by *window
jamie@107 95 *
jamie@107 96 */
jamie@107 97 void blackman_harris(float *window, const int N);
jamie@107 98