kwave
18.07.70
|
#include <PitchShiftFilter.h>
Public Slots | |
void | input (Kwave::SampleArray data) |
void | setSpeed (const QVariant speed) |
void | setFrequency (const QVariant freq) |
Signals | |
void | output (Kwave::SampleArray data) |
![]() | |
void | attributeChanged (const QVariant value) |
Public Member Functions | |
PitchShiftFilter () | |
virtual | ~PitchShiftFilter () Q_DECL_OVERRIDE |
virtual void | goOn () 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) |
Private Types | |
enum | { MAXDELAY = 1000000 } |
Private Member Functions | |
void | initFilter () |
Private Attributes | |
Kwave::SampleArray | m_buffer |
float | m_speed |
float | m_frequency |
QVector< float > | m_dbuffer |
float | m_lfopos |
float | m_b1pos |
float | m_b2pos |
float | m_b1inc |
float | m_b2inc |
bool | m_b1reset |
bool | m_b2reset |
int | m_dbpos |
Additional Inherited Members | |
![]() | |
static void | setInteractive (bool interactive) |
Definition at line 38 of file PitchShiftFilter.h.
|
private |
Kwave::PitchShiftFilter::PitchShiftFilter | ( | ) |
Constructor
Definition at line 34 of file PitchShiftFilter.cpp.
References initFilter().
|
virtual |
|
virtual |
does the calculation
Implements Kwave::SampleSource.
Definition at line 49 of file PitchShiftFilter.cpp.
References m_buffer, and output().
|
private |
reset/initialize the filter and buffer
Definition at line 55 of file PitchShiftFilter.cpp.
References m_b1inc, m_b1pos, m_b2inc, m_b2pos, m_dbpos, m_dbuffer, m_lfopos, m_speed, and MAXDELAY.
Referenced by PitchShiftFilter(), setFrequency(), and setSpeed().
|
slot |
receives input data
Definition at line 75 of file PitchShiftFilter.cpp.
References float2sample(), m_b1inc, m_b1pos, m_b1reset, m_b2inc, m_b2pos, m_b2reset, m_buffer, m_dbpos, m_dbuffer, m_frequency, m_lfopos, m_speed, MAXDELAY, Kwave::SampleArray::resize(), sample2float(), Kwave::SampleArray::size(), and Kwave::toInt().
|
signal |
emits a block with the filtered data
Referenced by goOn().
|
slot |
Sets the frequency parameter
freq | the normed frequency |
Definition at line 204 of file PitchShiftFilter.cpp.
References initFilter(), and m_frequency.
|
slot |
Sets the speed factor
speed | factor as a double |
Definition at line 194 of file PitchShiftFilter.cpp.
References initFilter(), and m_speed.
|
private |
Definition at line 96 of file PitchShiftFilter.h.
Referenced by initFilter(), and input().
|
private |
Definition at line 94 of file PitchShiftFilter.h.
Referenced by initFilter(), and input().
|
private |
Definition at line 98 of file PitchShiftFilter.h.
Referenced by input().
|
private |
Definition at line 97 of file PitchShiftFilter.h.
Referenced by initFilter(), and input().
|
private |
Definition at line 95 of file PitchShiftFilter.h.
Referenced by initFilter(), and input().
|
private |
Definition at line 99 of file PitchShiftFilter.h.
Referenced by input().
|
private |
buffer for input
Definition at line 82 of file PitchShiftFilter.h.
|
private |
Definition at line 100 of file PitchShiftFilter.h.
Referenced by initFilter(), and input().
|
private |
Definition at line 92 of file PitchShiftFilter.h.
Referenced by initFilter(), and input().
|
private |
base frequency
Definition at line 88 of file PitchShiftFilter.h.
Referenced by input(), and setFrequency().
|
private |
Definition at line 93 of file PitchShiftFilter.h.
Referenced by initFilter(), and input().
|
private |
speed factor
Definition at line 85 of file PitchShiftFilter.h.
Referenced by initFilter(), input(), and setSpeed().