2

For a personal project, I need to generate a track that contains a single, pure frequency.

My method for this involves generating a single tone using Audacity, and exporting the file. The wave stored in the file represents a pure 440Hz frequency.

I've noticed something when playing it back, though - at the end of the sample, there's a small pop. Plotting it on a Fourier transform in any of my media players reveals that this isn't just a physical effect or a problem with the sound file - it's actually a part of the file, even when recorded losslessly. Here's what it looks like on a Fourier transform:

The solid line is a 440Hz signal, but the vertical line is the end of the clip. I'm vaguely familiar with Fourier mathematics, and realize this might have to do with the boundary conditions at the end of the sound wave.

Is there a way to avoid this sharp pop at the end of the sample?

7

If you zoom in to your waveform, you will see that it crosses the zero line twice per cycle (880 times per second). If you end your tone recording exactly at a "zero-crossing" then there will be nothing to create a "click" when played back.

The "click" comes from ending the waveform somewhere above (or below) the zero-crossing. If the recording ends mid-cycle, then there is a sharp sound as the voltage goes back to zero. We hear that as a "click".

It may even be necessary to impose a "fade-out" where you reduce the amplitude of the signal over several cycles just before the end. So that the signal always ends at exactly zero.

  • It's also true (axiomatically) that if a sine wave sound is an exact number of seconds in length, it's an exact number of cycles in length too, so it will end at a zero crossing without any other intervention – Jim Mack Apr 20 '16 at 14:52
1

What you need is to trim the waveform at a zero point - a technique called zero line crossing https://en.wikipedia.org/wiki/Zero_crossing

Here is how they do it in an old version of Audition

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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