kwave
18.07.70
|
#include <BandPass.h>
Public Slots | |
void | input (Kwave::SampleArray data) |
void | setFrequency (const QVariant fc) |
void | setBandwidth (const QVariant bw) |
Signals | |
void | output (Kwave::SampleArray data) |
![]() | |
void | attributeChanged (const QVariant value) |
Public Member Functions | |
BandPass () | |
virtual | ~BandPass () Q_DECL_OVERRIDE |
virtual void | goOn () Q_DECL_OVERRIDE |
virtual double | at (double f) Q_DECL_OVERRIDE |
![]() | |
SampleSource (QObject *parent=Q_NULLPTR) | |
virtual | ~SampleSource () |
virtual bool | done () const |
![]() | |
StreamObject (QObject *parent=Q_NULLPTR) | |
virtual | ~StreamObject () |
virtual unsigned int | tracks () const |
virtual Kwave::StreamObject * | operator[] (unsigned int track) |
virtual unsigned int | tracksOfPort (const char *port) const |
virtual Kwave::StreamObject * | port (const char *port, unsigned int track) |
virtual unsigned int | blockSize () const |
void | setAttribute (const char *attribute, const QVariant &value) |
![]() | |
virtual | ~TransmissionFunction () |
Private Member Functions | |
void | initFilter () |
void | setfilter_2polebp (double freq, double R) |
Private Attributes | |
Kwave::SampleArray | m_buffer |
double | m_frequency |
double | m_bandwidth |
struct { | |
double cx | |
double cx1 | |
double cx2 | |
double cy1 | |
double cy2 | |
double x | |
double x1 | |
double x2 | |
double y | |
double y1 | |
double y2 | |
} | m_filter |
Additional Inherited Members | |
![]() | |
static void | setInteractive (bool interactive) |
Definition at line 36 of file BandPass.h.
Kwave::BandPass::BandPass | ( | ) |
Constructor
Definition at line 29 of file BandPass.cpp.
References initFilter(), m_bandwidth, m_frequency, and setfilter_2polebp().
|
virtual |
|
virtual |
Implements Kwave::TransmissionFunction.
Definition at line 49 of file BandPass.cpp.
References m_filter.
|
virtual |
does the calculation
Implements Kwave::SampleSource.
Definition at line 43 of file BandPass.cpp.
References m_buffer, and output().
|
private |
reset/initialize the filter coefficients
Definition at line 86 of file BandPass.cpp.
References m_filter.
Referenced by BandPass(), setBandwidth(), and setFrequency().
|
slot |
receives input data
Definition at line 110 of file BandPass.cpp.
References double2sample(), m_bandwidth, m_buffer, m_filter, m_frequency, Kwave::SampleArray::resize(), sample2double(), setfilter_2polebp(), and Kwave::SampleArray::size().
|
signal |
emits a block with the filtered data
Referenced by goOn().
|
slot |
Sets the bandwidth, normed to [0...2Pi]. The calculation is: bw = bandwidth [Hz] * 2 * Pi / f_sample [Hz]. The default setting is 0.1.
Definition at line 152 of file BandPass.cpp.
References initFilter(), m_bandwidth, m_frequency, and setfilter_2polebp().
Referenced by Kwave::BandPassDialog::updateDisplay().
|
private |
set the coefficients for a given frequency
freq | normed frequency |
R | normed bandwidth |
Definition at line 100 of file BandPass.cpp.
References m_filter.
Referenced by BandPass(), input(), setBandwidth(), and setFrequency().
|
slot |
Sets the center frequency, normed to [0...2Pi]. The calculation is: fc = frequency [Hz] * 2 * Pi / f_sample [Hz]. The default setting is 0.5.
Definition at line 141 of file BandPass.cpp.
References initFilter(), m_bandwidth, m_frequency, and setfilter_2polebp().
Referenced by Kwave::BandPassDialog::updateDisplay().
double Kwave::BandPass::cx |
Definition at line 103 of file BandPass.h.
double Kwave::BandPass::cx1 |
Definition at line 103 of file BandPass.h.
double Kwave::BandPass::cx2 |
Definition at line 103 of file BandPass.h.
double Kwave::BandPass::cy1 |
Definition at line 103 of file BandPass.h.
double Kwave::BandPass::cy2 |
Definition at line 103 of file BandPass.h.
|
private |
bandwidth
Definition at line 99 of file BandPass.h.
Referenced by BandPass(), input(), setBandwidth(), and setFrequency().
|
private |
struct { ... } Kwave::BandPass::m_filter |
structure with the filter coefficients
Referenced by at(), initFilter(), input(), and setfilter_2polebp().
|
private |
center frequency
Definition at line 96 of file BandPass.h.
Referenced by BandPass(), input(), setBandwidth(), and setFrequency().
double Kwave::BandPass::x |
Definition at line 104 of file BandPass.h.
double Kwave::BandPass::x1 |
Definition at line 104 of file BandPass.h.
double Kwave::BandPass::x2 |
Definition at line 104 of file BandPass.h.
double Kwave::BandPass::y |
Definition at line 104 of file BandPass.h.
double Kwave::BandPass::y1 |
Definition at line 104 of file BandPass.h.
double Kwave::BandPass::y2 |
Definition at line 104 of file BandPass.h.