NeuralAmpModelerPlugin

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

commit c673b561f513f7ac4cb4633192a772868fea9700
parent 74b0acecde14ef8e16d2bbcd32fefdcb2bcba7ec
Author: Michl ImNetz <fichl@users.noreply.github.com>
Date:   Sun, 30 Apr 2023 07:44:43 +0200

Skin-only implementation of Evan Heritages design (#202)


Diffstat:
MNeuralAmpModeler/Colors.h | 9++++++++-
MNeuralAmpModeler/NeuralAmpModeler.cpp | 185+++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
MNeuralAmpModeler/NeuralAmpModeler.h | 1+
MNeuralAmpModeler/config.h | 12++++++++++--
ANeuralAmpModeler/resources/img/SkinEHeritage_ArrowLeft.svg | 10++++++++++
ANeuralAmpModeler/resources/img/SkinEHeritage_ArrowRight.svg | 10++++++++++
ANeuralAmpModeler/resources/img/SkinEHeritage_BG.jpeg | 0
ANeuralAmpModeler/resources/img/SkinEHeritage_BG@2x.jpeg | 0
ANeuralAmpModeler/resources/img/SkinEHeritage_Close-button.svg | 10++++++++++
ANeuralAmpModeler/resources/img/SkinEHeritage_File.svg | 8++++++++
ANeuralAmpModeler/resources/img/SkinEHeritage_Knob.png | 0
ANeuralAmpModeler/resources/img/SkinEHeritage_Knob@2x.png | 0
ANeuralAmpModeler/resources/img/SkinEHeritage_Toggle.png | 0
ANeuralAmpModeler/resources/img/SkinEHeritage_Toggle@2x.png | 0
MNeuralAmpModeler/resources/main.rc | 8++++++++
15 files changed, 180 insertions(+), 73 deletions(-)

diff --git a/NeuralAmpModeler/Colors.h b/NeuralAmpModeler/Colors.h @@ -66,9 +66,16 @@ const iplug::igraphics::IColor NAM_3(255, 162, 178, 191); // Cadet Blue Crayola // const iplug::igraphics::IColor NAM_3(255, 207, 220, 229); // Beau Blue // const iplug::igraphics::IColor NAM_3(255, 187, 199, 208); // Silver Sand +// Evan Heritage theme colors +const iplug::igraphics::IColor NAM_0(0, 18, 17, 19); // Transparent +const iplug::igraphics::IColor NAM_THEMECOLOR(255, 80, 133, 232); // Azure +const iplug::igraphics::IColor NAM_THEMEFONTCOLOR(255, 242, 242, 242); // Dark Ehite + // Misc -const iplug::igraphics::IColor MOUSEOVER = NAM_3.WithOpacity(0.3); +// const iplug::igraphics::IColor MOUSEOVER = NAM_3.WithOpacity(0.3); +const iplug::igraphics::IColor MOUSEOVER = NAM_THEMEFONTCOLOR.WithOpacity(0.1); const iplug::igraphics::IColor HELP_TEXT = iplug::igraphics::COLOR_WHITE; + }; // namespace PluginColors #endif /* Colors_h */ diff --git a/NeuralAmpModeler/NeuralAmpModeler.cpp b/NeuralAmpModeler/NeuralAmpModeler.cpp @@ -66,40 +66,41 @@ public: // Styles const IVColorSpec activeColorSpec{ DEFAULT_BGCOLOR, // Background - PluginColors::NAM_1, // Foreground - PluginColors::NAM_2.WithOpacity(0.4f), // Pressed - PluginColors::NAM_3, // Frame + PluginColors::NAM_THEMECOLOR, // Foreground + PluginColors::NAM_THEMECOLOR.WithOpacity(0.3f), // Pressed + PluginColors::NAM_THEMECOLOR.WithOpacity(0.4f), // Frame PluginColors::MOUSEOVER, // Highlight DEFAULT_SHCOLOR, // Shadow - PluginColors::NAM_2, // Extra 1 - COLOR_RED, // Extra 2 + PluginColors::NAM_THEMECOLOR, // Extra 1 + COLOR_RED, // Extra 2 --> color for clipping in meters DEFAULT_X3COLOR // Extra 3 }; const IVColorSpec inactiveColorSpec{ DEFAULT_BGCOLOR, // Background - PluginColors::NAM_1, //.WithOpacity(0.5f), // Foreground - PluginColors::NAM_1, // Pressed - PluginColors::NAM_3.WithOpacity(0.5f), // Frame - PluginColors::NAM_1, // Highlight + PluginColors::NAM_THEMEFONTCOLOR.WithOpacity(0.3f), // Foreground + PluginColors::NAM_THEMECOLOR.WithOpacity(0.3f), // Pressed + PluginColors::NAM_0, // Frame + PluginColors::NAM_0, // Highlight DEFAULT_SHCOLOR.WithOpacity(0.5f), // Shadow - PluginColors::NAM_2.WithOpacity(0.5f), // Extra 1 + PluginColors::NAM_THEMECOLOR.WithOpacity(0.5f), // Extra 1 COLOR_RED.WithOpacity(0.5f), // Extra 2 DEFAULT_X3COLOR.WithOpacity(0.5f) // Extra 3 }; -const IVStyle style = IVStyle{true, // Show label - true, // Show value - activeColorSpec, - {DEFAULT_TEXT_SIZE + 5.f, EVAlign::Middle, PluginColors::NAM_3}, // Knob label text - {DEFAULT_TEXT_SIZE + 5.f, EVAlign::Bottom, PluginColors::NAM_3}, // Knob value text - DEFAULT_HIDE_CURSOR, - DEFAULT_DRAW_FRAME, - false, - DEFAULT_EMBOSS, - 0.2f, - 2.f, - DEFAULT_SHADOW_OFFSET, - DEFAULT_WIDGET_FRAC, - DEFAULT_WIDGET_ANGLE}; +const IVStyle style = + IVStyle{true, // Show label + true, // Show value + activeColorSpec, + {DEFAULT_TEXT_SIZE + 3.f, EVAlign::Middle, PluginColors::NAM_THEMEFONTCOLOR}, // Knob label text5 + {DEFAULT_TEXT_SIZE + 3.f, EVAlign::Bottom, PluginColors::NAM_THEMEFONTCOLOR}, // Knob value text + DEFAULT_HIDE_CURSOR, + DEFAULT_DRAW_FRAME, + false, + DEFAULT_EMBOSS, + 0.2f, + 2.f, + DEFAULT_SHADOW_OFFSET, + DEFAULT_WIDGET_FRAC, + DEFAULT_WIDGET_ANGLE}; const IVStyle styleInactive = style.WithColors(inactiveColorSpec); NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info) @@ -156,6 +157,10 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info) auto helpSVG = pGraphics->LoadSVG(HELP_FN); auto fileSVG = pGraphics->LoadSVG(FILE_FN); auto closeButtonSVG = pGraphics->LoadSVG(CLOSE_BUTTON_FN); + auto rightArrowSVG = pGraphics->LoadSVG(RIGHT_ARROW_FN); + auto leftArrowSVG = pGraphics->LoadSVG(LEFT_ARROW_FN); + const IBitmap switchBitmap = pGraphics->LoadBitmap((TOGGLE_FN), 2, true); + const IBitmap knobRotateBitmap = pGraphics->LoadBitmap(KNOB_FN); pGraphics->LoadFont("Roboto-Regular", ROBOTO_FN); const IRECT b = pGraphics->GetBounds(); const IRECT mainArea = b.GetPadded(-20); @@ -171,13 +176,13 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info) const float knobsExtraSpaceBelowTitle = 25.0f; const float knobHalfHeight = 70.0f; const float knobHeight = 2.0f * knobHalfHeight; - const float singleKnobPad = 10.0f; + const float singleKnobPad = 12.0f; const auto knobs = content.GetFromTop(knobHeight) .GetReducedFromLeft(allKnobsPad) .GetReducedFromRight(allKnobsPad) .GetTranslated(0.0f, titleHeight + knobsExtraSpaceBelowTitle); const IRECT inputKnobArea = knobs.GetGridCell(0, kInputLevel, 1, numKnobs).GetPadded(-singleKnobPad); - const IRECT noiseGateArea = knobs.GetGridCell(0, kNoiseGateThreshold, 1, numKnobs).GetPadded(-10); + const IRECT noiseGateArea = knobs.GetGridCell(0, kNoiseGateThreshold, 1, numKnobs).GetPadded(-singleKnobPad); const IRECT bassKnobArea = knobs.GetGridCell(0, kToneBass, 1, numKnobs).GetPadded(-singleKnobPad); const IRECT middleKnobArea = knobs.GetGridCell(0, kToneMid, 1, numKnobs).GetPadded(-singleKnobPad); const IRECT trebleKnobArea = knobs.GetGridCell(0, kToneTreble, 1, numKnobs).GetPadded(-singleKnobPad); @@ -188,14 +193,14 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info) const float ngAreaHeight = toggleHeight; const float ngAreaHalfWidth = 0.5f * noiseGateArea.W(); const IRECT ngToggleArea = noiseGateArea.GetFromBottom(ngAreaHeight) - .GetTranslated(0.0f, ngAreaHeight + singleKnobPad) + .GetTranslated(0.0f, ngAreaHeight + singleKnobPad - 14.f) .GetMidHPadded(ngAreaHalfWidth); // Area for EQ toggle const float eqAreaHeight = toggleHeight; const float eqAreaHalfWidth = 0.5f * middleKnobArea.W(); const IRECT eqToggleArea = middleKnobArea.GetFromBottom(eqAreaHeight) - .GetTranslated(0.0f, eqAreaHeight + singleKnobPad) + .GetTranslated(0.0f, eqAreaHeight + singleKnobPad - 14.f) .GetMidHPadded(eqAreaHalfWidth); // Area for output normalization toggle @@ -206,33 +211,38 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info) .GetMidHPadded(outNormAreaHalfWidth); // Areas for model and IR - const float fileWidth = 250.0f; + const float fileWidth = 200.0f; const float fileHeight = 30.0f; const float fileSpace = 10.0f; const IRECT modelArea = content.GetFromBottom(2.0f * fileHeight + fileSpace).GetFromTop(fileHeight).GetMidHPadded(fileWidth); - const IRECT irArea = content.GetFromBottom(fileHeight).GetMidHPadded(fileWidth); + const IRECT irArea = content.GetFromBottom(fileHeight + 2.f).GetMidHPadded(fileWidth); // Areas for meters - const float meterHalfHeight = 0.5f * 250.0f; + const float meterHalfHeight = 0.5f * 385.0f; const IRECT inputMeterArea = inputKnobArea.GetFromLeft(allKnobsHalfPad) .GetMidHPadded(allKnobsHalfPad) .GetMidVPadded(meterHalfHeight) - .GetTranslated(-allKnobsPad, 0.0f); + .GetTranslated(-allKnobsPad - 18.f, 0.0f); const IRECT outputMeterArea = outputKnobArea.GetFromRight(allKnobsHalfPad) .GetMidHPadded(allKnobsHalfPad) .GetMidVPadded(meterHalfHeight) - .GetTranslated(allKnobsPad, 0.0f); + .GetTranslated(allKnobsPad + 18.f, 0.0f); // auto tolexPNG = pGraphics->LoadBitmap(TOLEX_FN); // pGraphics->AttachControl(new IBitmapControl(pGraphics->GetBounds(), // tolexPNG, kNoParameter))->SetBlend(IBlend(EBlend::Default, 0.5)); // The background inside the outermost border - pGraphics->AttachControl( - new IVPanelControl(mainArea, "", style.WithColor(kFG, PluginColors::NAM_1))); // .WithContrast(-0.75) - pGraphics->AttachControl( - new IVLabelControl(titleLabel, "Neural Amp Modeler", - style.WithDrawFrame(false).WithValueText({30, EAlign::Center, PluginColors::NAM_3}))); + // pGraphics->AttachControl( + // new IVPanelControl(mainArea, "", style.WithColor(kFG, PluginColors::NAM_1))); // .WithContrast(-0.75) + // pGraphics->AttachControl( + // new IVLabelControl(titleLabel, "Neural Amp Modeler", + // style.WithDrawFrame(false).WithValueText({30, EAlign::Center, + // PluginColors::NAM_THEMEFONTCOLOR}))); + + auto themeBG = pGraphics->LoadBitmap(EH_SKIN_FN); + pGraphics->AttachControl(new IBitmapControl(pGraphics->GetBounds(), themeBG, kNoParameter)) + ->SetBlend(IBlend(EBlend::Default, 1.0)); // Model loader button auto loadNAM = [&, pGraphics](IControl* pCaller) { @@ -315,52 +325,67 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info) // Graphics objects for what NAM is loaded const float iconWidth = fileHeight; // Square icon - pGraphics->AttachControl(new IVPanelControl(modelArea, "", style.WithColor(kFG, PluginColors::NAM_1))); pGraphics->AttachControl( - new IRolloverSVGButtonControl(modelArea.GetFromLeft(iconWidth).GetPadded(-2.f), loadNAM, fileSVG)); + new IVPanelControl(modelArea, "", style.WithDrawFrame(false).WithColor(kFG, PluginColors::NAM_0))); + pGraphics->AttachControl(new IRolloverSVGButtonControl( + modelArea.GetFromLeft(iconWidth).GetPadded(-6.f).GetTranslated(-1.f, 1.f), loadNAM, fileSVG)); pGraphics->AttachControl( - new IRolloverSVGButtonControl(modelArea.GetFromRight(iconWidth).GetPadded(-2.f), ClearNAM, closeButtonSVG)); + new IRolloverSVGButtonControl(modelArea.GetFromRight(iconWidth).GetPadded(-8.f), ClearNAM, closeButtonSVG)); pGraphics->AttachControl( new IVUpdateableLabelControl( modelArea.GetReducedFromLeft(iconWidth).GetReducedFromRight(iconWidth), this->mDefaultNAMString.Get(), - style.WithDrawFrame(false).WithValueText(style.valueText.WithVAlign(EVAlign::Middle))), + style.WithDrawFrame(false).WithValueText(style.valueText.WithSize(16.f).WithVAlign(EVAlign::Middle))), kCtrlTagModelName); // IR - pGraphics->AttachControl(new IVPanelControl(irArea, "", style.WithColor(kFG, PluginColors::NAM_1))); pGraphics->AttachControl( - new IRolloverSVGButtonControl(irArea.GetFromLeft(iconWidth).GetPadded(-2.f), loadIR, fileSVG)); + new IVPanelControl(irArea, "", style.WithDrawFrame(false).WithColor(kFG, PluginColors::NAM_0))); + pGraphics->AttachControl(new IRolloverSVGButtonControl( + irArea.GetFromLeft(iconWidth).GetPadded(-6.f).GetTranslated(-1.f, 1.f), loadIR, fileSVG)); pGraphics->AttachControl( - new IRolloverSVGButtonControl(irArea.GetFromRight(iconWidth).GetPadded(-2.f), ClearIR, closeButtonSVG)); + new IRolloverSVGButtonControl(irArea.GetFromRight(iconWidth).GetPadded(-8.f), ClearIR, closeButtonSVG)); pGraphics->AttachControl( new IVUpdateableLabelControl( irArea.GetReducedFromLeft(iconWidth).GetReducedFromRight(iconWidth), this->mDefaultIRString.Get(), - style.WithDrawFrame(false).WithValueText(style.valueText.WithVAlign(EVAlign::Middle))), + style.WithDrawFrame(false).WithValueText(style.valueText.WithSize(16.f).WithVAlign(EVAlign::Middle))), kCtrlTagIRName); // NG toggle - IVSlideSwitchControl* noiseGateSlider = new IVSlideSwitchControl(ngToggleArea, kNoiseGateActive, "Gate", style, - true, // valueInButton - EDirection::Horizontal); + // underlaying background in theme color for ON state + pGraphics->AttachControl( + new IVPanelControl(ngToggleArea.GetPadded(-12.f).GetTranslated(2.f, 10.0f), "", + style.WithDrawFrame(false).WithColor(kFG, PluginColors::NAM_THEMECOLOR.WithOpacity(0.9f)))); + IBSwitchControl* noiseGateSlider = + new IBSwitchControl(ngToggleArea.GetFromTop(60.f).GetPadded(-20.f), switchBitmap, kNoiseGateActive); pGraphics->AttachControl(noiseGateSlider); // Tone stack toggle - IVSlideSwitchControl* toneStackSlider = new IVSlideSwitchControl(eqToggleArea, kEQActive, "EQ", style, - true, // valueInButton - EDirection::Horizontal); + pGraphics->AttachControl( + new IVPanelControl(eqToggleArea.GetPadded(-12.f).GetTranslated(2.f, 10.0f), "", + style.WithDrawFrame(false).WithColor(kFG, PluginColors::NAM_THEMECOLOR.WithOpacity(0.9f)))); + IBSwitchControl* toneStackSlider = + new IBSwitchControl(eqToggleArea.GetFromTop(60.f).GetPadded(-20.f), switchBitmap, kEQActive); pGraphics->AttachControl(toneStackSlider); - // NG toggle - IVSlideSwitchControl* outputNormSlider = new IVSlideSwitchControl(outNormToggleArea, kOutNorm, "Normalize", style, - true, // valueInButton - EDirection::Horizontal); + + // Normalisation toggle + pGraphics->AttachControl( + new IVPanelControl(outNormToggleArea.GetPadded(-12.f).GetTranslated(2.0f, -4.0f), "", style.WithDrawFrame(false)), + kOutNormPanel); + IBSwitchControl* outputNormSlider = + new IBSwitchControl(outNormToggleArea.GetFromTop(32.f).GetPadded(-20.f), switchBitmap, kOutNorm); pGraphics->AttachControl(outputNormSlider, kOutNorm); + pGraphics->AttachControl(new ITextControl(outNormToggleArea.GetFromTop(70.f), "Normalize", style.labelText)); // The knobs // Input pGraphics->AttachControl(new IVKnobControl(inputKnobArea, kInputLevel, "", style)); + pGraphics->AttachControl( + new IBKnobRotaterControl(inputKnobArea, knobRotateBitmap, kInputLevel), kNoTag, "kInputLevel"); // Noise gate const bool noiseGateIsActive = this->GetParam(kNoiseGateActive)->Value(); const IVStyle noiseGateInitialStyle = noiseGateIsActive ? style : styleInactive; IVKnobControl* noiseGateControl = new IVKnobControl(noiseGateArea, kNoiseGateThreshold, "", noiseGateInitialStyle); pGraphics->AttachControl(noiseGateControl); + pGraphics->AttachControl( + new IBKnobRotaterControl(noiseGateArea, knobRotateBitmap, kNoiseGateThreshold), kNoTag, "kNoiseGateThreshold"); // Tone stack const bool toneStackIsActive = this->GetParam(kEQActive)->Value(); const IVStyle toneStackInitialStyle = toneStackIsActive ? style : styleInactive; @@ -370,8 +395,14 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info) pGraphics->AttachControl(bassControl); pGraphics->AttachControl(middleControl); pGraphics->AttachControl(trebleControl); + pGraphics->AttachControl(new IBKnobRotaterControl(bassKnobArea, knobRotateBitmap, kToneBass), kNoTag, "kToneBass"); + pGraphics->AttachControl(new IBKnobRotaterControl(middleKnobArea, knobRotateBitmap, kToneMid), kNoTag, "kToneMid"); + pGraphics->AttachControl( + new IBKnobRotaterControl(trebleKnobArea, knobRotateBitmap, kToneTreble), kNoTag, "kToneTreble"); // Output pGraphics->AttachControl(new IVKnobControl(outputKnobArea, kOutputLevel, "", style)); + pGraphics->AttachControl( + new IBKnobRotaterControl(outputKnobArea, knobRotateBitmap, kOutputLevel), kNoTag, "kOutputLevel"); // Extend the noise gate action function to set the style of its knob auto setNoiseGateKnobStyles = [&, pGraphics, noiseGateControl](IControl* pCaller) { @@ -381,8 +412,9 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info) noiseGateControl->SetDirty(false); }; auto defaultNoiseGateSliderAction = noiseGateSlider->GetActionFunction(); - auto noiseGateAction = [defaultNoiseGateSliderAction, setNoiseGateKnobStyles](IControl* pCaller) { - defaultNoiseGateSliderAction(pCaller); + // hacky attempt to fix IBSwitchControl action function + auto noiseGateAction = [/* defaultNoiseGateSliderAction, */ setNoiseGateKnobStyles](IControl* pCaller) { + // defaultNoiseGateSliderAction(pCaller); setNoiseGateKnobStyles(pCaller); }; noiseGateSlider->SetActionFunction(noiseGateAction); @@ -399,8 +431,9 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info) trebleControl->SetDirty(false); }; auto defaultToneStackSliderAction = toneStackSlider->GetActionFunction(); - auto toneStackAction = [defaultToneStackSliderAction, setToneStackKnobStyles](IControl* pCaller) { - defaultToneStackSliderAction(pCaller); + // hacky attempt to fix IBSwitchControl action function + auto toneStackAction = [/* defaultToneStackSliderAction, */ setToneStackKnobStyles](IControl* pCaller) { + // defaultToneStackSliderAction(pCaller); setToneStackKnobStyles(pCaller); }; toneStackSlider->SetActionFunction(toneStackAction); @@ -411,7 +444,8 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info) pGraphics ->AttachControl( new IVPeakAvgMeterControl(inputMeterArea, "", - style.WithWidgetFrac(0.5).WithShowValue(false).WithColor(kFG, PluginColors::NAM_2), + style.WithWidgetFrac(0.5).WithShowValue(false).WithDrawFrame(false).WithColor( + kFG, PluginColors::NAM_THEMECOLOR.WithOpacity(0.4f)), EDirection::Vertical, {}, 0, meterMin, meterMax, {}), kCtrlTagInputMeter) ->As<IVPeakAvgMeterControl<>>() @@ -419,7 +453,8 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info) pGraphics ->AttachControl( new IVPeakAvgMeterControl(outputMeterArea, "", - style.WithWidgetFrac(0.5).WithShowValue(false).WithColor(kFG, PluginColors::NAM_2), + style.WithWidgetFrac(0.5).WithShowValue(false).WithDrawFrame(false).WithColor( + kFG, PluginColors::NAM_THEMECOLOR.WithOpacity(0.4f)), EDirection::Vertical, {}, 0, meterMin, meterMax, {}), kCtrlTagOutputMeter) ->As<IVPeakAvgMeterControl<>>() @@ -440,12 +475,13 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info) // AttachFunc [](IContainerBase* pParent, const IRECT& r) { pParent->AddChildControl(new IPanelControl( - IRECT(), IPattern::CreateLinearGradient( - r, EDirection::Vertical, {{PluginColors::NAM_3, 0.f}, {PluginColors::NAM_1, 1.f}}))); + IRECT(), + IPattern::CreateLinearGradient( + r, EDirection::Vertical, {{PluginColors::NAM_THEMEFONTCOLOR, 0.f}, {PluginColors::NAM_0, 1.f}}))); pParent->AddChildControl(new IVPanelControl(IRECT(), "", - style.WithColor(kFR, PluginColors::NAM_3.WithOpacity(0.1f)) - .WithColor(kFG, PluginColors::NAM_1.WithOpacity(0.1f)))); + style.WithColor(kFR, PluginColors::NAM_1.WithOpacity(0.9f)) + .WithColor(kFG, PluginColors::NAM_1.WithOpacity(0.9f)))); pParent->AddChildControl(new IVLabelControl( IRECT(), "Neural Amp Modeler", @@ -864,11 +900,11 @@ void NeuralAmpModeler::_SetModelMsg(const WDL_String& modelPath) { auto dspPath = std::filesystem::path(modelPath.Get()); std::stringstream ss; - ss << "Loaded "; + // ss << "Loaded "; if (dspPath.has_filename()) - ss << dspPath.filename().stem(); // /path/to/model.nam -> "model" + ss << dspPath.filename().stem().string(); // /path/to/model.nam -> model else - ss << dspPath.parent_path().filename(); // /path/to/model/ -> "model" + ss << dspPath.parent_path().filename().string(); // /path/to/model.nam -> model SendControlMsgFromDelegate(kCtrlTagModelName, 0, int(strlen(ss.str().c_str())), ss.str().c_str()); } @@ -877,7 +913,8 @@ void NeuralAmpModeler::_SetIRMsg(const WDL_String& irPath) this->mIRPath = irPath; // This might already be done elsewhere...need to dedup. auto dspPath = std::filesystem::path(irPath.Get()); std::stringstream ss; - ss << "Loaded " << dspPath.filename().stem(); + // ss << "Loaded " << dspPath.filename().stem(); + ss << dspPath.filename().stem().string(); // /path/to/ir.wav -> ir; SendControlMsgFromDelegate(kCtrlTagIRName, 0, int(strlen(ss.str().c_str())), ss.str().c_str()); } @@ -893,6 +930,14 @@ bool NeuralAmpModeler::_SetOutputNormalizationDisableState(const bool disable) c->SetDisabled(disable); success = c->IsDisabled() == disable; } + // also hide the themecolored panel behind the toggle for the ON-stae + auto p = ui->GetControlWithTag(kOutNormPanel); + if (p != nullptr) + { + const IVStyle normtoggleStyle = + c->IsDisabled() ? style.WithColor(kFG, PluginColors::NAM_0).WithColor(kFR, PluginColors::NAM_0) : style; + p->As<IVectorBase>()->SetStyle(normtoggleStyle); + } } return success; } diff --git a/NeuralAmpModeler/NeuralAmpModeler.h b/NeuralAmpModeler/NeuralAmpModeler.h @@ -26,6 +26,7 @@ enum EParams kNoiseGateActive, kEQActive, kOutNorm, + kOutNormPanel, kNumParams }; diff --git a/NeuralAmpModeler/config.h b/NeuralAmpModeler/config.h @@ -56,8 +56,16 @@ #define ROBOTO_FN "Roboto-Regular.ttf" #define HELP_FN "help.svg" -#define FILE_FN "file.svg" +#define FILE_FN "SkinEHeritage_File.svg" #define FOLDER_FN "folder.svg" -#define CLOSE_BUTTON_FN "close-button.svg" +#define CLOSE_BUTTON_FN "SkinEHeritage_Close-button.svg" #define TOLEX_FN "tolex.jpeg" #define TOLEX2X_FN "tolex@2x.jpeg" +#define LEFT_ARROW_FN "SkinEHeritage_ArrowLeft.svg" +#define RIGHT_ARROW_FN "SkinEHeritage_ArrowRight.svg" +#define EH_SKIN_FN "SkinEHeritage_BG.jpeg" +#define EH_SKIN2X_FN "SkinEHeritage_BG@2x.jpeg" +#define KNOB_FN "SkinEHeritage_Knob.png" +#define KNOB2X_FN "SkinEHeritage_Knob@2x.png" +#define TOGGLE_FN "SkinEHeritage_Toggle.png" +#define TOGGLE2X_FN "SkinEHeritage_Toggle@2x.png" diff --git a/NeuralAmpModeler/resources/img/SkinEHeritage_ArrowLeft.svg b/NeuralAmpModeler/resources/img/SkinEHeritage_ArrowLeft.svg @@ -0,0 +1,9 @@ +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools --> +<svg width="800px" height="800px" viewBox="0 0 1024 1024" class="icon" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="#000000"> +<g id="SVGRepo_bgCarrier" stroke-width="0"/> +<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"/> +<g id="SVGRepo_iconCarrier"> +<path d="M768 903.232l-50.432 56.768L256 512l461.568-448 50.432 56.768L364.928 512z" fill="#999999"/> +</g> +</svg> +\ No newline at end of file diff --git a/NeuralAmpModeler/resources/img/SkinEHeritage_ArrowRight.svg b/NeuralAmpModeler/resources/img/SkinEHeritage_ArrowRight.svg @@ -0,0 +1,9 @@ +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools --> +<svg width="800px" height="800px" viewBox="0 0 1024 1024" class="icon" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="#000000"> +<g id="SVGRepo_bgCarrier" stroke-width="0"/> +<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"/> +<g id="SVGRepo_iconCarrier"> +<path d="M256 120.768L306.432 64 768 512l-461.568 448L256 903.232 659.072 512z" fill="#999999"/> +</g> +</svg> +\ No newline at end of file diff --git a/NeuralAmpModeler/resources/img/SkinEHeritage_BG.jpeg b/NeuralAmpModeler/resources/img/SkinEHeritage_BG.jpeg Binary files differ. diff --git a/NeuralAmpModeler/resources/img/SkinEHeritage_BG@2x.jpeg b/NeuralAmpModeler/resources/img/SkinEHeritage_BG@2x.jpeg Binary files differ. diff --git a/NeuralAmpModeler/resources/img/SkinEHeritage_Close-button.svg b/NeuralAmpModeler/resources/img/SkinEHeritage_Close-button.svg @@ -0,0 +1,9 @@ +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools --> +<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g id="SVGRepo_bgCarrier" stroke-width="0"/> +<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"/> +<g id="SVGRepo_iconCarrier"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z" fill="#999999"/> +</g> +</svg> +\ No newline at end of file diff --git a/NeuralAmpModeler/resources/img/SkinEHeritage_File.svg b/NeuralAmpModeler/resources/img/SkinEHeritage_File.svg @@ -0,0 +1,7 @@ +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools --> +<svg width="800px" height="800px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000"> +<g id="SVGRepo_bgCarrier" stroke-width="0"/> +<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"/> +<g id="SVGRepo_iconCarrier"> <title>Folder</title> <g id="Page-1" stroke-width="1.296" fill="none" fill-rule="evenodd"> <g id="Folder"> <rect id="Rectangle" fill-rule="nonzero" x="0" y="0" width="24" height="24"> </rect> <path d="M3,7 L20,7 C20.5523,7 21,7.44772 21,8 L21,19 C21,19.5523 20.5523,20 20,20 L4,20 C3.44772,20 3,19.5523 3,19 L3,7 Z" id="Path" stroke="#999999" stroke-width="1.296" stroke-linecap="round"> </path> <path d="M3,4.5 C3,4.22386 3.22386,4 3.5,4 L9.79289,4 C9.9255,4 10.0527,4.05268 10.1464,4.14645 L13,7 L3,7 L3,4.5 Z" id="Path" stroke="#999999" stroke-width="1.296" stroke-linecap="round"> </path> </g> </g> </g> +</svg> +\ No newline at end of file diff --git a/NeuralAmpModeler/resources/img/SkinEHeritage_Knob.png b/NeuralAmpModeler/resources/img/SkinEHeritage_Knob.png Binary files differ. diff --git a/NeuralAmpModeler/resources/img/SkinEHeritage_Knob@2x.png b/NeuralAmpModeler/resources/img/SkinEHeritage_Knob@2x.png Binary files differ. diff --git a/NeuralAmpModeler/resources/img/SkinEHeritage_Toggle.png b/NeuralAmpModeler/resources/img/SkinEHeritage_Toggle.png Binary files differ. diff --git a/NeuralAmpModeler/resources/img/SkinEHeritage_Toggle@2x.png b/NeuralAmpModeler/resources/img/SkinEHeritage_Toggle@2x.png Binary files differ. diff --git a/NeuralAmpModeler/resources/main.rc b/NeuralAmpModeler/resources/main.rc @@ -236,6 +236,14 @@ FILE_FN SVG FILE_FN FOLDER_FN SVG FOLDER_FN CLOSE_BUTTON_FN SVG CLOSE_BUTTON_FN HELP_FN SVG HELP_FN +LEFT_ARROW_FN SVG LEFT_ARROW_FN +RIGHT_ARROW_FN SVG RIGHT_ARROW_FN +EH_SKIN_FN JPEG EH_SKIN_FN +EH_SKIN2X_FN JPEG EH_SKIN2X_FN +KNOB_FN PNG KNOB_FN +KNOB2X_FN PNG KNOB2X_FN +TOGGLE_FN PNG TOGGLE_FN +TOGGLE2X_FN PNG TOGGLE2X_FN ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED