a signal processing class for spectral data (based on mha_spec_t)
More...
|
| spectrum_t (const unsigned int &frames, const unsigned int &channels) |
| constructor of spectrum class More...
|
|
| spectrum_t (const mha_spec_t &) |
| Copy constructor. More...
|
|
| spectrum_t (const MHASignal::spectrum_t &) |
| Copy constructor. More...
|
|
| spectrum_t (const std::vector< mha_complex_t > &) |
|
virtual | ~spectrum_t (void) |
|
mha_complex_t & | operator() (unsigned int f, unsigned int ch) |
| Access to element. More...
|
|
mha_complex_t & | operator[] (unsigned int k) |
| Access to a single element, direct index into data buffer. More...
|
|
mha_complex_t & | value (unsigned int f, unsigned int ch) |
| Access to element. More...
|
|
void | copy (const mha_spec_t &) |
| copy all elements from a spectrum More...
|
|
void | copy_channel (const mha_spec_t &s, unsigned sch, unsigned dch) |
| Copy one channel of a given spectrum signal to a target channel. More...
|
|
void | export_to (mha_spec_t &) |
| copy elements to spectrum structure More...
|
|
void | scale (const unsigned int &, const unsigned int &, const unsigned int &, const mha_real_t &) |
| scale section [a,b) in channel "ch" by "val" More...
|
|
void | scale_channel (const unsigned int &, const mha_real_t &) |
| scale all elements in one channel More...
|
|
a signal processing class for spectral data (based on mha_spec_t)
◆ spectrum_t() [1/4]
spectrum_t::spectrum_t |
( |
const unsigned int & |
frames, |
|
|
const unsigned int & |
channels |
|
) |
| |
constructor of spectrum class
Allocates buffers and initializes memory to zeros.
- Parameters
-
frames | number of frames (fft bins) in one channel. Number of Frames is usually fftlen / 2 + 1 |
channels | number of channels |
◆ spectrum_t() [2/4]
◆ spectrum_t() [3/4]
◆ spectrum_t() [4/4]
spectrum_t::spectrum_t |
( |
const std::vector< mha_complex_t > & |
src | ) |
|
◆ ~spectrum_t()
spectrum_t::~spectrum_t |
( |
void |
| ) |
|
|
virtual |
◆ operator()()
mha_complex_t& MHASignal::spectrum_t::operator() |
( |
unsigned int |
f, |
|
|
unsigned int |
ch |
|
) |
| |
|
inline |
Access to element.
- Parameters
-
f | Bin number |
ch | Channel number |
- Returns
- Reference to element
◆ operator[]()
mha_complex_t& MHASignal::spectrum_t::operator[] |
( |
unsigned int |
k | ) |
|
|
inline |
Access to a single element, direct index into data buffer.
- Parameters
-
- Returns
- Reference to element
◆ value()
mha_complex_t& MHASignal::spectrum_t::value |
( |
unsigned int |
f, |
|
|
unsigned int |
ch |
|
) |
| |
|
inline |
Access to element.
- Parameters
-
f | Bin number |
ch | Channel number |
- Returns
- Reference to element
◆ copy()
copy all elements from a spectrum
- Parameters
-
◆ copy_channel()
void spectrum_t::copy_channel |
( |
const mha_spec_t & |
s, |
|
|
unsigned |
sch, |
|
|
unsigned |
dch |
|
) |
| |
Copy one channel of a given spectrum signal to a target channel.
- Parameters
-
s | Input spectrum signal |
sch | Channel index in source signal |
dch | Channel index in destination (this) signal |
◆ export_to()
copy elements to spectrum structure
- Parameters
-
dest | destination spectrum structure |
◆ scale()
void spectrum_t::scale |
( |
const unsigned int & |
a, |
|
|
const unsigned int & |
b, |
|
|
const unsigned int & |
ch, |
|
|
const mha_real_t & |
val |
|
) |
| |
scale section [a,b) in channel "ch" by "val"
- Parameters
-
a | starting frame |
b | end frame (excluded) |
ch | channel number |
val | scale factor |
◆ scale_channel()
void spectrum_t::scale_channel |
( |
const unsigned int & |
ch, |
|
|
const mha_real_t & |
src |
|
) |
| |
scale all elements in one channel
- Parameters
-
ch | channel number |
src | scale factor |
The documentation for this class was generated from the following files: