kwave  18.07.70
NotchFilter.h
Go to the documentation of this file.
1 /***************************************************************************
2  NotchFilter.h - transmission function of a notch filter
3  -------------------
4  begin : Thu Jun 19 2003
5  copyright : (C) 2003 by Dave Flogeras
6  email : d.flogeras@unb.ca
7 
8  filter functions:
9  Copyright (C) 1998 Juhana Sadeharju <kouhia@nic.funet.fi>
10  ***************************************************************************/
11 
12 /***************************************************************************
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  ***************************************************************************/
20 
21 #ifndef NOTCH_FILTER_H
22 #define NOTCH_FILTER_H
23 
24 #include "config.h"
25 
26 #include <QObject>
27 #include <QVariant>
28 
29 #include "libkwave/SampleArray.h"
30 #include "libkwave/SampleSource.h"
32 
33 namespace Kwave
34 {
37  {
38  Q_OBJECT
39  public:
40 
42  NotchFilter();
43 
45  virtual ~NotchFilter() Q_DECL_OVERRIDE;
46 
48  virtual void goOn() Q_DECL_OVERRIDE;
49 
51  virtual double at(double f) Q_DECL_OVERRIDE;
52 
53  signals:
54 
56  void output(Kwave::SampleArray data);
57 
58  public slots:
59 
61  void input(Kwave::SampleArray data);
62 
68  void setFrequency(const QVariant fc);
69 
75  void setBandwidth(const QVariant bw);
76 
77  private:
78 
80  void initFilter();
81 
87  void setfilter_peaknotch2(double freq, double bw);
88 
89  private:
90 
93 
95  double m_f_cutoff;
96 
98  double m_f_bw;
99 
101  struct {
102  double cx,cx1,cx2,cy1,cy2;
103  double x,x1,x2,y,y1,y2;
104  } m_filter;
105 
106  };
107 }
108 
109 #endif /* NOTCH_FILTER_H */
110 
111 //***************************************************************************
112 //***************************************************************************
void setBandwidth(const QVariant bw)
Definition: App.h:33
virtual double at(double f) Q_DECL_OVERRIDE
Definition: NotchFilter.cpp:47
Kwave::SampleArray m_buffer
Definition: NotchFilter.h:92
struct Kwave::NotchFilter::@14 m_filter
virtual void goOn() Q_DECL_OVERRIDE
Definition: NotchFilter.cpp:41
void setFrequency(const QVariant fc)
void input(Kwave::SampleArray data)
void setfilter_peaknotch2(double freq, double bw)
Definition: NotchFilter.cpp:98
virtual ~NotchFilter() Q_DECL_OVERRIDE
Definition: NotchFilter.cpp:36
void output(Kwave::SampleArray data)