83 tresult PLUGIN_API
setKnobMode (
KnobMode mode) SMTG_OVERRIDE { hostKnobMode = mode;
return kResultTrue; }
84 tresult PLUGIN_API
openHelp (TBool ) SMTG_OVERRIDE {
return kResultFalse;}
85 tresult PLUGIN_API
openAboutBox (TBool ) SMTG_OVERRIDE {
return kResultFalse;}
89 tresult PLUGIN_API
terminate () SMTG_OVERRIDE;
111 virtual tresult
setDirty (TBool state);
120 OBJ_METHODS (EditController, ComponentBase)
131 ParameterContainer parameters;
212 const TChar* getName ()
const {
return info.name; }
213 int32 getCount ()
const {
return info.programCount; }
215 virtual tresult getProgramName (int32 programIndex,
String128 name );
216 virtual tresult setProgramName (int32 programIndex,
const String128 name );
217 virtual tresult getProgramInfo (int32 programIndex,
CString attributeId,
219 virtual tresult hasPitchNames (int32 programIndex)
224 virtual tresult getPitchName (int32 programIndex, int16 midiPitch,
String128 name )
233 virtual int32 addProgram (
const String128 name);
236 virtual bool setProgramInfo (int32 programIndex,
CString attributeId,
const String128 value);
264 bool setPitchName (int32 programIndex, int16 pitch,
const String128 pitchName);
268 bool removePitchName (int32 programIndex, int16 pitch);
271 int32 addProgram (
const String128 name) SMTG_OVERRIDE;
272 tresult hasPitchNames (int32 programIndex) SMTG_OVERRIDE;
273 tresult getPitchName (int32 programIndex, int16 midiPitch,
295 tresult PLUGIN_API terminate () SMTG_OVERRIDE;
298 bool addUnit (
Unit* unit);
307 tresult notifyProgramListChange (
ProgramListID listId, int32 programIndex = kAllProgramInvalid);
310 int32 PLUGIN_API
getUnitCount () SMTG_OVERRIDE {
return static_cast<int32
> (units.size ()); }
311 tresult PLUGIN_API getUnitInfo (int32 unitIndex,
UnitInfo& info ) SMTG_OVERRIDE;
313 int32 PLUGIN_API getProgramListCount () SMTG_OVERRIDE;
314 tresult PLUGIN_API getProgramListInfo (int32 listIndex,
316 tresult PLUGIN_API getProgramName (
ProgramListID listId, int32 programIndex,
317 String128 name ) SMTG_OVERRIDE;
318 tresult PLUGIN_API getProgramInfo (
ProgramListID listId, int32 programIndex,
320 String128 attributeValue ) SMTG_OVERRIDE;
322 tresult PLUGIN_API hasProgramPitchNames (
ProgramListID listId,
323 int32 programIndex) SMTG_OVERRIDE;
324 tresult PLUGIN_API getProgramPitchName (
ProgramListID listId, int32 programIndex,
325 int16 midiPitch, String128 name ) SMTG_OVERRIDE;
327 virtual tresult setProgramName (
ProgramListID listId, int32 programIndex,
328 const String128 name );
331 UnitID PLUGIN_API getSelectedUnit () SMTG_OVERRIDE {
return selectedUnit; }
334 selectedUnit = unitId;
339 int32 ,
UnitID& ) SMTG_OVERRIDE
350 virtual tresult notifyUnitSelection ();
353 void PLUGIN_API update (
FUnknown* changedUnknown, int32 message) SMTG_OVERRIDE;
367 ProgramListVector programLists;
368 ProgramIndexMap programIndexMap;
369 UnitID selectedUnit {kRootUnitId};
Plug-In view default implementation.
Implements FUnknown and IDependent.
The basic interface of all interfaces.
Plug-in definition of a view.
IPtr - Smart pointer template class.
Base class for VST 3 Component and Edit Controller.
Advanced implementation (support IUnitInfo) for a VST 3 edit controller.
int32 PLUGIN_API getUnitCount() SMTG_OVERRIDE
Returns the flat count of units.
tresult PLUGIN_API setUnitProgramData(int32, int32, IBStream *) SMTG_OVERRIDE
Receives a preset data stream.
tresult PLUGIN_API getUnitByBus(MediaType, BusDirection, int32, int32, UnitID &) SMTG_OVERRIDE
Gets the according unit if there is an unambiguous relation between a channel or a bus and a unit.
tresult PLUGIN_API selectUnit(UnitID unitId) SMTG_OVERRIDE
Sets a new selected unit.
Default implementation for a VST 3 edit controller.
tresult PLUGIN_API openAboutBox(TBool) SMTG_OVERRIDE
Host could ask to open the plug-in about box.
virtual Parameter * getParameterObject(ParamID tag)
Gets for a given tag the parameter object.
virtual tresult getParameterInfoByTag(ParamID tag, ParameterInfo &info)
Gets for a given tag the parameter information.
int32 PLUGIN_API getParameterCount() SMTG_OVERRIDE
Returns the number of parameters exported.
tresult PLUGIN_API setComponentHandler(IComponentHandler *handler) SMTG_OVERRIDE
Gets from host a handler which allows the Plugin-in to communicate with the host.
virtual tresult performEdit(ParamID tag, ParamValue valueNormalized)
will inform the host about the value change
virtual void editorRemoved(EditorView *)
called from EditorView if it was removed from a parent
tresult PLUGIN_API setKnobMode(KnobMode mode) SMTG_OVERRIDE
Host could set the Knob Mode for the plug-in.
virtual tresult finishGroupEdit()
calls IComponentHandler2::finishGroupEdit() if host supports it
tresult PLUGIN_API initialize(FUnknown *context) SMTG_OVERRIDE
The host passes a number of interfaces as context to initialize the plug-in class.
virtual tresult startGroupEdit()
calls IComponentHandler2::startGroupEdit() if host supports it
ParamValue PLUGIN_API plainParamToNormalized(ParamID tag, ParamValue plainValue) SMTG_OVERRIDE
Returns for a given paramID and a plain value its normalized value.
tresult PLUGIN_API setParamNormalized(ParamID tag, ParamValue value) SMTG_OVERRIDE
Sets the normalized value to the parameter associated to the paramID.
ParamValue PLUGIN_API normalizedParamToPlain(ParamID tag, ParamValue valueNormalized) SMTG_OVERRIDE
Returns for a given paramID and a normalized value its plain representation (for example -6 for -6dB ...
virtual tresult requestOpenEditor(FIDString name=ViewType::kEditor)
Calls IComponentHandler2::requestOpenEditor (name) if host supports it.
tresult PLUGIN_API getState(IBStream *state) SMTG_OVERRIDE
Gets the controller state.
virtual void editorDestroyed(EditorView *)
called from EditorView if it was destroyed
virtual tresult setDirty(TBool state)
Calls IComponentHandler2::setDirty (state) if host supports it.
tresult PLUGIN_API getParamValueByString(ParamID tag, TChar *string, ParamValue &valueNormalized) SMTG_OVERRIDE
Gets for a given paramID and string its normalized value.
tresult PLUGIN_API openHelp(TBool) SMTG_OVERRIDE
Host could ask to open the plug-in help (could be: opening a PDF document or link to a web page).
tresult PLUGIN_API getParameterInfo(int32 paramIndex, ParameterInfo &info) SMTG_OVERRIDE
Gets for a given index the parameter information.
virtual tresult beginEdit(ParamID tag)
to be called before a serie of performEdit
tresult PLUGIN_API getParamStringByValue(ParamID tag, ParamValue valueNormalized, String128 string) SMTG_OVERRIDE
Gets for a given paramID and normalized value its associated string representation.
ParamValue PLUGIN_API getParamNormalized(ParamID tag) SMTG_OVERRIDE
Returns the normalized value of the parameter associated to the paramID.
tresult PLUGIN_API terminate() SMTG_OVERRIDE
This function is called before the plug-in is unloaded and can be used for cleanups.
virtual tresult endEdit(ParamID tag)
to be called after a serie of performEdit
virtual void editorAttached(EditorView *)
called from EditorView if it was attached to a parent
IPlugView *PLUGIN_API createView(FIDString) SMTG_OVERRIDE
Creates the editor view of the plug-in, currently only "editor" is supported, see ViewType.
static KnobMode getHostKnobMode()
return host knob mode
tresult PLUGIN_API setComponentState(IBStream *state) SMTG_OVERRIDE
Receives the component state.
tresult PLUGIN_API setState(IBStream *state) SMTG_OVERRIDE
Sets the controller state.
View related to an edit controller.
void attachedToParent() SMTG_OVERRIDE
Calls when this view will be attached to its parent view.
void removedFromParent() SMTG_OVERRIDE
Calls when this view will be removed from its parent view.
EditController * getController() const
Gets its controller part.
Host callback interface for an edit controller: Vst::IComponentHandler.
Edit controller component interface extension: Vst::IEditController2.
Edit controller component interface: Vst::IEditController.
Edit controller extension to describe the plug-in structure: Vst::IUnitInfo.
Parameter * getParameter(ParamID tag) const
Gets parameter by ID.
Description of a Parameter.
ProgramListWithPitchNames element.
void setID(UnitID newID)
Sets a new Unit ID.
void setProgramListID(ProgramListID newID)
Sets a new ProgramList ID.
UnitID getID() const
Returns its Unit ID.
const TChar * getName() const
Returns its Unit Name.
const UnitInfo & getInfo() const
Returns its info.
ProgramListID getProgramListID() const
Returns its ProgramList ID.
#define DEFINE_INTERFACES
Start defining interfaces.
#define DEF_INTERFACE(InterfaceName)
Add a interfaces.
#define END_DEFINE_INTERFACES(BaseClass)
End defining interfaces.
#define REFCOUNT_METHODS(BaseClass)
Delegate refcount functions to BaseClass.
int32 KnobMode
Knob Mode Type.
uint32 ParamID
parameter identifier
TChar String128[128]
128 character UTF-16 string
char16 TChar
UTF-16 character.
double ParamValue
parameter value type
int32 ProgramListID
program list identifier
int32 BusDirection
bus direction (in/out)
int32 UnitID
unit identifier
const char8 * CString
C-String.
int32 MediaType
media type (audio/event)
ProgramListID id
program list identifier
Basic Program List Description.
Graphical rectangle structure.
Controller Parameter Info.