I am trying to create short seamless loops of continuous sound.

I recorded myself making an "Aaaaah" sound at 44.1 KHz, and cut this recording to a section containing 4096 samples (giving me slightly under 1/10th of a second of audio).

When I play this in a loop, the sound is very much recognizable but there is of course an audible ticking noise at the point where it is cut.

I applied an FFT transform to this data. When I apply an inverse FFT to the Fourier tables to recreate the signal, the defect is of course still audible.

Is there anything I can do to the Fourier tables to eliminate the defect without changing the other audible properties of the recording? I'm very much uneducated in signal processing, but intuitively I feel that since the ticking sound repeats once per loop, it might be possible to work in the frequency domain to achieve my goal of cleaning it up to produce a seamless continuous sound.

Note: In case there are Javascript programmers here, I created a CodePen here with the "Aaah" loop and its conversion to and from Fourier tables, to facilitate experimentation in code.

  • 1
    $\begingroup$ The clicking is due to a time-domain discontinuity in the waveform. You're unlikely to find anything to do in the frequency domain to fix that, short of lowpass-filtering it to the point where the high-frequency content in the click isn't audible. You would likely notice degradation in the sound of interest in that case, though. $\endgroup$
    – Jason R
    Commented Aug 31, 2015 at 19:57
  • 1
    $\begingroup$ Thank you! What about a window function? I tried applying a Hanning window to the sample data, and the tick is gone but there is now a vibrating effect since the amplitude increases and decreases during the loop. Could there be a way to process this out? $\endgroup$
    – Clafou
    Commented Aug 31, 2015 at 20:17
  • 1
    $\begingroup$ Why not just have a smooth ramp up of a few samples at the beginning of your sample and then a smooth ramp down at the end --- keeping greater than 99% of the samples the same. Using a window across the whole signal will cause a low frequency modulation, which may give the undesirable side tones you are noticing. $\endgroup$
    – Peter K.
    Commented Aug 31, 2015 at 20:46
  • 1
    $\begingroup$ Why not use a phase vocoder to do this frame freeze? Its will keep the phase coherence at every 4096 frame. $\endgroup$
    – ederwander
    Commented Aug 31, 2015 at 22:28
  • 2
    $\begingroup$ it's the same issue of looping with the samplers from the 80s and 90s. consider AMDF or autocorrelation to find click-free splice points. and then crossfade, in case your splice points are not perfectly matched. $\endgroup$ Commented Sep 1, 2015 at 0:44

1 Answer 1


Try using some sort of pitch estimator to determine the pitch of your sample. Or hum in tune to a note of a known musical pitch (from a pitch pipe for instance). Then overlap and cross-fade frames, not 4k apart, but a shorter distance apart that is an integer multiple of the period corresponding to that pitch.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.