Hello, Im starting to write VST plug-ins. The representation range is limited to +-1 float.
I read somewhere (dont remember where) that when summing two input signals, both should be scaled to prevent overflow, that is: y = 1/2*x1 + 1/2*x2
While this makes (preety much) sense to me, I wanted to know if Im understading it well. Is this the way most dsp codes are written? Because of all the examples I have seen, all of them are writen in the form y= x1 + x2
The inputs and outputs should be limited to ±1, but internal floats can be any value. So it's perfectly fine to sum together signals with ±1 amplitude as long as you keep the output below ±1.
The y = 1/2*x1 + 1/2*x2 equation is useful for converting stereo to mono, though. It ensures that if the amplitude of a mono input will be the same whether you convert it to mono in your plugin or not.
Excellent! Thank you very!