gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

commit d34e04061d6658d6ad5da36152700e44090a727a
parent 57f04ea479fa7253958971be05c41e7ff39cb1d7
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Thu,  1 Aug 2024 20:20:46 +0200

create instances of arp/lcd/parts

Diffstat:
Msource/nord/n2x/n2xJucePlugin/n2xEditor.cpp | 21++++++++++++++++++++-
Msource/nord/n2x/n2xJucePlugin/n2xEditor.h | 8++++++++
2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/source/nord/n2x/n2xJucePlugin/n2xEditor.cpp b/source/nord/n2x/n2xJucePlugin/n2xEditor.cpp @@ -1,10 +1,14 @@ #include "n2xEditor.h" #include "BinaryData.h" -#include "n2xPluginProcessor.h" +#include "n2xArp.h" #include "n2xController.h" +#include "n2xLcd.h" +#include "n2xPart.h" +#include "n2xParts.h" #include "n2xPatchManager.h" +#include "n2xPluginProcessor.h" #include "jucePluginLib/parameterbinding.h" #include "jucePluginLib/pluginVersion.h" @@ -62,10 +66,17 @@ namespace n2xJucePlugin romSelector->setSelectedId(1); romSelector->setInterceptsMouseClicks(false, false); } + + m_arp.reset(new Arp(*this)); + m_lcd.reset(new Lcd(*this)); + m_parts.reset(new Parts(*this)); } Editor::~Editor() { + m_arp.reset(); + m_lcd.reset(); + m_parts.reset(); } const char* Editor::findEmbeddedResource(const std::string& _filename, uint32_t& _size) @@ -92,4 +103,12 @@ namespace n2xJucePlugin { return {}; } + + genericUI::Button<juce::DrawableButton>* Editor::createJuceComponent(genericUI::Button<juce::DrawableButton>* _button, genericUI::UiObject& _object, const std::string& _name, const juce::DrawableButton::ButtonStyle _buttonStyle) + { + if(_name == "PerfMidiChannelA" || _name == "PerfMidiChannelB" || _name == "PerfMidiChannelC" || _name == "PerfMidiChannelD") + return new Part(*this, _name, _buttonStyle); + + return jucePluginEditorLib::Editor::createJuceComponent(_button, _object, _name, _buttonStyle); + } } diff --git a/source/nord/n2x/n2xJucePlugin/n2xEditor.h b/source/nord/n2x/n2xJucePlugin/n2xEditor.h @@ -17,6 +17,9 @@ namespace n2xJucePlugin { class PatchManager; class Controller; + class Lcd; + class Arp; + class Parts; class Editor final : public jucePluginEditorLib::Editor { @@ -35,8 +38,13 @@ namespace n2xJucePlugin Controller& getN2xController() const { return m_controller; } + genericUI::Button<juce::DrawableButton>* createJuceComponent(genericUI::Button<juce::DrawableButton>*, genericUI::UiObject& _object, const std::string& _name, juce::DrawableButton::ButtonStyle) override; private: Controller& m_controller; pluginLib::ParameterBinding& m_parameterBinding; + + std::unique_ptr<Arp> m_arp; + std::unique_ptr<Lcd> m_lcd; + std::unique_ptr<Parts> m_parts; }; }