# how to eliminate frame boundary discontinuity?

I'm applying at each 2048 samples the pitch synchronous algorithm to pitch scale some audio files, everything seems to occur well, but I've noticed some glitches, artifacts, clicks between every boundary frame!

I'm testing off-line in large áudio files(I'm processing frame-by-frame), what I tried to do was keep the old, current and the next frame to pitch synchronous computation (then I pitch scale 2048*3 samples), but does not seem to be working as expected.

What are the known ways to eliminate frame boundary discontinuity?

• i probably should ask, by "pitch scale some audio files", do you mean you are pitch shifting this audio? and are you using some FFT-based method like the phase vocoder? if so, there could be another reason for the glitch artifacts. – robert bristow-johnson May 18 '14 at 2:46
• yeah I am pitch shifting this audio, I using just time domain methods for both (pitch track and Pitch shift) .. – user2721828 May 18 '14 at 11:59
• how are you "pitch track[ing]"? something related to autocorrelation? well, then, if your sample rate is 44.1 kHz, then you probably need to be freshly determining the period length more often than 2048 samples. perhaps every 512 samples. i presume you're splicing in extra whole periods upshifting and splicing out whole periods when downshifting, right? are you cross-fading these splices? – robert bristow-johnson May 18 '14 at 13:11
• yeah exactly in all points pitch track is autocorrelation based, I not cross-fade, i just concatenate each processed frame ... – user2721828 May 18 '14 at 14:12
• "... i just concatenate each processed frame." <--> and you're wondering why you're getting some glitches or pops? – robert bristow-johnson May 18 '14 at 17:58

the most weirdest line of defense, is to advance each frame by a well-chosen "random" value between $L$ and $2L$ (where $2L$ is longer than the longest anticipated period) to scramble up whatever effect of the boundary discontinuity.