NeuralAmpModelerPlugin

Plugin for Neural Amp Modeler
Log | Files | Refs | Submodules | README | LICENSE

commit 6432f52f6473cf57c80d15ccc25f4b95c738c64d
parent f661249db20aba8be8189fdc87eefdb3f34f3dc2
Author: Steven Atkinson <[email protected]>
Date:   Fri,  7 Apr 2023 18:25:38 -0700

Don't clip output in DAW. (#168)


Diffstat:
MNeuralAmpModeler/NeuralAmpModeler.cpp | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/NeuralAmpModeler/NeuralAmpModeler.cpp b/NeuralAmpModeler/NeuralAmpModeler.cpp @@ -873,7 +873,11 @@ void NeuralAmpModeler::_ProcessOutput(iplug::sample **inputs, const size_t cin = 0; for (auto cout = 0; cout < nChansOut; cout++) for (auto s = 0; s < nFrames; s++) +#ifdef APP_API // Ensure valid output to interface outputs[cout][s] = std::clamp(gain * inputs[cin][s], -1.0, 1.0); +#else // In a DAW, other things may come next and should be able to handle large values. + outputs[cout][s] = gain * inputs[cin][s]; +#endif } void NeuralAmpModeler::_SetModelMsg(const WDL_String &modelPath) {