re: Sound

George Warner <[email protected]> Tue, 17 May 2005 09:12:26 -0700
Newsgroups gmane.games.devel.general
Message-ID <BEAF65FA.1E139%[email protected]>
On Mon, 16 May 2005 13:45:53 -0400, Brian Hook <[email protected]>
wrote:

>> IIRC what you're looking for is called "cross normalization". You
>> don't average (add all channels together and divide by the number
>> of channels) because dead channels will attenuate the output too
>> much;
>
> The other issue is how large a window you perform these operations on.
>  Clamping can be done per-sample-slice, but if you average per-sample
> then your volume is going to be all over the map.

This is true. The min/max (or absolutes) should be used to compute an
envelope. This envelope is used to up an AGC that then decay's over time.

>>  Instead you add the absolute values of all the channels
>> together (pseudo envelope) and then normalize each channel against
>> this absolute value. To improve dynamic range this should be done
>> on a logarithmic scale.
>
> This is the similar to "riding the mixing slider", which works, but
> requires a lot more computational effort as you keep track of a
> sliding window and perform the normalization (via table lookup
> hopefully), along with a global volume attenuation.

I haven't found it to be particularly computationally heavy at all. Even the
logarithmic mixing lends itself well to optimization if you have SIMD.

> Unfortunately it's still very susceptible to heavy transients, but at
> least loud sections get compressed down.

This much is true. More importantly quiet channels aren't lost altogether
when you have lots of silent channels.

-- 
Enjoy,
George Warner,
Schizophrenic Optimization Scientist
Apple Developer Technical Support (DTS)




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557