Skip to content

Commit

Permalink
Update Common Average Reference
Browse files Browse the repository at this point in the history
  • Loading branch information
medengineer committed Jul 5, 2023
1 parent 58765a9 commit 934f084
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Plugins/CommonAverageRef/CommonAverageRef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ CommonAverageRef::CommonAverageRef()
"Channels to use as the reference");

addFloatParameter(Parameter::STREAM_SCOPE,
"gain_level",
"Gain",
"Multiplier for reference value",
"", //Unitless
100.0f,
Expand Down Expand Up @@ -111,7 +111,7 @@ void CommonAverageRef::process (AudioBuffer<float>& buffer)

settings_->m_avgBuffer.applyGain(1.0f / float(numReferenceChannels));

const float gain = -1.0f * float((*stream)["gain_level"]) / 100.f;
const float gain = -1.0f * float((*stream)["Gain"]) / 100.f;

for (int i = 0; i < numAffectedChannels; ++i)
{
Expand Down
9 changes: 6 additions & 3 deletions Plugins/CommonAverageRef/CommonAverageRefEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ CommonAverageRefEditor::CommonAverageRefEditor (GenericProcessor* parentProcesso

setDesiredWidth (205);

addSelectedChannelsParameterEditor(Parameter::STREAM_SCOPE, "Affected", 20, 45);
addSelectedChannelsParameterEditor(Parameter::STREAM_SCOPE, "Reference", 20, 85);
addSliderParameterEditor(Parameter::STREAM_SCOPE, "gain_level", 115, 45);
addSelectedChannelsParameterEditor(Parameter::STREAM_SCOPE, "Affected", 10, 20 + 15);
//getParameterEditor("Affected")->setLayout(ParameterEditor::Layout::nameOnTop);
addSelectedChannelsParameterEditor(Parameter::STREAM_SCOPE, "Reference", 10, 55 + 15);
//getParameterEditor("Reference")->setLayout(ParameterEditor::Layout::nameOnTop);
addSliderParameterEditor(Parameter::STREAM_SCOPE, "Gain", 10, 90 + 15);
//getParameterEditor("gain_level")->setLayout(ParameterEditor::Layout::nameOnTop);

}

0 comments on commit 934f084

Please sign in to comment.