1 // VST3 example code for madronalib 2 // (c) 2020, Madrona Labs LLC, all rights reserved 3 // see LICENSE.txt for details 4 5 #pragma once 6 7 #include "public.sdk/source/vst/vsteditcontroller.h" 8 #include "public.sdk/source/vst/vstparameters.h" 9 #include "pluginterfaces/vst/ivstmidicontrollers.h" 10 #include "pluginterfaces/base/ustring.h" 11 12 #include "pluginProcessor.h" 13 14 namespace Steinberg { 15 namespace Vst { 16 namespace llllpluginnamellll { 17 18 //----------------------------------------------------------------------------- 19 class PluginController : public EditController 20 { 21 public: 22 // create function required for Plug-in factory, 23 // it will be called to create new instances of this controller createInstance(void *)24 static FUnknown* createInstance(void*) { return (IEditController*)new PluginController; } 25 static FUID uid; 26 27 PluginController(); 28 ~PluginController(); 29 30 // IPluginBase interface 31 tresult PLUGIN_API initialize(FUnknown* context) SMTG_OVERRIDE; 32 tresult PLUGIN_API terminate() SMTG_OVERRIDE; 33 34 // EditController interface 35 tresult PLUGIN_API setComponentState(IBStream* state) SMTG_OVERRIDE; 36 tresult PLUGIN_API notify(IMessage* message) SMTG_OVERRIDE; 37 38 DELEGATE_REFCOUNT(EditController) 39 40 // parameter IDs 41 enum 42 { 43 kGainId = 0, ///< for the gain value (is automatable) 44 kBypassId ///< Bypass value (we will handle the bypass process) (is automatable) 45 }; 46 }; 47 48 }}} // namespaces 49