Loading...
Searching...
No Matches
VST3ClientExtensions Struct Reference

An interface to allow an AudioProcessor to implement extended VST3-specific functionality. More...

#include <juce_VST3ClientExtensions.h>

Public Types

enum class  InterfaceType {
  ara , controller , compatibility , component ,
  processor
}
 An enum indicating the various VST3 interface types. More...
 
using InterfaceId = std::array<std::byte, 16>
 

Public Member Functions

virtual ~VST3ClientExtensions ()=default
 
virtual int32_t queryIEditController (const Steinberg::TUID, void **obj)
 This function may be used by implementations of queryInterface() in the VST3's implementation of IEditController to return additional supported interfaces.
 
virtual int32_t queryIAudioProcessor (const Steinberg::TUID, void **obj)
 This function may be used by implementations of queryInterface() in the VST3's implementation of IAudioProcessor to return additional supported interfaces.
 
virtual void setIComponentHandler (Steinberg::FUnknown *)
 This may be called by the VST3 wrapper when the host sets an IComponentHandler for the plugin to use.
 
virtual void setIHostApplication (Steinberg::FUnknown *)
 This may be called shortly after the AudioProcessor is constructed with the current IHostApplication.
 
virtual bool getPluginHasMainInput () const
 This function will be called to check whether the first input bus should be designated as "kMain" or "kAux".
 
virtual std::vector< InterfaceIdgetCompatibleClasses () const
 This function should return the UIDs of any compatible VST2 or VST3 plug-ins.
 
virtual std::map< uint32_t, StringgetCompatibleParameterIds (const InterfaceId &compatibleClass) const
 This function should return a map of VST3 parameter IDs and the JUCE parameters they map to.
 

Static Public Member Functions

static InterfaceId convertJucePluginId (uint32_t manufacturerCode, uint32_t pluginCode, InterfaceType interfaceType=InterfaceType::component)
 Returns a 16-byte array indicating the VST3 interface ID used for a given JUCE VST3 plugin.
 
static InterfaceId convertVST2PluginId (uint32_t pluginCode, const String &pluginName, InterfaceType interfaceType=InterfaceType::component)
 Returns a 16-byte array indicating the VST3 interface ID used for a given VST2 plugin.
 
static uint32_t convertJuceParameterId (const String &parameterId, bool studioOneCompatible=true)
 Returns the VST3 compatible parameter ID reported for a given JUCE parameter.
 
static InterfaceId toInterfaceId (const String &interfaceIdString)
 Converts a 32-character hex notation string to a VST3 interface ID.
 

Detailed Description

An interface to allow an AudioProcessor to implement extended VST3-specific functionality.

To use this class, create an object that inherits from it, implement the methods, then return a pointer to the object in your AudioProcessor::getVST3ClientExtensions() method.

See also
AudioProcessor, AAXClientExtensions, VST2ClientExtensions

Member Typedef Documentation

◆ InterfaceId

using VST3ClientExtensions::InterfaceId = std::array<std::byte, 16>

Member Enumeration Documentation

◆ InterfaceType

An enum indicating the various VST3 interface types.

In most cases users shouldn't need to concern themselves with any interfaces other than the component, which is used to report the actual audio effect.

Enumerator
ara 
controller 
compatibility 
component 
processor 

Constructor & Destructor Documentation

◆ ~VST3ClientExtensions()

virtual VST3ClientExtensions::~VST3ClientExtensions ( )
virtualdefault

Member Function Documentation

◆ queryIEditController()

virtual int32_t VST3ClientExtensions::queryIEditController ( const Steinberg::TUID ,
void ** obj )
virtual

This function may be used by implementations of queryInterface() in the VST3's implementation of IEditController to return additional supported interfaces.

◆ queryIAudioProcessor()

virtual int32_t VST3ClientExtensions::queryIAudioProcessor ( const Steinberg::TUID ,
void ** obj )
virtual

This function may be used by implementations of queryInterface() in the VST3's implementation of IAudioProcessor to return additional supported interfaces.

◆ setIComponentHandler()

virtual void VST3ClientExtensions::setIComponentHandler ( Steinberg::FUnknown * )
virtual

This may be called by the VST3 wrapper when the host sets an IComponentHandler for the plugin to use.

You should not make any assumptions about how and when this will be called - this function may not be called at all!

◆ setIHostApplication()

virtual void VST3ClientExtensions::setIHostApplication ( Steinberg::FUnknown * )
virtual

This may be called shortly after the AudioProcessor is constructed with the current IHostApplication.

You should not make any assumptions about how and when this will be called - this function may not be called at all!

◆ getPluginHasMainInput()

virtual bool VST3ClientExtensions::getPluginHasMainInput ( ) const
virtual

This function will be called to check whether the first input bus should be designated as "kMain" or "kAux".

Return true if the first bus should be kMain, or false if the bus should be kAux.

All other input buses will always be designated kAux.

◆ getCompatibleClasses()

virtual std::vector< InterfaceId > VST3ClientExtensions::getCompatibleClasses ( ) const
virtual

This function should return the UIDs of any compatible VST2 or VST3 plug-ins.

This information will be used to implement the IPluginCompatibility interface. Hosts can use this interface to determine whether this VST3 is capable of replacing a given VST2.

Each compatible class is a 16-byte array that corresponds to the VST3 interface ID for the class implementing the IComponent interface. For VST2 or JUCE plugins these IDs can be determined in the following ways:

If JUCE_VST3_CAN_REPLACE_VST2 is enabled the VST3 plugin will have the same identifier as the VST2 plugin and therefore there will be no need to implement this function.

If the parameter IDs between compatible versions differ getCompatibleParameterIds() should also be overridden. However, unlike getCompatibleParameterIds() this function should remain constant and always return the same IDs.

See also
getCompatibleParameterIds()

◆ getCompatibleParameterIds()

virtual std::map< uint32_t, String > VST3ClientExtensions::getCompatibleParameterIds ( const InterfaceId & compatibleClass) const
virtual

This function should return a map of VST3 parameter IDs and the JUCE parameters they map to.

This information is used to implement the IRemapParameter interface. Hosts can use this to preserve automation data when a session was saved using a compatible plugin that has different parameter IDs.

Not all hosts will take this information into account. Therefore, parameter IDs should be maintained between plugin versions. For JUCE plugins migrating from VST2 to VST3 the best method for achieving this is enabling JUCE_FORCE_LEGACY_PARAM_IDS. However, if a plugin has already been released without enabling this flag, this method offers an alternative approach that won't cause any further compatibility issues.

The key in the map is a VST3 parameter identifier or Vst::ParamID. For VST2 or JUCE plugins these IDs can be determined in the following ways

  • Use the parameter index for
  • Use convertJuceParameterId() for JUCE VST3 plugins where JUCE_FORCE_LEGACY_PARAM_IDS is disabled

The value in the map is the JUCE parameter ID for the parameter to map to, or an empty string to indicate that there is no parameter to map to. If a parameter doesn't inherit from HostedAudioProcessorParameter its ID will be the parameter index as a string, for example "1". Otherwise always use the actual parameter ID (even if JUCE_FORCE_LEGACY_PARAM_IDS is enabled).

In the unlikely event that two plugins share the same plugin ID, and both have a different parameters that share the same parameter ID, it may be possible to determine which version of the plugin is being loaded during setStateInformation(). This method will always be called after setStateInformation(), so that the map with the correct mapping can be provided when queried.

Below is an example of how you might implement this function for a JUCE VST3 plugin where JUCE_VST3_CAN_REPLACE_VST2 is enabled, but JUCE_FORCE_LEGACY_PARAM_IDS is disabled.

std::map<uint32_t, String> getCompatibleParameterIds (const String&) const override
{
return { { 0, "Frequency" },
{ 1, "CutOff" },
{ 2, "Gain" },
{ 3, "Bypass" } };
}
The JUCE String class!
Definition juce_String.h:68
virtual std::map< uint32_t, String > getCompatibleParameterIds(const InterfaceId &compatibleClass) const
This function should return a map of VST3 parameter IDs and the JUCE parameters they map to.
Parameters
compatibleClassA plugin identifier, either for the current plugin or one listed in getCompatibleClasses(). This parameter allows the implementation to return a different parameter map for each compatible class. Use convertJucePluginId() and convertVST2PluginId() to determine the class IDs used by JUCE plugins.
Returns
A map where each key is a VST3 parameter ID in the compatible plugin, and the value is the unique JUCE parameter ID in the current plugin that it should be mapped to.
See also
getCompatibleClasses, convertJucePluginId, convertVST2PluginId, convertJuceParameterId

◆ convertJucePluginId()

static InterfaceId VST3ClientExtensions::convertJucePluginId ( uint32_t manufacturerCode,
uint32_t pluginCode,
InterfaceType interfaceType = InterfaceType::component )
static

Returns a 16-byte array indicating the VST3 interface ID used for a given JUCE VST3 plugin.

Internally this is what JUCE will use to assign an ID to each VST3 interface, unless JUCE_VST3_CAN_REPLACE_VST2 is enabled.

See also
convertVST2PluginId, getCompatibleClasses, getCompatibleParameterIds

◆ convertVST2PluginId()

static InterfaceId VST3ClientExtensions::convertVST2PluginId ( uint32_t pluginCode,
const String & pluginName,
InterfaceType interfaceType = InterfaceType::component )
static

Returns a 16-byte array indicating the VST3 interface ID used for a given VST2 plugin.

Internally JUCE will use this method to assign an ID for the component and controller interfaces when JUCE_VST3_CAN_REPLACE_VST2 is enabled.

@convertJucePluginId, getCompatibleClasses, getCompatibleParameterIds

◆ convertJuceParameterId()

static uint32_t VST3ClientExtensions::convertJuceParameterId ( const String & parameterId,
bool studioOneCompatible = true )
static

Returns the VST3 compatible parameter ID reported for a given JUCE parameter.

Internally JUCE will use this method to determine the Vst::ParamID for a HostedAudioProcessorParameter, unless JUCE_FORCE_LEGACY_PARAM_IDS is enabled, in which case it will use the parameter index.

See also
getCompatibleParameterIds

◆ toInterfaceId()

static InterfaceId VST3ClientExtensions::toInterfaceId ( const String & interfaceIdString)
static

Converts a 32-character hex notation string to a VST3 interface ID.


The documentation for this struct was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram