view windowfunctions.h @ 13:de3961f74f30 tip

Add Linux/gcc Makefile; build fix
author Chris Cannam
date Mon, 05 Sep 2011 15:22:35 +0100
parents 977f541d6683
children
line wrap: on
line source
/*
    Harmonic sinusoidal modelling and tools

    C++ code package for harmonic sinusoidal modelling and relevant signal processing.
    Centre for Digital Music, Queen Mary, University of London.
    This file copyright 2011 Wen Xue.

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version.
*/
#ifndef WindowFunctionsH
#define WindowFunctionsH

/**
  \file windowfunctions.h - implements a few common window functions.
*/

enum WindowType
{
  wtRectangle,
  wtTriangular,
  wtHamming,
  wtBlackman,
  wtGaussian,
  wtKaiser,
  wtHalfCosine,
  wtHann,
  wtHannSqr,
  wtHann3sqrt
};

//--window function computation routines-------------------------------------
void FillWindow(double* newwindow, WindowType wt, int Count, int* ips=0, double* dps=0);
double* NewWindow(WindowType wt, int Count, int* ips=0, double* dps=0, double* newwindow=0);
double* NewWindow8(WindowType wt, int Count, int* ips=0, double* dps=0, double* newwindow=0);
double* NewdWindow(WindowType wt, int Count, int* ips=0, double* dps=0, double* newdwindow=0);
double* NewddWindow(WindowType wt, int Count, int* ips=0, double* dps=0, double* newddwindow=0);
double* NewdddWindow(WindowType wt, int Count, int* ips=0, double* dps=0, double* newdddwindow=0);

//--other functions----------------------------------------------------------
void windowspec(WindowType wt, int N, int* M, double* c, double* iH2, double* d=0);

#endif