Musing on how Audacity handles multiple gain adjustments.

This section is now closed.
Forum rules
Audacity 1.2.x is now obsolete. Please use the current Audacity 2.1.x version.
Locked
comcon
Posts: 92
Joined: Sun Jan 20, 2008 7:04 pm
Operating System: Please select

Musing on how Audacity handles multiple gain adjustments.

Post by comcon » Thu Feb 07, 2008 3:19 am

I know that Audacity has a 32 bit sample resolution, and that when mixed down to normal 16 bit wav, it renders much of the following moot...

However:

As a wav file is nothing more than data points representing an analog waveform...

When gain/amplification (either negative or positive) is applied to this, the resulting interpolation by definition results in a less acurate representation of the original waveform.

I'm wondering if when running down the EDL (edit decision list), Audacity performs each gain change calculation seperately, or if it's smart enough to look at all the gain adjustments in total, and interpolating only once, thereby reducing the accumalation of error.

For example, if I apply a negative gain of 1.7dB, then apply a positive gain of 3.0dB, then apply a negative gain of 1.3dB -- do I end up with the exact sample data points as when I started?

kozikowski
Forum Staff
Posts: 69369
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Musing on how Audacity handles multiple gain adjustments

Post by kozikowski » Thu Feb 07, 2008 4:26 am

Apply a gain reduction of 85dB and then a gain boost of 85dB. If you get garbage instead of the original wave, you have your answer. Or go the other way--go up first. Both directions, if applied only once, will render the show as trash.

I don't think it's a problem of being smart enough. Yes, it seems clear what has to be done in a simple example, but what happens if you apply multiple insanely complicated filters? I suspect the machine would spend most of its time calculating each new sample point and no time producing a show.

I've used editors where if you violate a limit in an early step, you have no show, even though succeeding steps "make up" for it.

Let's see if one of the heavy programmers drops in.

Koz

comcon
Posts: 92
Joined: Sun Jan 20, 2008 7:04 pm
Operating System: Please select

Re: Musing on how Audacity handles multiple gain adjustments

Post by comcon » Thu Feb 07, 2008 5:28 am

It won't let you go lower than absolute -48... probably a low limit built in. multiples of -10, -20 etc... never bring it lower than that.

Good programing practices usually always limit outcomes of calculations. Helps to avoid divide by zero problems and the like.

kozikowski
Forum Staff
Posts: 69369
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Musing on how Audacity handles multiple gain adjustments

Post by kozikowski » Fri Feb 08, 2008 1:06 am

<<<Helps to avoid divide by zero problems and the like.>>>

I never divide by zero. Professional policy.

OK, so go up. A show peaking at around -6 or so should survive a 20dB boost as long as you bring it back down in a succeeding filter, right?

Koz

Locked