re: [GD-General] Sound
Brought to you by:
vexxed72
From: George W. <ge...@ap...> - 2005-05-16 17:34:16
|
On Sun, 15 May 2005 11:42:03 -0400, "Ken Noland" <kn...@wh...> wrote: > Anybody know any good sound lists or really great articles on software > sound mixing? I built a continuous streaming sound system and I'm having > difficulties mixing two sounds together. Just doing an addition to the > two sound samples produces errors when the sound wraps around the > limitations of a signed short. Clamping that doesn't work either since > sound is measured in a difference of samples. Doing an average on the > two sound samples causes sounds to be more quiet then they should > naturally be, so is there a better way? 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; 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. -- Enjoy, George Warner, Schizophrenic Optimization Scientist Apple Developer Technical Support (DTS) |