SmartGuitarAmp

Guitar plugin made with JUCE that uses neural networks to emulate a tube amplifier
Log | Files | Refs | Submodules | README

commit efe45970bd0ce1daf44272f772b5d976b1dfaa9c
parent b387dfe886cc33360a1c162fffeadeceec658d20
Author: Keith Bloemer <32459398+keyth72@users.noreply.github.com>
Date:   Wed, 14 Oct 2020 20:35:35 -0500

Merge pull request #9 from keyth72/feature-knob-state-saving

Fixed knob state save logic
Diffstat:
Mplugins/SmartAmp/Source/PluginEditor.cpp | 8++++++++
Mplugins/SmartAmp/Source/PluginProcessor.cpp | 10----------
2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/plugins/SmartAmp/Source/PluginEditor.cpp b/plugins/SmartAmp/Source/PluginEditor.cpp @@ -284,10 +284,18 @@ void WaveNetVaAudioProcessorEditor::sliderValueChanged(Slider* slider) else if (slider == &ampCleanBassKnob || slider == &ampCleanMidKnob || slider == &ampCleanTrebleKnob) { if (processor.amp_lead == 1) processor.set_ampEQ(ampCleanBassKnob.getValue(), ampCleanMidKnob.getValue(), ampCleanTrebleKnob.getValue(), ampPresenceKnob.getValue()); + // Set knob states for saving positions when closing/reopening GUI + processor.ampCleanBassKnobState = ampCleanBassKnob.getValue(); + processor.ampCleanMidKnobState = ampCleanMidKnob.getValue(); + processor.ampCleanTrebleKnobState = ampCleanTrebleKnob.getValue(); } else if (slider == &ampLeadBassKnob || slider == &ampLeadMidKnob || slider == &ampLeadTrebleKnob) { if (processor.amp_lead == 0) processor.set_ampEQ(ampLeadBassKnob.getValue(), ampLeadMidKnob.getValue(), ampLeadTrebleKnob.getValue(), ampPresenceKnob.getValue()); + // Set knob states for saving positions when closing/reopening GUI + processor.ampLeadBassKnobState = ampLeadBassKnob.getValue(); + processor.ampLeadMidKnobState = ampLeadMidKnob.getValue(); + processor.ampLeadTrebleKnobState = ampLeadTrebleKnob.getValue(); } else if (slider == &ampPresenceKnob) { if (processor.amp_lead == 1) diff --git a/plugins/SmartAmp/Source/PluginProcessor.cpp b/plugins/SmartAmp/Source/PluginProcessor.cpp @@ -261,16 +261,6 @@ void WaveNetVaAudioProcessor::set_ampEQ(float bass_slider, float mid_slider, flo { eq4band.setParameters(bass_slider, mid_slider, treble_slider, presence_slider); - // Set knob states for saving positions when closing/reopening GUI - if ( amp_lead == 1 ) { - ampCleanBassKnobState = bass_slider; - ampCleanMidKnobState = mid_slider; - ampCleanTrebleKnobState = treble_slider; - } else { - ampLeadBassKnobState = bass_slider; - ampLeadMidKnobState = mid_slider; - ampLeadTrebleKnobState = treble_slider; - } ampPresenceKnobState = presence_slider; }