AuLib
1.0beta
|
#include <AuLib/Stft.h>
Public Member Functions | |
Stft (const FuncTable &win, bool dir, uint32_t decim=def_decim, bool repr=fft::rectang, uint32_t vframes=def_vframes, double sr=def_sr) | |
const double * | process (const double *sig, uint32_t vframes=def_vframes) |
const Stft & | process (const AudioBase &obj) |
const Stft & | operator() (const AudioBase &obj) |
bool | repr () const |
bool | framecount () const |
virtual const std::vector< std::complex< double > > & | spectrum () |
const std::complex< double > & | bin (uint32_t n) |
virtual const AudioBase & | operator*= (double scal) |
virtual const AudioBase & | operator*= (const double *sig) |
virtual const AudioBase & | operator*= (const Stft &obj) |
virtual const AudioBase & | operator+= (double num) |
virtual const AudioBase & | operator+= (const double *sig) |
virtual const AudioBase & | operator+= (const Stft &obj) |
![]() | |
AudioBase (uint32_t nchnls=def_nchnls, uint32_t vframes=def_vframes, double sr=def_sr) | |
virtual const AudioBase & | operator*= (const AudioBase &obj) |
virtual const AudioBase & | operator+= (const AudioBase &obj) |
double & | operator[] (uint32_t ndx) |
const double & | operator[] (uint32_t ndx) const |
iterator | begin () |
iterator | end () |
const_iterator | cbegin () const |
const_iterator | cend () const |
const AudioBase & | set (const AudioBase &obj) |
const AudioBase & | set (const double *sig) |
const double * | set (double v) |
double | set (double v, uint32_t p) |
operator const std::vector< double > & () const | |
operator const double * () const | |
const double * | vector () const |
double | vector (uint32_t frndx, uint32_t chn) const |
uint32_t | vframes (uint32_t frames) |
uint32_t | resize_exact (uint32_t frames) |
uint32_t | vframes () const |
uint32_t | vsamps () const |
uint32_t | nchnls () const |
uint32_t | sr () const |
uint32_t | error () const |
virtual const char * | error_message () const |
Protected Member Functions | |
virtual const double * | transform (const double *sig, uint32_t vframes) |
Protected Attributes | |
const std::complex< double > | m_z |
uint32_t | m_N |
uint32_t | m_H |
uint32_t | m_D |
bool | m_dir |
bool | m_repr |
uint64_t | m_framecount |
const FuncTable & | m_win |
std::vector< std::vector< double > > | m_framebufs |
std::vector< uint32_t > | m_pos |
std::vector< std::complex< double > > | m_cdata |
![]() | |
uint32_t | m_nchnls |
uint32_t | m_vframes |
std::vector< double > | m_vector |
double | m_sr |
uint32_t | m_error |
Additional Inherited Members | |
![]() | |
typedef std::vector< double >::iterator | iterator |
typedef std::vector< double >::const_iterator | const_iterator |
Stft implements a streaming Short-time Fourier Transform overlapped windows are taken from the input (forward mode) and analysis frames in either rectangular or polar formats are produced in the output (N/2 bins, first bin containing both DC and Nyq points) containing the non-negative spectrum.
On inverse mode, spectral data is read from the input and transformed back to the output, using an overlap-add algorithm.
|
inline |
Stft constructor
win - analysis window
decim - decimation
dir - transform direction, forward or inverse
repr - data format, fft::polar or fft::rectang
vframes - vector size
sr - sampling rate
|
inline |
return bin data as a complex<double> ref (only meaningful in forward transforms)
|
inline |
return analysis frame count
|
inlinevirtual |
|
inlinevirtual |
Multiply the data vector by a spectral vector
Reimplemented from AuLib::AudioBase.
Reimplemented in AuLib::Pvoc.
Multiply the data vector by the vector from obj
|
inlinevirtual |
Add a double to the spectral data (non-op for polar repr)
Reimplemented from AuLib::AudioBase.
Reimplemented in AuLib::Pvoc.
|
inlinevirtual |
Add a vector sig to the data vector (non-op for polar repr)
Reimplemented from AuLib::AudioBase.
Reimplemented in AuLib::Pvoc.
Add a vector sig from obj to the data vector (non-op for polar repr)
Reimplemented in AuLib::Pvoc.
|
inline |
transform an signal sig, vframes is the (time-domain) processing vector size and it is required to be >= analysis hopsize, otherwise no processing takes place.
|
inline |
return data format (fft::polar or fft::rectang)
|
inlinevirtual |
spectrum as a complex<double> vector ref (only meaningful in forward transforms)
Reimplemented in AuLib::Pvoc.
|
protectedvirtual |
STFT transform
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |