23#include "IPlugStructs.h"
52#pragma mark - Methods you can implement/override in your plug-in class - you do not call these methods
59 virtual bool CompareState(
const uint8_t* pIncomingState,
int startPos)
const;
62 virtual bool OnHostRequestingAboutBox() {
return false; }
65 virtual bool OnHostRequestingProductHelp() {
return false; }
83 return ((width + height) == 0);
96 virtual bool GetMidiNoteText(
int noteNumber,
char* str)
const { *str =
'\0';
return false; }
104 return (
void*) GetUI();
113#pragma mark - Methods you can call - some of which have custom implementations in the API classes, some implemented in IPlugAPIBase.cpp
139#pragma mark - Methods called by the API class - you do not call these methods in your plug-in class
151 void SetHost(
const char* host,
int version);
158 void BeginInformHostOfParamChangeFromUI(
int paramIdx)
override { BeginInformHostOfParamChange(paramIdx); }
160 void EndInformHostOfParamChangeFromUI(
int paramIdx)
override { EndInformHostOfParamChange(paramIdx); }
162 bool EditorResizeFromUI(
int viewWidth,
int viewHeight,
bool needsPlatformResize)
override;
164 void SendParameterValueFromUI(
int paramIdx,
double normalisedValue)
override
167 IPluginBase::SendParameterValueFromUI(paramIdx, normalisedValue);
171 void SendMidiMsgFromUI(
const IMidiMsg& msg)
override;
173 void SendSysexMsgFromUI(
const ISysEx& msg)
override;
175 void SendArbitraryMsgFromUI(
int msgTag,
int ctrlTag = kNoTag,
int dataSize = 0,
const void* pData =
nullptr)
override;
177 void DeferMidiMsg(
const IMidiMsg& msg)
override { mMidiMsgsFromEditor.
Push(msg); }
179 void DeferSysexMsg(
const ISysEx& msg)
override
181 mSysExDataFromEditor.
PushFromArgs(msg.mOffset, msg.mSize, msg.mData);
190 virtual bool EditorResize(
int width,
int height) {
return false; }
194 virtual void BeginInformHostOfParamChange(
int paramIdx) {}
198 virtual void EndInformHostOfParamChange(
int paramIdx) {}
203 virtual void InformHostOfParamChange(
int paramIdx,
double normalizedValue) {}
207 virtual void TransmitMidiMsgFromProcessor(
const IMidiMsg& msg) {}
210 virtual void TransmitSysExDataFromProcessor(
const SysExData& data) {}
212 void OnTimer(
Timer& t);
224 friend class IPlugWEB;
227 WDL_String mParamDisplayStr;
228 std::unique_ptr<Timer> mTimer;
IPlug Constant definitions, Types, magic numbers.
This file includes classes for implementing timers - in order to get a regular callback on the main t...
Utility functions and macros.
AAX API base class for an IPlug plug-in.
The base class of an IPlug plug-in, which interacts with the different plug-in APIs.
virtual int GetTrackNamespaceIndex()
Get the namespace index of the track that the plug-in is inserted on.
void CreateTimer()
Called by the API class to create the timer that pumps the parameter/message queues.
virtual void OnHostSelectedViewConfiguration(int width, int height)
Called by some AUv3 plug-in hosts when a particular UI size is selected.
virtual int GetTrackIndex()
Get the index of the track that the plug-in is inserted on.
virtual bool GetMidiNoteText(int noteNumber, char *str) const
Override this method to provide custom text linked to MIDI note numbers in API classes that support t...
virtual void GetTrackNamespace(WDL_String &str)
Get the namespace of the track that the plug-in is inserted on.
virtual void * GetAAXViewInterface()
You need to implement this method if you are not using IGraphics and you want to support AAX's view i...
virtual void OnIdle()
Override this method to get an "idle"" call on the main thread.
virtual bool OnHostRequestingSupportedViewConfiguration(int width, int height)
Called by AUv3 plug-in hosts to query support for multiple UI sizes.
virtual bool CompareState(const uint8_t *pIncomingState, int startPos) const
Override this method to implement a custom comparison of incoming state data with your plug-ins state...
void SetParameterValue(int paramIdx, double normalizedValue)
SetParameterValue is called from the UI in the middle of a parameter change gesture (possibly via del...
virtual void SendParameterValueFromAPI(int paramIdx, double value, bool normalized)
This is called from the plug-in API class in order to update UI controls linked to plug-in parameters...
void SetHost(const char *host, int version)
Called to set the name of the current host, if known (calls on to HostSpecificInit() and OnHostIdenti...
virtual void DirtyParametersFromUI() override
In a distributed VST3 or WAM plugin, if you modify the parameters on the UI side (e....
virtual void HostSpecificInit()
This method is implemented in some API classes, in order to do specific initialisation for particular...
virtual void OnHostIdentified()
Implement this to do something specific when IPlug becomes aware of the particular host that is hosti...
virtual void GetTrackName(WDL_String &str)
Get the name of the track that the plug-in is inserted on.
virtual void OnHostRequestingImportantParameters(int count, WDL_TypedBuf< int > &results)
Called by AUv3 plug-ins to get the "overview parameters".
virtual void GetTrackColor(int &r, int &g, int &b)
Get the color of the track that the plug-in is inserted on.
Standalone application base class for an IPlug plug-in.
AudioUnit v2 API base class for an IPlug plug-in.
AudioUnit v3 API base class for an IPlug plug-in.
CLAP API base class for an IPlug plug-in.
A lock-free SPSC queue used to transfer data between threads based on MLQueue.h by Randy Jones based ...
bool PushFromArgs(Args ...args)
VST2.4 API base class for an IPlug plug-in.
VST3 Controller API-base class for a distributed IPlug VST3 plug-in.
VST3 base class for a non-distributed IPlug VST3 plug-in.
VST3 Processor API-base class for a distributed IPlug VST3 plug-in.
WebAudioModule (WAM) API base class.
Base class that contains plug-in info and state manipulation methods.
Encapsulates a MIDI message and provides helper functions.
A struct for dealing with SysEx messages.
This structure is used when queueing Sysex messages.