[LAD] Mixing audio: Noiseless volume changes

Tim E. Real termtech at rogers.com
Mon Mar 18 23:43:32 UTC 2013


On March 18, 2013 07:04:52 PM Tim E. Real wrote:

On March 18, 2013 06:47:16 PM you wrote:




On Mon, Mar 18, 2013 at 5:50 PM, Tim E. Real <termtech at rogers.com> wrote:

Hi again. Looking for any advice, tips, tricks, anecdotes etc.

I want to eliminate or reduce 'zipper' noise on volume changes.
So I'm looking at two techniques:
Zero-crossing / zero-value signal detection, and slew-rate limiting.
Code is almost done, almost ready to start testing each technique.
Each technique has some advantages and disadvantages.

If I use a slew-rate limiter, I figure for a sudden volume factor change
 from 0.0 to 1.0, if I limit the slew rate to say 0.01 per sample then after
 100 samples the ramp will be done.
But even with a fine ramp, this still might introduce artifacts in the audio.


You cannot avoid artifacts in the audio. The only question is what is the 
nature of the artifacts.  

 
If I use a zero-crossing/zero-value detector and apply volume changes


Zero crossing stuff is a completely bogus idea that needs to be eliminated from 
the lexicon of audio software. You will not be accomplishing anything trying 
to use such a technique, other than introduce even more artifacts (and rather 
horrendous ones at that). Even zero-valued samples are not particularly useful 
- keep in mind that what defines transducer (read: speaker) behaviour is power, 
not instantaneous volume.  

Just use sensibly short ramped changes. For the record, Ardour uses 64 or a 
JACK period size, whichever is, hmm, larger or smaller, can't recall.

--p


Wow, surprising answer. 
Can you elaborate a wee bit on the bogus point? What worse artifacts?
Popping noise will be heard if sudden volume change is applied while
 the signal data value is currently non-zero.
Is it not better to apply (register) the changes during zero or near-zero
 signal data values?

After all, some electronic systems employ it: 
http://en.wikipedia.org/wiki/Zero_crossing
http://electronicdesign.com/analog/digital-volume-control-eliminates-zipper-
noise

Thanks.
Tim.


Ah, I may have answered my own question when I said:
"(One cannot simply wait for the current data value to be 'zero' because
 for example with a perfect square wave signal the 'current' value will never 
 approach zero, hence the zero-crossing detection requirement.)"

Yeah, I was worried about that bit: 
That's not just an exception. With all kinds of waves not just square, many 
 times the current value may not approach zero even if it did 'cross' over.
So having no choice but to apply the volume at this cross point the popping
 noise might still be heard. I guess that's what Fons meant by 'reduced'...
 and what Paul meant by... bogus. Right?

Thanks.
Tim.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20130318/5ebbc989/attachment.html>


More information about the Linux-audio-dev mailing list