Editing and Digital Clicks

For everything after the recording stage: hardware/software and how you use it.
Post Reply

Editing and Digital Clicks

Post by ITHertz »

Hi All,

Here's something I don't have a very good understanding of - when editing digital audio, it's possible to create "clicks" depending on the edit points. These clicks tend to be more pronounced depending on how "discontinuous" the waveform is.

Now, any non-stationary waveform (i.e. anything other than DC) will vary from sample to sample but despite the discrete nature of digital audio we don't hear clicks in this case due to the reconstruction filter in the DAC. At some point however, if the waveform becomes too "discontinuous" (due to edits) an audible click will occur.

So what's the main factor leading to the click - is it the absolute change in sample value, or is it the rate of change (the waveform gradient), or some combination of the two? Or is it something else?

The reason I'm interested in this is because virtually all editing tutorials suggest using zero-crossing points for edits. But this won't help if it's actually the absolute change/rate of change of samples that's causing the click. That is, a jump from a sample value of 0.0 to 1.0 is the same magnitude as a jump from -0.5 to +0.5, so using a zero crossing won't make any difference.

Am I understanding this right?

Cheers!
ITHertz
Regular
Posts: 286 Joined: Mon Jul 28, 2008 12:00 am

Re: Editing and Digital Clicks

Post by James Perrett »

There could be quite a bit to unravel here and I'll bet Hugh will be along with a comprehensive answer at some point but you are roughly right but you are using very unrealistic examples. With audio signals, larger signals tend to be lower frequency so the rate of amplitude change will normally be much lower than in your example. A normal audio signal, especially one that has been band limited (which is required for digital audio), would never show a sudden change of half full scale unless you were using specially generated test tones.

The other point I would make is that all decent audio editors incorporate a quick fade at the start and end of each section so that there is never a sudden transition between two sections unless you deliberately disable these short fades. Consequently, the advice to cut at zero crossings (like most advice you see on the Internet) can be safely ignored if you are using a good audio editor. There are other, more important, things to worry about when choosing edit points.
User avatar
James Perrett
Moderator
Posts: 16988 Joined: Mon Sep 10, 2001 12:00 am Location: The wilds of Hampshire
JRP Music - Audio Mastering and Restoration. JRP Music Facebook Page

Re: Editing and Digital Clicks

Post by Hugh Robjohns »

^ para 2.

Don't 'butt edit' at zero crossing points. Its incredibly fiddly and torally unnecessary.

Any decent DAW will insert a short crossfade at the chosen edit position. 20ms is a common default. Guaranteed click free.

As for your example, any step change in amplitude between adjacent samples creates a non-valid waveform with frequency content far above the nyquist limit, thus generating a spurious aliased output.

Crossfades are the intelligent solution. Analogue editors did it first!
User avatar
Hugh Robjohns
Moderator
Posts: 43690 Joined: Fri Jul 25, 2003 12:00 am Location: Worcestershire, UK
Technical Editor, Sound On Sound...
(But generally posting my own personal views and not necessarily those of SOS, the company or the magazine!)
In my world, things get less strange when I read the manual... 

Re: Editing and Digital Clicks

Post by ITHertz »

Hugh Robjohns wrote: Mon Jan 13, 2025 12:54 am As for your example, any step change in amplitude between adjacent samples creates a non-valid waveform with frequency content far above the nyquist limit, thus generating a spurious aliased output.

So what constitutes a "step change"?
ITHertz
Regular
Posts: 286 Joined: Mon Jul 28, 2008 12:00 am

Re: Editing and Digital Clicks

Post by Tim Gillett »

I remember the first time when I noticed my old Wavelab 4 would not always allow me to edit at a certain precise point. From memory it seemed to move the waveforms slightly until it found matching amplitudes, which became the new splice point. Would this have been so or was something else going on?
Tim Gillett
Frequent Poster
Posts: 2707 Joined: Wed Jan 30, 2013 12:00 am Location: Perth, Western Australia

Re: Editing and Digital Clicks

Post by ken long »

Tim Gillett wrote: Mon Jan 13, 2025 7:27 am I remember the first time when I noticed my old Wavelab 4 would not always allow me to edit at a certain precise point. From memory it seemed to move the waveforms slightly until it found matching amplitudes, which became the new splice point. Would this have been so or was something else going on?

Wavelab has a zero crossing detection. Sounds like you had this on.
User avatar
ken long
Frequent Poster
Posts: 3631 Joined: Mon Jan 21, 2008 12:00 am Location: Somers Town
I'm All Ears.

Re: Editing and Digital Clicks

Post by James Perrett »

ITHertz wrote: Mon Jan 13, 2025 1:00 am So what constitutes a "step change"?

I would guess that Hugh is talking about any sudden change in the gradient of the waveform. In a properly configured sampled system these should not occur as any information above the Nyquist frequency should have been filtered out before the ADC (or, in the case of digital instruments and effects, at the point where those frequencies were generated).
User avatar
James Perrett
Moderator
Posts: 16988 Joined: Mon Sep 10, 2001 12:00 am Location: The wilds of Hampshire
JRP Music - Audio Mastering and Restoration. JRP Music Facebook Page

Re: Editing and Digital Clicks

Post by Hugh Robjohns »

Clicks are not necessarily a bad thing in audio, and often we go out of our way to record or create them in the form of snare drums, rim shots, finger snaps, or whatever.

And fundamentally, that kind of sound comes from a very rapid and large change in amplitude, usually of brief duration.

Clicks in editing usually occur because the amplitude of the outgoing audio is significantly different to that of the incoming — resulting in a 'step change' between adjacent samples — that step edge providing the transient we hear as a click.

Such a vertical step edge between adjacent samples resembles one side of a square wave and, as we know, a true square wave with vertical edges requires an infinite number of odd harmonics... which is illegal under Nyquist.

So the edit itself creates illegal frequencies within the digital system (and after the anti-alias filter in the AD converter), and thus a brief splat of aliases

Locating edit points at a zero crossing (ie. at points where outgoing and incoming audio samples both have zero amplitude) obviously avoids any step change in amplitude... and thus minimises the risk of a click.

However, if either side of the edit involved a very rapid and large change in amplitude — something that intentionally sounded like a click — that's still going to be there.

Back in the days of analogue tape it was found that cutting the tape at 60° gave reliable click-free edits, with a brief fade out of the outgoing (as the tape width narrows), alongside a brief fade in of the incoming.

Obviously, the crossfade duration is proportional to the tape speed, tape width, and cut angle, but was typically 10-20ms.

Most DAWs replicate this action by default, inserting a crossfade either side of the chosen edit point.... allowing you to focus on the right edit point by ear, rather than finding zero sample values by eye!
User avatar
Hugh Robjohns
Moderator
Posts: 43690 Joined: Fri Jul 25, 2003 12:00 am Location: Worcestershire, UK
Technical Editor, Sound On Sound...
(But generally posting my own personal views and not necessarily those of SOS, the company or the magazine!)
In my world, things get less strange when I read the manual... 

Re: Editing and Digital Clicks

Post by hz37 »

These "step changes" can easily occur in real-world audio material. If we edit a bit of dialog, where there is an under-current of low frequency information (e.g. from street noises or HVAC), at the exact point where we decide to edit the dialog, the low frequency sound may be at a phase position where it has a high or low excursion. In that case, you are unintentionally creating a sudden "square wave" moment in time. The software will replicate exactly what you did in terms of sound, which is an immediate transient which has lots of harmonics, hence a click. The same can happen in music, especially with bass frequencies. If, unbeknownst to you, you edit the bass tone somewhere during its up- or down excursion, a new transient is introduced at the edit point.

If you do a lot of editing, you will notice that there are certain sounds, like the letter "S", which are more or less stochastic noise, that are very forgiving in terms of editing, while others, like the "B" or "D" at the start of a new sentence, are more prone to unwanted artefacts.

The remedy has already been given: crossfades. Or fade-ins and fade-outs at the end of an edit. I have my Wacom pen programmed to insert a (cross)fade easily in my Pro Tools timeline and use this more than anything, I guess.

By the way, we did something similar back in the days of analog tape editing by cutting the tape at an angle. This avoided unwanted clicks by forcing a sort of crossfade in the audio. If you listen to old edited music, you can hear (and see) these crossfades, because they created a very short stereo fade. That's just the nature of tape and editing it at an angle, inviting the left channel audio to proceed the right channel audio a few milliseconds.

Hens Zimmerman
hz37
Poster
Posts: 49 Joined: Sun Apr 16, 2006 12:00 am Location: The Netherlands
Post Reply