ASPiK SDK
plugincore.h
1 // -----------------------------------------------------------------------------
2 // ASPiK Plugin Kernel File: plugincore.h
3 //
12 // -----------------------------------------------------------------------------
13 #ifndef __pluginCore_h__
14 #define __pluginCore_h__
15 
16 #include "pluginbase.h"
17 
18 // **--0x7F1F--**
19 enum controlID {
20  customKnob = 0,
21  Switcher = 1,
22  leftVolume_dB = 2,
23  rightVolume_dB = 3,
24  enableLink = 4,
25  WaveView = 5
26 };
27 
28 
29 // **--0x0F1F--**
30 
51 class PluginCore : public PluginBase
52 {
53 public:
54  PluginCore();
55 
57  virtual ~PluginCore(){}
58 
59  // --- PluginBase Overrides ---
60  //
62  bool initPluginParameters();
63 
65  virtual bool reset(ResetInfo& resetInfo);
66 
68  virtual bool initialize(PluginInfo& _pluginInfo);
69 
70  // --- preProcess: sync GUI parameters here; override if you don't want to use automatic variable-binding
71  virtual bool preProcessAudioBuffers(ProcessBufferInfo& processInfo);
72 
74  virtual bool processAudioFrame(ProcessFrameInfo& processFrameInfo);
75 
76  // --- uncomment and override this for buffer processing; see base class implementation for
77  // help on breaking up buffers and getting info from processBufferInfo
78  //virtual bool processAudioBuffers(ProcessBufferInfo& processBufferInfo);
79 
81  virtual bool postProcessAudioBuffers(ProcessBufferInfo& processInfo);
82 
84  virtual bool updatePluginParameter(int32_t controlID, double controlValue, ParameterUpdateInfo& paramInfo);
85 
87  virtual bool updatePluginParameterNormalized(int32_t controlID, double normalizedValue, ParameterUpdateInfo& paramInfo);
88 
90  virtual bool postUpdatePluginParameter(int32_t controlID, double controlValue, ParameterUpdateInfo& paramInfo);
91 
93  virtual bool guiParameterChanged(int32_t controlID, double actualValue);
94 
96  virtual bool processMessage(MessageInfo& messageInfo);
97 
99  virtual bool processMIDIEvent(midiEvent& event);
100 
102  virtual bool setVectorJoystickParameters(const VectorJoystickData& vectorJoysickData);
103 
105  bool initPluginPresets();
106 
107  // --- BEGIN USER VARIABLES AND FUNCTIONS -------------------------------------- //
108  // Add your variables and methods here // --- Continuous Plugin Variables
109  double customKnob = 0.0;
110  double leftVolume_dB = 0.0;
111  double rightVolume_dB = 0.0;
112 
113  // --- Discrete Plugin Variables
114  int enableLink = 0;
115  enum class enableLinkEnum { SWITCH_OFF,SWITCH_ON }; // to compare: if(compareEnumToInt(enableLinkEnum::SWITCH_OFF, enableLink)) etc...
116 
117  // --- Non-GUI-bound User Plugin Variables
118  float Switcher = 0.f;
119  float WaveView = 0.f;
120 
121  ICustomView* waveView = nullptr;
122  ICustomView* spectrumView = nullptr;
123  ICustomView* knobView = nullptr;
124 
125  // --- lock free ring buffer
126  moodycamel::ReaderWriterQueue<float, 512> customViewDataQueue;
127 
128 
129  // --- END USER VARIABLES AND FUNCTIONS -------------------------------------- //
130 
131 private:
132  // **--0x07FD--**
133 
134  // **--0x1A7F--**
135  // --- end member variables
136 
137 public:
142  static const char* getPluginBundleName();
143 
148  static const char* getPluginName();
149 
154  static const char* getShortPluginName();
155 
160  static const char* getVendorName();
161 
166  static const char* getVendorURL();
167 
172  static const char* getVendorEmail();
173 
178  static const char* getAUCocoaViewFactoryName();
179 
184  static pluginType getPluginType();
185 
190  static const char* getVSTFUID();
191 
196  static int32_t getFourCharCode();
197 
199  bool initPluginDescriptors();
200 
201 };
202 
203 
204 
205 
206 #endif /* defined(__pluginCore_h__) */
Information that includes the message code as well as the message data.
Definition: pluginstructures.h:705
static const char * getShortPluginName()
Definition: plugincore.cpp:499
bool initPluginDescriptors()
setup the plugin description strings, flags and codes; this is ordinarily done through the ASPiKreato...
Definition: plugincore.cpp:460
static int32_t getFourCharCode()
Definition: plugincore.cpp:506
Information package that arrives with each new audio frame; called internally from the buffer process...
Definition: pluginstructures.h:1110
static const char * getAUCocoaViewFactoryName()
Definition: plugincore.cpp:503
bool initPluginPresets()
use this method to add new presets to the list
Definition: plugincore.cpp:446
virtual bool processMIDIEvent(midiEvent &event)
process a MIDI event
Definition: plugincore.cpp:415
virtual bool setVectorJoystickParameters(const VectorJoystickData &vectorJoysickData)
(for future use)
Definition: plugincore.cpp:431
virtual bool processAudioFrame(ProcessFrameInfo &processFrameInfo)
frame-processing method
Definition: plugincore.cpp:152
The PluginBase object is the base class for the Plugin Core object.
Definition: pluginbase.h:221
virtual bool processMessage(MessageInfo &messageInfo)
For Custom View and Custom Sub-Controller Operations.
Definition: plugincore.cpp:355
Information about a paraemeter being updated. Used when bound variables are updated. Multiple advanced uses.
Definition: pluginstructures.h:834
static const char * getPluginName()
Definition: plugincore.cpp:498
Sample rate and bit-depth information that is passed during the reset( ) function.
Definition: pluginstructures.h:180
virtual bool updatePluginParameterNormalized(int32_t controlID, double normalizedValue, ParameterUpdateInfo &paramInfo)
update the PluginParameter&#39;s value based on normlaized GUI control, preset, or data smoothing (thread...
Definition: plugincore.cpp:266
bool initPluginParameters()
create all of your plugin parameters here
Definition: plugincore.cpp:60
PluginCore()
PluginCore constructor is launching pad for object initialization.
Definition: plugincore.cpp:25
pluginType
Use this enum to identify the plugin category.
Definition: pluginstructures.h:61
Information package that arrives with each new audio buffer process cycle. Contains everything needed...
Definition: pluginstructures.h:1056
virtual bool updatePluginParameter(int32_t controlID, double controlValue, ParameterUpdateInfo &paramInfo)
update the PluginParameter&#39;s value based on GUI control, preset, or data smoothing (thread-safe) ...
Definition: plugincore.cpp:242
Custom View interface to allow plugin core to create safe communication channels with GUI custom view...
Definition: pluginstructures.h:1395
Incoming data from a vector joystick.
Definition: pluginstructures.h:276
virtual bool guiParameterChanged(int32_t controlID, double actualValue)
has nothing to do with actual variable or updated variable (binding)
Definition: plugincore.cpp:326
virtual ~PluginCore()
Definition: plugincore.h:57
virtual bool preProcessAudioBuffers(ProcessBufferInfo &processInfo)
do anything needed prior to arrival of audio buffers
Definition: plugincore.cpp:131
virtual bool initialize(PluginInfo &_pluginInfo)
one-time initialize function called after object creation and before the first reset( ) call ...
Definition: plugincore.cpp:110
virtual bool postUpdatePluginParameter(int32_t controlID, double controlValue, ParameterUpdateInfo &paramInfo)
perform any operations after the plugin parameter has been updated; this is one paradigm for transfer...
Definition: plugincore.cpp:290
static const char * getPluginBundleName()
Definition: plugincore.cpp:497
The PluginCore object is the default PluginBase derived object for ASPiK projects. Note that you are fre to change the name of this object (as long as you change it in the compiler settings, etc...)
Definition: plugincore.h:43
static const char * getVendorEmail()
Definition: plugincore.cpp:502
static pluginType getPluginType()
Definition: plugincore.cpp:504
virtual bool postProcessAudioBuffers(ProcessBufferInfo &processInfo)
do anything needed prior to arrival of audio buffers
Definition: plugincore.cpp:220
static const char * getVSTFUID()
Definition: plugincore.cpp:505
Structure that is used during the base class initilize( ) funciton call, after object instantiation i...
Definition: pluginstructures.h:753
static const char * getVendorURL()
Definition: plugincore.cpp:501
virtual bool reset(ResetInfo &resetInfo)
initialize object for a new run of audio; called just before audio streams
Definition: plugincore.cpp:94
static const char * getVendorName()
Definition: plugincore.cpp:500
Information about a MIDI event.
Definition: pluginstructures.h:561