Browse Source

Use quadratic scaling for level knob on Audio-2.

tags/v2.0.0
Andrew Belt 4 years ago
parent
commit
fe4de2efba
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/core/AudioInterface.cpp

+ 2
- 2
src/core/AudioInterface.cpp View File

@@ -55,7 +55,7 @@ struct AudioInterface : Module, audio::Port {
AudioInterface() {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
if (NUM_AUDIO_INPUTS == 2)
configParam(GAIN_PARAM, 0.f, 2.f, 1.f, "Level", " dB", -10, 20);
configParam(GAIN_PARAM, 0.f, 2.f, 1.f, "Level", " dB", -10, 40);
for (int i = 0; i < NUM_AUDIO_INPUTS; i++)
configInput(AUDIO_INPUTS + i, string::f("To device %d", i + 1));
for (int i = 0; i < NUM_AUDIO_OUTPUTS; i++)
@@ -105,7 +105,7 @@ struct AudioInterface : Module, audio::Port {

// Apply gain from knob
if (NUM_AUDIO_INPUTS == 2) {
float gain = params[GAIN_PARAM].getValue();
float gain = std::pow(params[GAIN_PARAM].getValue(), 2.f);
for (int i = 0; i < NUM_AUDIO_INPUTS; i++) {
inputFrame.samples[i] *= gain;
}


Loading…
Cancel
Save