jzi040941/PercepNet

The step of pitch filtering

Closed this issue · 3 comments

Hi Noah,

I have been working on the PercepNet project recently, and I read the code in denoise.cpp.
I am not sure the code about "comb filtering" below:

for (k=-COMB_M;k<COMB_M+1; k++){
for (i=0;i<WINDOW_SIZE;i++)
p[i] += st->comb_buf[COMB_BUF_SIZE-FRAME_SIZE*(FRAME_LOOKAHEAD)-WINDOW_SIZE-pitch_index*k+i]*common.comb_hann_window[k+COMB_M]; }

I was wondering that the pitch needs to compute with the previous frames and how it works?
Thank you!

there is code buffering input to comb_buf on denoise.cpp L350~L351

  RNN_MOVE(st->comb_buf, &st->comb_buf[FRAME_SIZE], COMB_BUF_SIZE-FRAME_SIZE);
  RNN_COPY(&st->comb_buf[COMB_BUF_SIZE-FRAME_SIZE], in, FRAME_SIZE);

so comb_buf will have previous and forward both frame
Thanks

Hi Noah,

I convert the filter to the time sequence is
228382267_247401813868846_6200234835969266223_n.
I was wondering that is the p[i] does the time-domain convolution? Because I am not sure why need to run the second for loop(i=0~480).

Thanks

image
we are processing for one window and it's size is 960 on this project

and pitch filtering is working like image above (when T = 480)
that's why we need second loop