Skip to content

Commit

Permalink
Fix incorrect scaling with level knobs (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdatkinson authored Jan 29, 2023
1 parent d1b1b93 commit 15279d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions NeuralAmpModeler/NeuralAmpModeler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
GetParam(kToneBass)->InitDouble("Bass", 5.0, 0.0, 10.0, 0.1);
GetParam(kToneMid)->InitDouble("Middle", 5.0, 0.0, 10.0, 0.1);
GetParam(kToneTreble)->InitDouble("Treble", 5.0, 0.0, 10.0, 0.1);
GetParam(kOutputLevel)->InitGain("Output", 0.0, -20.0, 20.0, 0.1);
GetParam(kOutputLevel)->InitGain("Output", 0.0, -40.0, 40.0, 0.1);

// try {
// this->mDSP = get_hard_dsp();
Expand Down Expand Up @@ -565,7 +565,7 @@ void NeuralAmpModeler::_PrepareIOPointers(const size_t nChans)

void NeuralAmpModeler::_ProcessInput(iplug::sample **inputs, const int nFrames)
{
const double gain = pow(10.0, GetParam(kInputLevel)->Value() / 10.0);
const double gain = pow(10.0, GetParam(kInputLevel)->Value() / 20.0);
const size_t nChans = this->NOutChansConnected();
// Assume _PrepareBuffers() was already called
for (int c=0; c<nChans; c++)
Expand All @@ -575,7 +575,7 @@ void NeuralAmpModeler::_ProcessInput(iplug::sample **inputs, const int nFrames)

void NeuralAmpModeler::_ProcessOutput(iplug::sample** inputs, iplug::sample **outputs, const int nFrames)
{
const double gain = pow(10.0, GetParam(kOutputLevel)->Value() / 10.0);
const double gain = pow(10.0, GetParam(kOutputLevel)->Value() / 20.0);
const size_t nChans = this->NOutChansConnected();
// Assume _PrepareBuffers() was already called
for (int c=0; c<nChans; c++)
Expand Down

0 comments on commit 15279d9

Please sign in to comment.