xue@11: /* xue@11: Harmonic sinusoidal modelling and tools xue@11: xue@11: C++ code package for harmonic sinusoidal modelling and relevant signal processing. xue@11: Centre for Digital Music, Queen Mary, University of London. xue@11: This file copyright 2011 Wen Xue. xue@11: xue@11: This program is free software; you can redistribute it and/or xue@11: modify it under the terms of the GNU General Public License as xue@11: published by the Free Software Foundation; either version 2 of the xue@11: License, or (at your option) any later version. xue@11: */ xue@1: #ifndef WindowFunctionsH xue@1: #define WindowFunctionsH xue@1: Chris@5: /** Chris@5: \file windowfunctions.h - implements a few common window functions. xue@1: */ xue@1: xue@1: enum WindowType xue@1: { xue@1: wtRectangle, xue@1: wtTriangular, xue@1: wtHamming, xue@1: wtBlackman, xue@1: wtGaussian, xue@1: wtKaiser, xue@1: wtHalfCosine, xue@1: wtHann, xue@1: wtHannSqr, xue@1: wtHann3sqrt xue@1: }; xue@1: xue@1: //--window function computation routines------------------------------------- xue@1: void FillWindow(double* newwindow, WindowType wt, int Count, int* ips=0, double* dps=0); xue@1: double* NewWindow(WindowType wt, int Count, int* ips=0, double* dps=0, double* newwindow=0); xue@1: double* NewWindow8(WindowType wt, int Count, int* ips=0, double* dps=0, double* newwindow=0); xue@1: double* NewdWindow(WindowType wt, int Count, int* ips=0, double* dps=0, double* newdwindow=0); xue@1: double* NewddWindow(WindowType wt, int Count, int* ips=0, double* dps=0, double* newddwindow=0); xue@1: double* NewdddWindow(WindowType wt, int Count, int* ips=0, double* dps=0, double* newdddwindow=0); xue@1: xue@1: //--other functions---------------------------------------------------------- xue@1: void windowspec(WindowType wt, int N, int* M, double* c, double* iH2, double* d=0); xue@1: xue@1: #endif