The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
mha_spec_t Struct Reference
Inheritance diagram for mha_spec_t:
Inheritance graph

Public Attributes

mha_complex_tbuf
 signal buffer More...
 
unsigned int num_channels
 number of channels More...
 
unsigned int num_frames
 number of frames in each channel More...
 
mha_channel_info_tchannel_info
 detailed channel description More...
 

Detailed Description

\ingroup mhasignal
\brief Spectrum signal structure 

This structure contains the short time fourier transform output of the windowed input signal. The member num_frames describes the number of frequency bins in each channel. For an even FFT length $N$, this is $N/2+1$. With odd FFT lengths, it is $(N+1)/2$. The imaginary part of the first bin is zero. For even FFT lengths, also the imaginary part at the Nyquist frequency is zero.

Data order of FFT spectrum.

Only the FFT bins for the positive frequencies, 0, and the Nyquist frequency are stored in this structure. The negative frequencies are not stored, because for a real-valued time signal they are the complex conjugates of the positive frequencies.

The negative frequencies still contribute to the signal's level. Refer to Central Calibration for a description of the scaling and how the level would be computed from the spectrum. It is recommended to use the library function MHASignal::rmslevel to compute the unweighted level correctly in Pascal, or MHASignal::colored_intensity to compute a possibly weighted intensity.

Member Data Documentation

◆ buf

mha_complex_t* mha_spec_t::buf

signal buffer

◆ num_channels

unsigned int mha_spec_t::num_channels

number of channels

◆ num_frames

unsigned int mha_spec_t::num_frames

number of frames in each channel

◆ channel_info

mha_channel_info_t* mha_spec_t::channel_info

detailed channel description


The documentation for this struct was generated from the following file: