I have a tone and chord generator that can produce 1 - 8 tones simultaneously. What's the proper way to ensure that the there's never any clipping and the amplitude stays the same when playing 1 tone or 8? Should I be dynamically dividing the amplitude by the number of tones being played?
-
Polyphony and amplitude
-
Dividing by the number of tones played will prevent clipping (provided each tone never exceeds a given range of values; this isn't necessarily the case for every kind of synthesis), BUT to maintain constant signal power when mixing uncorrelated tones (which is probably what you want), you should divide by the square root of the number of tones.
You can think of the amplitude distribution of a sum of uncorrelated signals as a case of the central limit theorem. The peak values increase proportional to the number of tones, but they also become increasingly rare.
-
Great, thanks acreil. I'll give that a try.
The tones are all either: sine, square, triangle, or square waves and only one type of wave at a time.