Audio buffers audible levels/normalisation

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

First post :D

Hi all! I am new with plugin development and have been trying to transfer a MATLAB physical model to a prototype audio app/plugin using JUCE. I have managed to overcome some first technical issues but now my problem is the scale of the values into the audio buffer. Even in MATLAB, the first output attack samples are as small as ~1e-10 and then the sustain values reach up to ~1e-05 but there, it is easy to normalise the whole output vector after the total processing (or even just listen to the output with the soundsc command without normalising). With JUCE the only possible "solution" I have thought of is scaling every sample by an arbitrary constant factor but this does not produce any audible results either. Has anyone else faced any similar problems or maybe has something to suggest?

Post

You can add a gain stage, but there is no way to "normalize" the output fro,m a plugin. If your effect only gives out small values, then you have to do something about it in a sensible way. In the output range constant? Does it vary linearly with the input? ...?

Post

The easiest way to deal with this is to use the MATLAB code, and generate a lot of output using a variety of different model excitations, take the output signal and do something like:

Code: Select all

newMaximum = 0.99;
normaliseFactor = newMaximum/max(abs(outputSignal))
Given that your input sufficiently covers the range of operation of your model, this will give you a factor with which you can normalise by consistently (i.e. a gain factor for the output) without clipping.

Post

Miles1981 wrote:You can add a gain stage, but there is no way to "normalize" the output fro,m a plugin. If your effect only gives out small values, then you have to do something about it in a sensible way. In the output range constant? Does it vary linearly with the input? ...?
Not really, because it is a physical model and it only an initial burst of energy as an input..

Post

Still, you know the range of the input, so you can do something about the make up gain, or you can let the user decide.

Post Reply

Return to “DSP and Plugin Development”