annotate dsp/signalconditioning/DFProcess.h @ 129:6ec45e85ed81 kissfft

Drop in kissfft to replace the "old" fft, and add tests for newly-supported sizes
author Chris Cannam
date Tue, 15 Oct 2013 11:38:18 +0100
parents 88f3cfcff55f
children 715f779d0b4f
rev   line source
cannam@0 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
cannam@0 2
cannam@0 3 /*
cannam@0 4 QM DSP Library
cannam@0 5
cannam@0 6 Centre for Digital Music, Queen Mary, University of London.
Chris@84 7 This file 2005-2006 Christian Landone.
Chris@84 8
mathieu@96 9 Modifications:
mathieu@96 10
mathieu@96 11 - delta threshold
mathieu@96 12 Description: add delta threshold used as offset in the smoothed
mathieu@96 13 detection function
mathieu@96 14 Author: Mathieu Barthet
mathieu@96 15 Date: June 2010
mathieu@96 16
Chris@84 17 This program is free software; you can redistribute it and/or
Chris@84 18 modify it under the terms of the GNU General Public License as
Chris@84 19 published by the Free Software Foundation; either version 2 of the
Chris@84 20 License, or (at your option) any later version. See the file
Chris@84 21 COPYING included with this distribution for more information.
cannam@0 22 */
cannam@0 23
cannam@0 24 #ifndef CDFPROCESS_H
cannam@0 25 #define CDFPROCESS_H
cannam@0 26
cannam@0 27 #include <stdio.h>
cannam@0 28 #include "FiltFilt.h"
cannam@0 29
cannam@0 30 struct DFProcConfig{
cannam@0 31 unsigned int length;
cannam@0 32 unsigned int LPOrd;
cannam@0 33 double *LPACoeffs;
cannam@0 34 double *LPBCoeffs;
cannam@0 35 unsigned int winPre;
cannam@0 36 unsigned int winPost;
cannam@0 37 double AlphaNormParam;
cannam@12 38 bool isMedianPositive;
mathieu@96 39 float Delta; //delta threshold used as an offset when computing the smoothed detection function
cannam@12 40 };
cannam@0 41
cannam@0 42 class DFProcess
cannam@0 43 {
cannam@0 44 public:
cannam@0 45 DFProcess( DFProcConfig Config );
cannam@0 46 virtual ~DFProcess();
cannam@0 47
cannam@0 48 void process( double* src, double* dst );
cannam@0 49
cannam@0 50
cannam@0 51 private:
cannam@0 52 void initialise( DFProcConfig Config );
cannam@0 53 void deInitialise();
cannam@0 54 void removeDCNormalize( double *src, double*dst );
cannam@0 55 void medianFilter( double* src, double* dst );
cannam@0 56
cannam@74 57 int m_length;
cannam@74 58 int m_FFOrd;
cannam@0 59
cannam@74 60 int m_winPre;
cannam@74 61 int m_winPost;
cannam@0 62
cannam@0 63 double m_alphaNormParam;
cannam@0 64
cannam@0 65 double* filtSrc;
cannam@0 66 double* filtDst;
cannam@0 67
cannam@0 68 double* m_filtScratchIn;
cannam@0 69 double* m_filtScratchOut;
cannam@0 70
cannam@0 71 FiltFiltConfig m_FilterConfigParams;
cannam@0 72
cannam@0 73 FiltFilt* m_FiltFilt;
cannam@0 74
cannam@0 75 bool m_isMedianPositive;
mathieu@96 76 float m_Delta; //add delta threshold
cannam@0 77 };
cannam@0 78
cannam@0 79 #endif