hello. I am implementing an N(512) point FFT in my analysis filterbank.However after the fft has been computed ,I save only iSubBand number of frequency bins. In my synthesis filterbank , I fill the bins from iSubBand upt0 N/2 +1 values with zeroes, fill the remaining bins with zeroes and compute the IFFT .
When I set iSubBand = N/2 +1 , the output sounds good. But for example when I set iSubBand = 100 , there is a lot of scratching noise/distortion. Here is a part of my code. I have used the overlap add and a HANN Windowing.
ANALYSIS FILTER BANK:
#else
for (iFftIndex = 0; iFftIndex < psIrcAnalysisFiltBank->iFftOrder; iFftIndex++)
{
psIrcAnalysisFiltBank->pcNe10In[iFftIndex].r = (ne10_float32_t)psIrcAnalysisFiltBank->pfHannWindowedSignal[iFftIndex];
psIrcAnalysisFiltBank->pcNe10In[iFftIndex].i = (ne10_float32_t)0.0;
}
/* Applying the FFT using the Neon10 library --------------------------------------------*/
ne10_fft_c2c_1d_float32_neon(
psIrcAnalysisFiltBank->pcNe10Out,
psIrcAnalysisFiltBank->pcNe10In,
psIrcAnalysisFiltBank->fNe10Cfg,0);
/* Storing the complex FFT values in the corresponding output buffer ---------------------*/
for (iFftIndex = 0; iFftIndex < psIrcAnalysisFiltBank->iNumSubBands; iFftIndex++)
{
ppcAnalysisFiltBankOutBufferFreq[iChann][iFftIndex].re = (float)psIrcAnalysisFiltBank->pcNe10Out[iFftIndex].r;
ppcAnalysisFiltBankOutBufferFreq[iChann][iFftIndex].im = (float)psIrcAnalysisFiltBank->pcNe10Out[iFftIndex].i;
}
#endif
SYNTHESIS FILTER BANK:
/ Put the available iNumSubBands number of bins into the input vector of the IFFT -------/
for (iFftIndex = 0; iFftIndex < psIrcSynthesisFiltBank->iNumSubBands; iFftIndex++)
{
psIrcSynthesisFiltBank->pcNe10In[iFftIndex].r = (ne10_float32_t)ppcSynthesisFiltBankInBufferFreq[iChann][iFftIndex].re;
psIrcSynthesisFiltBank->pcNe10In[iFftIndex].i = (ne10_float32_t)ppcSynthesisFiltBankInBufferFreq[iChann][iFftIndex].im;
}
if (psIrcSynthesisFiltBank->iNumSubBands < psIrcSynthesisFiltBank->iFftOrder/2 + 1)
{
/* Fill with zeros until the NFFT/2+1th bin ----------------------------------------------*/
for (iFftIndex = psIrcSynthesisFiltBank->iNumSubBands; iFftIndex < psIrcSynthesisFiltBank->iFftOrder/2 + 1; iFftIndex++)
{
psIrcSynthesisFiltBank->pcNe10In[iFftIndex].r = (ne10_float32_t) 0.0;
psIrcSynthesisFiltBank->pcNe10In[iFftIndex].i = (ne10_float32_t) 0.0;
}
}
/* Fill the complex conjugate values -----------------------------------------------------*/
for ( iFftIndex = psIrcSynthesisFiltBank->iFftOrder/2 +1,i = psIrcSynthesisFiltBank->iFftOrder/2 - 1 ; iFftIndex < psIrcSynthesisFiltBank->iFftOrder ,i > 0; iFftIndex++,i--)
{
psIrcSynthesisFiltBank->pcNe10In[iFftIndex].r = psIrcSynthesisFiltBank->pcNe10In[i].r;
psIrcSynthesisFiltBank->pcNe10In[iFftIndex].i = - psIrcSynthesisFiltBank->pcNe10In[i].i;
}
/* Applying the IFFT using the Neon10 library --------------------------------------------*/
ne10_fft_c2c_1d_float32_neon(
psIrcSynthesisFiltBank->pfNe10Out,
psIrcSynthesisFiltBank->pcNe10In,
psIrcSynthesisFiltBank->fNe10Cfg,1);