Ardour
9.0-pre0-582-g084a23a80d
DFProcess.h
Go to the documentation of this file.
1
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3
/*
4
QM DSP Library
5
6
Centre for Digital Music, Queen Mary, University of London.
7
This file 2005-2006 Christian Landone.
8
9
Modifications:
10
11
- delta threshold
12
Description: add delta threshold used as offset in the smoothed
13
detection function
14
Author: Mathieu Barthet
15
Date: June 2010
16
17
This program is free software; you can redistribute it and/or
18
modify it under the terms of the GNU General Public License as
19
published by the Free Software Foundation; either version 2 of the
20
License, or (at your option) any later version. See the file
21
COPYING included with this distribution for more information.
22
*/
23
24
#ifndef CDFPROCESS_H
25
#define CDFPROCESS_H
26
27
#include <stdio.h>
28
#include "
FiltFilt.h
"
29
30
struct
DFProcConfig
{
31
unsigned
int
length
;
32
unsigned
int
LPOrd
;
33
double
*
LPACoeffs
;
34
double
*
LPBCoeffs
;
35
unsigned
int
winPre
;
36
unsigned
int
winPost
;
37
double
AlphaNormParam
;
38
bool
isMedianPositive
;
39
float
delta
;
//delta threshold used as an offset when computing the smoothed detection function
40
41
DFProcConfig
() :
42
length
(0),
43
LPOrd
(0),
44
LPACoeffs
(NULL),
45
LPBCoeffs
(NULL),
46
winPre
(0),
47
winPost
(0),
48
AlphaNormParam
(0),
49
isMedianPositive
(false),
50
delta
(0)
51
{
52
}
53
};
54
55
class
DFProcess
56
{
57
public
:
58
DFProcess
(
DFProcConfig
Config
);
59
virtual
~DFProcess
();
60
61
void
process
(
double
* src,
double
* dst );
62
63
64
private
:
65
void
initialise
(
DFProcConfig
Config
);
66
void
deInitialise
();
67
void
removeDCNormalize
(
double
*src,
double
*dst );
68
void
medianFilter
(
double
* src,
double
* dst );
69
70
int
m_length
;
71
int
m_FFOrd
;
72
73
int
m_winPre
;
74
int
m_winPost
;
75
76
double
m_alphaNormParam
;
77
78
double
*
filtSrc
;
79
double
*
filtDst
;
80
81
double
*
m_filtScratchIn
;
82
double
*
m_filtScratchOut
;
83
84
FiltFilt
*
m_FiltFilt
;
85
86
bool
m_isMedianPositive
;
87
float
m_delta
;
//add delta threshold
88
};
89
90
#endif
FiltFilt.h
DFProcess
Definition:
DFProcess.h:56
DFProcess::m_winPost
int m_winPost
Definition:
DFProcess.h:74
DFProcess::m_winPre
int m_winPre
Definition:
DFProcess.h:73
DFProcess::m_FFOrd
int m_FFOrd
Definition:
DFProcess.h:71
DFProcess::m_FiltFilt
FiltFilt * m_FiltFilt
Definition:
DFProcess.h:84
DFProcess::m_length
int m_length
Definition:
DFProcess.h:70
DFProcess::~DFProcess
virtual ~DFProcess()
DFProcess::m_isMedianPositive
bool m_isMedianPositive
Definition:
DFProcess.h:86
DFProcess::m_filtScratchIn
double * m_filtScratchIn
Definition:
DFProcess.h:81
DFProcess::DFProcess
DFProcess(DFProcConfig Config)
DFProcess::removeDCNormalize
void removeDCNormalize(double *src, double *dst)
DFProcess::medianFilter
void medianFilter(double *src, double *dst)
DFProcess::initialise
void initialise(DFProcConfig Config)
DFProcess::deInitialise
void deInitialise()
DFProcess::m_delta
float m_delta
Definition:
DFProcess.h:87
DFProcess::filtSrc
double * filtSrc
Definition:
DFProcess.h:78
DFProcess::m_filtScratchOut
double * m_filtScratchOut
Definition:
DFProcess.h:82
DFProcess::process
void process(double *src, double *dst)
DFProcess::filtDst
double * filtDst
Definition:
DFProcess.h:79
DFProcess::m_alphaNormParam
double m_alphaNormParam
Definition:
DFProcess.h:76
FiltFilt
Definition:
FiltFilt.h:27
ARDOUR::Config
RCConfiguration * Config
DFProcConfig
Definition:
DFProcess.h:30
DFProcConfig::length
unsigned int length
Definition:
DFProcess.h:31
DFProcConfig::LPBCoeffs
double * LPBCoeffs
Definition:
DFProcess.h:34
DFProcConfig::winPost
unsigned int winPost
Definition:
DFProcess.h:36
DFProcConfig::LPACoeffs
double * LPACoeffs
Definition:
DFProcess.h:33
DFProcConfig::delta
float delta
Definition:
DFProcess.h:39
DFProcConfig::LPOrd
unsigned int LPOrd
Definition:
DFProcess.h:32
DFProcConfig::isMedianPositive
bool isMedianPositive
Definition:
DFProcess.h:38
DFProcConfig::DFProcConfig
DFProcConfig()
Definition:
DFProcess.h:41
DFProcConfig::winPre
unsigned int winPre
Definition:
DFProcess.h:35
DFProcConfig::AlphaNormParam
double AlphaNormParam
Definition:
DFProcess.h:37
libs
qm-dsp
dsp
signalconditioning
DFProcess.h
Generated on Thu Dec 26 2024 05:38:48 for Ardour by
1.9.1