1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
6 Centre for Digital Music, Queen Mary, University of London.
7 This file 2005-2006 Christian Landone.
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information.
16 // PeakPicking.h: interface for the PeakPicking class.
18 //////////////////////////////////////////////////////////////////////
23 #include "maths/MathUtilities.h"
24 #include "maths/MathAliases.h"
25 #include "dsp/signalconditioning/DFProcess.h"
43 unsigned int length; //Detection FunctionLength
44 double tau; // time resolution of the detection function:
45 unsigned int alpha; //alpha-norm parameter
46 double cutoff;//low-pass Filter cutoff freq
47 unsigned int LPOrd; // low-pass Filter order
48 double* LPACoeffs; //low pass Filter den coefficients
49 double* LPBCoeffs; //low pass Filter num coefficients
50 PPWinThresh WinT;//window size in frames for adaptive thresholding [pre post]:
51 QFitThresh QuadThresh;
57 PeakPicking( PPickParams Config );
58 virtual ~PeakPicking();
60 void process( double* src, unsigned int len, vector<int> &onsets );
64 void initialise( PPickParams Config );
66 int quadEval( vector<double> &src, vector<int> &idx );
68 DFProcConfig m_DFProcessingParams;
70 unsigned int m_DFLength ;
78 DFProcess* m_DFSmoothing;