- Home /
 
Controlling audio clipping and distortion on multiple added sounds
when you play many sounds in unity, the volume adds beyond the dynamic range of the sound card, i.e., one, i.e., 0 dB.
in audio theory, you control excess volume of added sounds by dynamically multiplying the sound volumes, or using an audio limiter, etc.
What is the standard way in unity to control adding too many sounds and keeping sound level normalised?( normalised means at normal levels around 1, not too loud and not to faint).
audio clipping existed already as a tag, but there are 0 questions related to audio clipping! only audio clips, Bizarre! clipping is a technical digital signal processing term for audio level excess.
Did you find any solution to this. I'm having the same problem. As soon al two clips play at the same time, they start to clip.
Answer by frogsbo · Feb 07, 2014 at 02:45 PM
If the sounds.wav are normalized at 1, it means your audio file has max 1 volume, when you play 2 of them you have to change the volume to equals 0.5 on each one, otherwise total volume can go to 2, half of it is above speaker/soundcard level.
so if you play 10 of them roughly in the same time frame, make a small code that counts the number of ones being played at the same time, and devide by that number, with a smoothing function if necessary so that sound isnt cut faster than 20-30ms. 10 sounds, devide each by 10. because they are not exactly at the same time, but probably in steps, you can play around with that figure, perhaps multiply each by 1.5-1.6 or some value after, until you find the right sound level for you game.
the same sounds has exactly the same frequencies, especially if it is a non organic sound, and it will go higher than 1 level alot faster than adding for example a bass sound and a high sound.
imagine this graph is between zero and one, it is your sound:
           /\/\/\/\/\/\/\/\/\/\
 
                  when you add 10, the result graph can have moments that equals 10, and the sound card is made for 1 level (1.12 sometimes)
Your answer
 
             Follow this Question
Related Questions
Find all Objects/Scripts that access a given audio!! 1 Answer
Play audio clip on more than one object from another gameobject 2 Answers
Audio Clip Getting Cut Short 1 Answer
Truncate audio runtime 0 Answers
Previous audio clipped if called again 0 Answers