TracktionEngine
Loading...
Searching...
No Matches
engine::ExternalPlugin Class Reference

Wraps a juce::AudioPluginInstance (VST2, VST3, AU, etc.) as a tracktion Plugin. More...

#include <tracktion_ExternalPlugin.h>

Inheritance diagram for engine::ExternalPlugin:

Public Types

using Ptr = juce::ReferenceCountedObjectPtr<ExternalPlugin>
Public Types inherited from engine::Plugin
enum class  Type { allPlugins , folderTrackPlugins , effectPlugins }
 Filter categories used when enumerating plugins. More...
using Ptr = juce::ReferenceCountedObjectPtr<Plugin>
using Array = juce::ReferenceCountedArray<Plugin>
Public Types inherited from engine::Selectable
using WeakRef = juce::WeakReference<Selectable>

Public Member Functions

 ExternalPlugin (PluginCreationInfo)
 ~ExternalPlugin () override
juce::String getIdentifierString () override
 A unique string to identify a plugin independent of install location.
void selectableAboutToBeDeleted () override
 Called just before the selectable is about to be deleted so any subclasses should still be valid at this point.
void processingChanged () override
 Called when the processing enabled state changes.
void initialiseFully () override
 Gives the plugin a chance to do extra initialisation when it's been added to an edit.
void forceFullReinitialise ()
juce::String getLoadError ()
 Returns an error message if the plugin failed to load.
bool isInitialisingAsync () const
 Returns true if the plugin has started initialising but not completed yet.
void flushPluginStateToValueTree () override
void flushBusesLayoutToValueTree ()
 Writes the current bus layout to the plugin's ValueTree state.
void restorePluginStateFromValueTree (const juce::ValueTree &) override
void getPluginStateFromTree (juce::MemoryBlock &)
 Extracts the raw plugin state blob from the ValueTree.
void updateFromMirroredPluginIfNeeded (Plugin &) override
 Called to pull state from the mirrored master.
void initialise (const PluginInitialisationInfo &) override
 Gives the plugin a chance to set itself up before being played.
void deinitialise () override
 Called after play stops to release resources.
void reset () override
 Should reset synth voices, tails, clear delay buffers, etc.
void midiPanic () override
 Tells the plugin to turn off any playing notes, if applicable.
void setEnabled (bool enabled) override
 Enable/disable the plugin.
juce::Array< Exportable::ReferencedItem > getReferencedItems () override
void reassignReferencedItem (const ReferencedItem &, ProjectItemRef newRef, double newStartTime) override
void applyToBuffer (const PluginRenderContext &) override
 Process the next block of data.
bool producesAudioWhenNoAudioInput () override
 Returns true if the plugin can produce audio when its input is silent (e.g.
int getNumOutputChannelsGivenInputs (int numInputs) override
 Returns the number of output channels this plugin will produce for track routing.
BusLayout getBusses () const override
 Returns the full input/output bus layout of this plugin.
void getChannelNames (juce::StringArray *ins, juce::StringArray *outs) override
 Fills the provided StringArrays with the names of this plugin's input and/or output channels.
bool isVST () const noexcept
bool isVST3 () const noexcept
bool isAU () const noexcept
juce::String getName () const override
 The name of the type, e.g.
juce::String getVendor () override
 Returns the plugin vendor/manufacturer name.
juce::String getTooltip () override
 Returns a tooltip string for UI display.
juce::String getPluginType () override
 Returns a string identifying the plugin type (used as the XML tag name).
bool isSynth () override
bool takesMidiInput () override
bool takesAudioInput () override
 Returns true if this plugin should be fed audio from upstream in the chain.
bool isMissing () override
 Returns true if the plugin's backing file/DLL is missing (e.g.
bool isDisabled () override
 Returns true if the plugin has been forcibly disabled (e.g.
double getLatencySeconds () override
 Returns the plugin's processing latency in seconds.
bool noTail () override
 Returns true if the plugin has no tail (i.e.
double getTailLength () const override
 Returns the length of the plugin's tail in seconds (e.g.
void trackPropertiesChanged () override
 Track name or colour has changed.
juce::AudioProcessor * getWrappedAudioProcessor () const override
 Returns the underlying juce::AudioProcessor, if this plugin wraps one.
void deleteFromParent () override
 Attempts to delete this plugin, whether it's a master plugin, track plugin, etc.
juce::String getSelectableDescription () override
 Subclasses must return a description of what they are.
juce::File getFile () const
juce::String getPluginUID () const
const char * getDebugName () const noexcept
bool setBusesLayout (juce::AudioProcessor::BusesLayout)
 Attempts to change the full bus layout of the wrapped plugin.
bool setBusLayout (juce::AudioChannelSet, bool isInput, int busIndex)
 Attempts to change a single bus layout.
int getNumPrograms () const
int getCurrentProgram () const
juce::String getProgramName (int index)
juce::String getNumberedProgramName (int i)
juce::String getCurrentProgramName ()
void setCurrentProgram (int index, bool sendChangeMessage)
void setCurrentProgramName (const juce::String &name)
bool hasNameForMidiProgram (int programNum, int bank, juce::String &name) override
 Returns the name for a midi program, if there is one.
bool hasNameForMidiNoteNumber (int note, int midiChannel, juce::String &name) override
 If it's a synth that names its notes, this can return the name it uses for this note 0-127.
const VSTXML * getVSTXML () const noexcept
juce::AudioPluginInstance * getAudioPluginInstance () const
 Returns the underlying juce::AudioPluginInstance, or nullptr if not yet loaded.
void setDeletesPluginInstanceSynchronously (bool shouldDeleteSynchronously) noexcept
 If enabled, the wrapped juce::AudioPluginInstance is destroyed synchronously when this plugin is deleted rather than via the shared asynchronous deleter.
ActiveNoteList getActiveNotes () const
std::unique_ptr< EditorComponent > createEditor () override
 Creates a custom editor component for this plugin, or nullptr if none.
int getTotalNumInputChannels () const
Public Member Functions inherited from engine::Plugin
 Plugin (PluginCreationInfo)
 ~Plugin () override
void selectableAboutToBeDeleted () override
 Called just before the selectable is about to be deleted so any subclasses should still be valid at this point.
void playStartedOrStopped ()
 called by the system to let the plugin manage its automation stuff
virtual juce::String getShortName (int)
 Returns an abbreviated name, ideally fitting within suggestedLength characters.
juce::String getDisplayName () const
 Returns the custom name if set, otherwise the built-in getName().
juce::String getCustomName () const
 Returns the raw custom name (may be empty).
void setCustomName (const juce::String &)
 Sets a custom display name.
bool isEnabled () const noexcept
void setFrozen (bool shouldBeFrozen)
 Freezing is stronger than disabling – a frozen plugin cannot be interacted with at all.
bool isFrozen () const noexcept
void setProcessingEnabled (bool p)
 Enable/disable processing.
bool isProcessingEnabled () const noexcept
virtual void initialiseWithoutStopping (const PluginInitialisationInfo &)
 Tells the plugin that the audio graph has changed but the plugin isn't being re-initialised - i.e.
virtual void prepareForNextBlock (TimePosition)
 Called between successive rendering blocks.
void applyToBufferWithAutomation (const PluginRenderContext &)
virtual bool shouldMeasureCpuUsage () const noexcept
 Plugins can return false if they want to avoid the overhead of measuring the CPU usage.
double getCpuUsage () const noexcept
 Returns the proportion of the current buffer size spent processing this plugin.
virtual bool canSidechain ()
 Returns true if this plugin supports sidechain input.
AutomatableParameter * addParam (const juce::String &paramID, const juce::String &name, juce::NormalisableRange< float > valueRange)
 Registers a new automatable parameter owned by this plugin.
AutomatableParameter * addParam (const juce::String &paramID, const juce::String &name, juce::NormalisableRange< float > valueRange, std::function< juce::String(float)> valueToStringFunction, std::function< float(const juce::String &)> stringToValueFunction)
 Registers a new automatable parameter with custom string conversion functions.
juce::StringArray getInputChannelNames ()
 Returns the names of this plugin's input channels (convenience wrapper around getChannelNames).
juce::StringArray getSidechainSourceNames (bool allowNone)
 Returns the names of available sidechain sources for this plugin.
void setSidechainSourceByName (const juce::String &name)
 Sets the sidechain source by its display name.
juce::String getSidechainSourceName ()
 Returns the display name of the current sidechain source.
void guessSidechainRouting ()
 Attempts to automatically determine a sensible sidechain routing.
int getNumWires () const
Wire * getWire (int index) const
void makeConnection (int srcChannel, int dstChannel, juce::UndoManager *)
void breakConnection (int srcChannel, int dstChannel)
virtual bool hasNameForMidiBank (int bank, juce::String &name)
virtual bool canBeAddedToClip ()
virtual bool canBeAddedToRack ()
virtual bool canBeAddedToFolderTrack ()
virtual bool canBeAddedToMaster ()
virtual bool canBeDisabled ()
virtual bool canBeMoved ()
virtual bool needsConstantBufferSize ()
 Returns true if this plugin requires a constant audio buffer size (no variable-size blocks).
bool isInRack () const
 Returns true if this plugin lives inside a RackType.
juce::ReferenceCountedObjectPtr< RackType > getOwnerRackType () const
bool isClipEffectPlugin () const
 Returns true if this plugin is being used as a clip effect.
AutomatableParameter::Ptr getQuickControlParameter () const
void setQuickControlParameter (AutomatableParameter *)
void removeFromParent ()
 Detaches the plugin from any parent it might be in.
Track * getOwnerTrack () const
 Returns the track if it's a track or clip plugin.
Clip * getOwnerClip () const
 Returns the clip if that's what it's in.
PluginList * getOwnerList () const
 Returns the PluginList that contains this plugin.
Ptr findPluginThatFeedsIntoThis () const
 Returns the previous plugin in the same PluginList, or nullptr.
Ptr findPluginThatThisFeedsInto () const
 Returns the next plugin in the same PluginList, or nullptr.
void changed () override
 Marks the plugin as changed and notifies the Edit.
juce::Array< ReferencedItem > getReferencedItems () override
void reassignReferencedItem (const ReferencedItem &, ProjectItemRef newRef, double newStartTime) override
virtual void sourceMediaChanged ()
 Called when ProjectItem sources are re-assigned so you can reload from the new source.
bool setPluginToMirror (const Plugin::Ptr &)
 Sets a master plugin whose settings this one will mirror.
Plugin::Ptr getMirroredPlugin () const
 Returns the plugin this one is mirroring, or nullptr.
bool baseClassNeedsInitialising () const noexcept
 Returns true if baseClassInitialise() has not yet been called (or has been fully deinitialised).
void baseClassInitialise (const PluginInitialisationInfo &)
 Prepares the plugin for playback.
void baseClassDeinitialise ()
 Tears down the plugin after playback.
void setSidechainSourceID (EditItemID newID)
EditItemID getSidechainSourceID () const
void showWindowExplicitly ()
 Shows the plugin's editor window, creating it if necessary.
void hideWindowForShutdown ()
 Hides the plugin window during shutdown (avoids dangling references).
juce::UndoManager * getUndoManager () const noexcept
bool isInitialising () const
Public Member Functions inherited from engine::Selectable
 Selectable ()
virtual ~Selectable ()
virtual void selectionStatusChanged (bool isNowSelected)
 Can be overridden to tell this object that it has just been selected or deselected.
void addListener (SelectableListener *)
void removeListener (SelectableListener *)
void addSelectableListener (SelectableListener *)
void removeSelectableListener (SelectableListener *)
void cancelAnyPendingUpdates ()
 If changed() has been called, this will cancel any pending async change notificaions.
void deselect ()
void propertiesChanged ()
void notifyListenersOfDeletion ()
WeakRef getWeakRef ()
Public Member Functions inherited from engine::Exportable
virtual ~Exportable ()=default
Public Member Functions inherited from engine::AutomatableEditItem
 AutomatableEditItem (Edit &, const juce::ValueTree &)
 ~AutomatableEditItem () override
juce::Array< AutomatableParameter * > getAutomatableParameters () const
int getNumAutomatableParameters () const
AutomatableParameter::Ptr getAutomatableParameter (int index) const
AutomatableParameter::Ptr getAutomatableParameterByID (const juce::String &paramID) const
void visitAllAutomatableParams (const std::function< void(AutomatableParameter &)> &visit) const
void deleteParameter (AutomatableParameter *)
void deleteAutomatableParameters ()
int indexOfAutomatableParameter (const AutomatableParameter::Ptr &) const
AutomatableParameterTree & getParameterTree () const
juce::ReferenceCountedArray< AutomatableParameter > getFlattenedParameterTree () const
void addParameterListChangeListener (ParameterListChangeListener *)
void removeParameterListChangeListener (ParameterListChangeListener *)
bool isAutomationNeeded () const noexcept
void setAutomatableParamPosition (TimePosition)
bool isBeingActivelyPlayed () const
virtual void updateAutomatableParamPosition (TimePosition)
 Updates all the auto params to their positions at this time.
void updateParameterStreams (TimePosition)
 Updates all the parameter streams to their positions at this time.
void resetRecordingStatus ()
 Marks the end of an automation recording stream.
void updateStreamIterators ()
void addActiveParameter (const AutomatableParameter &)
void removeActiveParameter (const AutomatableParameter &)
bool isActiveParameter (AutomatableParameter &)
Public Member Functions inherited from engine::EditItem
 EditItem (EditItemID, Edit &)
 EditItem (Edit &, const juce::ValueTree &)
virtual ~EditItem ()=default
Public Member Functions inherited from engine::MacroParameterElement
 MacroParameterElement (Edit &, const juce::ValueTree &)
 Constructor.
virtual ~MacroParameterElement ()=default
 Destructor.
MacroParameterList * getMacroParameterList ()
 If no parameters have been created, this may return nullptr.
MacroParameterList & getMacroParameterListForWriting ()
 This ensures that the list has been created.
juce::ReferenceCountedArray< MacroParameter > getMacroParameters () const

Static Public Member Functions

static juce::ValueTree create (Engine &, const juce::PluginDescription &)
 Creates the ValueTree state for inserting an ExternalPlugin into an Edit.
Static Public Member Functions inherited from engine::Plugin
static bool areSelectedPluginsRackable (SelectionManager &)
static RackInstance * wrapSelectedPluginsInRack (SelectionManager &)
static void sortPlugins (Plugin::Array &)
static void sortPlugins (std::vector< Plugin * > &)
Static Public Member Functions inherited from engine::Selectable
static void initialise ()
static bool isSelectableValid (const Selectable *) noexcept
 checks whether this object has been deleted.
Static Public Member Functions inherited from engine::Exportable
static juce::Array< Exportable * > addAllExportables (Edit &)
 Returns all the Exportables contained in an Edit.

Public Attributes

juce::PluginDescription desc
 The plugin's description (format, name, manufacturer, file path, etc.).
juce::CachedValue< float > dryValue
 Dry/wet mix values and their automatable parameters.
juce::CachedValue< float > wetValue
AutomatableParameter::Ptr dryGain
AutomatableParameter::Ptr wetGain
Public Attributes inherited from engine::Plugin
std::unique_ptr< WindowState > windowState
Engine & engine
juce::ValueTree state
 The ValueTree that stores this plugin's persistent state within the Edit.
Public Attributes inherited from engine::Selectable
WeakRef::Master masterReference
Public Attributes inherited from engine::AutomatableEditItem
juce::ValueTree elementState
juce::CachedValue< bool > remapOnTempoChange
Public Attributes inherited from engine::EditItem
Edit & edit
const EditItemID itemID
 Every EditItem has an ID which is unique within the edit.
Public Attributes inherited from engine::MacroParameterElement
Edit & ownerEdit
juce::ValueTree parentStateForList

Static Public Attributes

static const char * xmlTypeName

Additional Inherited Members

Protected Member Functions inherited from engine::Plugin
void valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override
void valueTreeChanged () override
void valueTreeChildAdded (juce::ValueTree &, juce::ValueTree &) override
void valueTreeChildRemoved (juce::ValueTree &, juce::ValueTree &, int) override
void valueTreeParentChanged (juce::ValueTree &) override
Protected Member Functions inherited from engine::AutomatableEditItem
void updateLastPlaybackTime ()
void clearParameterList ()
void addAutomatableParameter (const AutomatableParameter::Ptr &)
void rebuildParameterTree ()
void saveChangedParametersToState ()
 Saves the explicit value of any parameters that have deviated to the state.
void restoreChangedParametersFromState ()
 Restores the value of any explicitly set parameters.
Protected Member Functions inherited from engine::ValueTreeAllEventListener
void valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override
void valueTreeChildAdded (juce::ValueTree &, juce::ValueTree &) override
void valueTreeChildRemoved (juce::ValueTree &, juce::ValueTree &, int) override
void valueTreeChildOrderChanged (juce::ValueTree &, int, int) override
void valueTreeParentChanged (juce::ValueTree &) override
void valueTreeRedirected (juce::ValueTree &) override
Static Protected Member Functions inherited from engine::Plugin
static void getLeftRightChannelNames (juce::StringArray *ins, juce::StringArray *outs)
 Helper to populate stereo left/right channel name arrays.
static void getLeftRightChannelNames (juce::StringArray *chans)
Protected Attributes inherited from engine::Plugin
juce::CachedValue< AtomicWrapper< bool > > enabled
juce::CachedValue< bool > frozen
juce::CachedValue< bool > processing
juce::CachedValue< juce::String > quickParamName
juce::CachedValue< juce::String > customName
juce::CachedValue< EditItemID > masterPluginID
juce::CachedValue< EditItemID > sidechainSourceID
double sampleRate = 44100.0
 Current sample rate and block size, set during baseClassInitialise().
int blockSizeSamples = 512

Detailed Description

Wraps a juce::AudioPluginInstance (VST2, VST3, AU, etc.) as a tracktion Plugin.

Handles lifecycle (async loading, state persistence), parameter bridging, bus layout management, and dry/wet mixing for hosted third-party plugins.

Member Typedef Documentation

◆ Ptr

using engine::ExternalPlugin::Ptr = juce::ReferenceCountedObjectPtr<ExternalPlugin>

Constructor & Destructor Documentation

◆ ExternalPlugin()

engine::ExternalPlugin::ExternalPlugin ( PluginCreationInfo )

◆ ~ExternalPlugin()

engine::ExternalPlugin::~ExternalPlugin ( )
override

Member Function Documentation

◆ getIdentifierString()

juce::String engine::ExternalPlugin::getIdentifierString ( )
overridevirtual

A unique string to identify a plugin independent of install location.

Reimplemented from engine::Plugin.

References engine::createIdentifierString(), and desc.

◆ selectableAboutToBeDeleted()

void engine::ExternalPlugin::selectableAboutToBeDeleted ( )
overridevirtual

Called just before the selectable is about to be deleted so any subclasses should still be valid at this point.

Reimplemented from engine::Selectable.

◆ create()

juce::ValueTree engine::ExternalPlugin::create ( Engine & ,
const juce::PluginDescription &  )
static

Creates the ValueTree state for inserting an ExternalPlugin into an Edit.

◆ processingChanged()

void engine::ExternalPlugin::processingChanged ( )
overridevirtual

Called when the processing enabled state changes.

Reimplemented from engine::Plugin.

◆ initialiseFully()

void engine::ExternalPlugin::initialiseFully ( )
overridevirtual

Gives the plugin a chance to do extra initialisation when it's been added to an edit.

Reimplemented from engine::Plugin.

◆ forceFullReinitialise()

void engine::ExternalPlugin::forceFullReinitialise ( )

◆ getLoadError()

juce::String engine::ExternalPlugin::getLoadError ( )

Returns an error message if the plugin failed to load.

◆ isInitialisingAsync()

bool engine::ExternalPlugin::isInitialisingAsync ( ) const

Returns true if the plugin has started initialising but not completed yet.

This happens in the case of some external formats like AUv3. You can use this to show an indicator in your UI.

◆ flushPluginStateToValueTree()

void engine::ExternalPlugin::flushPluginStateToValueTree ( )
overridevirtual

Reimplemented from engine::Plugin.

◆ flushBusesLayoutToValueTree()

void engine::ExternalPlugin::flushBusesLayoutToValueTree ( )

Writes the current bus layout to the plugin's ValueTree state.

◆ restorePluginStateFromValueTree()

void engine::ExternalPlugin::restorePluginStateFromValueTree ( const juce::ValueTree & )
overridevirtual

Reimplemented from engine::AutomatableEditItem.

◆ getPluginStateFromTree()

void engine::ExternalPlugin::getPluginStateFromTree ( juce::MemoryBlock & )

Extracts the raw plugin state blob from the ValueTree.

◆ updateFromMirroredPluginIfNeeded()

void engine::ExternalPlugin::updateFromMirroredPluginIfNeeded ( Plugin & )
overridevirtual

Called to pull state from the mirrored master.

Override to apply format-specific state.

Reimplemented from engine::Plugin.

References engine::Plugin::Plugin().

◆ initialise()

void engine::ExternalPlugin::initialise ( const PluginInitialisationInfo & )
overridevirtual

Gives the plugin a chance to set itself up before being played.

This won't be called concurrently with the process thread.

The sample rate and the average block size - although the blocks won't always be the same, and may be bigger.

Don't call this directly or the initialise count will become out of sync.

See also
baseClassInitialise [[ message_thread ]]

Implements engine::Plugin.

◆ deinitialise()

void engine::ExternalPlugin::deinitialise ( )
overridevirtual

Called after play stops to release resources.

Don't call this directly or the initialise count will become out of sync.

See also
baseClassDeinitialise

Implements engine::Plugin.

◆ reset()

void engine::ExternalPlugin::reset ( )
overridevirtual

Should reset synth voices, tails, clear delay buffers, etc.

Reimplemented from engine::Plugin.

◆ midiPanic()

void engine::ExternalPlugin::midiPanic ( )
overridevirtual

Tells the plugin to turn off any playing notes, if applicable.

Reimplemented from engine::Plugin.

◆ setEnabled()

void engine::ExternalPlugin::setEnabled ( bool )
overridevirtual

Enable/disable the plugin.

Reimplemented from engine::Plugin.

References engine::Plugin::enabled.

◆ getReferencedItems()

juce::Array< Exportable::ReferencedItem > engine::ExternalPlugin::getReferencedItems ( )
overridevirtual

Implements engine::Exportable.

◆ reassignReferencedItem()

void engine::ExternalPlugin::reassignReferencedItem ( const ReferencedItem & ,
ProjectItemRef newRef,
double newStartTime )
overridevirtual

Implements engine::Exportable.

◆ applyToBuffer()

void engine::ExternalPlugin::applyToBuffer ( const PluginRenderContext & )
overridevirtual

Process the next block of data.

The incoming buffer will have an unknown number of channels, and the plugin has to deal with them however it wants to.

The buffer should be resized to the number of output channels that the plugin wants to return (which should be the same or less than the number of output channel names it returns from getChannelNames() - never more than this).

Implements engine::Plugin.

◆ producesAudioWhenNoAudioInput()

bool engine::ExternalPlugin::producesAudioWhenNoAudioInput ( )
overridevirtual

Returns true if the plugin can produce audio when its input is silent (e.g.

synths, plugins with tails, or plugins driven by automation).

Reimplemented from engine::Plugin.

References engine::AutomatableEditItem::isAutomationNeeded(), isSynth(), and noTail().

◆ getNumOutputChannelsGivenInputs()

int engine::ExternalPlugin::getNumOutputChannelsGivenInputs ( int numInputChannels)
overridevirtual

Returns the number of output channels this plugin will produce for track routing.

E.g. some might be able to do mono, so will return 1 if the input is 1, 2 if it is 2, etc.

The default impl returns the number of items that getChannelNames() returns. Subclasses with sidechain buses must override this to return only the main bus output count, since sidechain channels are routed separately.

Reimplemented from engine::Plugin.

◆ getBusses()

BusLayout engine::ExternalPlugin::getBusses ( ) const
overridevirtual

Returns the full input/output bus layout of this plugin.

Every concrete plugin must declare its bus topology here. Multi-out plugins (e.g. ExternalPlugin hosting a VST3 with multiple output buses) report each output bus as a separate entry in the returned layout's outputs list; the first entry is the main bus.

Consumers that only need the main bus can use e.g. getBusses().outputs.front().

Implements engine::Plugin.

◆ getChannelNames()

void engine::ExternalPlugin::getChannelNames ( juce::StringArray * ins,
juce::StringArray * outs )
overridevirtual

Fills the provided StringArrays with the names of this plugin's input and/or output channels.

Either pointer may be nullptr if not needed.

Reimplemented from engine::Plugin.

◆ isVST()

bool engine::ExternalPlugin::isVST ( ) const
noexcept

References desc.

◆ isVST3()

bool engine::ExternalPlugin::isVST3 ( ) const
noexcept

References desc.

◆ isAU()

bool engine::ExternalPlugin::isAU ( ) const
noexcept

References desc.

◆ getName()

juce::String engine::ExternalPlugin::getName ( ) const
overridevirtual

The name of the type, e.g.

"Compressor"

Implements engine::Plugin.

References desc.

Referenced by getTooltip().

◆ getVendor()

juce::String engine::ExternalPlugin::getVendor ( )
overridevirtual

Returns the plugin vendor/manufacturer name.

Reimplemented from engine::Plugin.

References desc.

◆ getTooltip()

juce::String engine::ExternalPlugin::getTooltip ( )
overridevirtual

Returns a tooltip string for UI display.

Reimplemented from engine::Plugin.

References getName().

◆ getPluginType()

juce::String engine::ExternalPlugin::getPluginType ( )
overridevirtual

Returns a string identifying the plugin type (used as the XML tag name).

Implements engine::Plugin.

References xmlTypeName.

◆ isSynth()

bool engine::ExternalPlugin::isSynth ( )
overridevirtual

Reimplemented from engine::Plugin.

References desc.

Referenced by producesAudioWhenNoAudioInput(), and takesAudioInput().

◆ takesMidiInput()

bool engine::ExternalPlugin::takesMidiInput ( )
overridevirtual

Reimplemented from engine::Plugin.

◆ takesAudioInput()

bool engine::ExternalPlugin::takesAudioInput ( )
overridevirtual

Returns true if this plugin should be fed audio from upstream in the chain.

The default derives from the bus layout: a non-synth that declares at least one audio input bus takes audio. Synths that also accept audio input (e.g. for wet/dry mix) should override to return true explicitly.

Reimplemented from engine::Plugin.

References dryGain, and isSynth().

◆ isMissing()

bool engine::ExternalPlugin::isMissing ( )
overridevirtual

Returns true if the plugin's backing file/DLL is missing (e.g.

uninstalled VST).

Reimplemented from engine::Plugin.

◆ isDisabled()

bool engine::ExternalPlugin::isDisabled ( )
overridevirtual

Returns true if the plugin has been forcibly disabled (e.g.

after a crash).

Reimplemented from engine::Plugin.

◆ getLatencySeconds()

double engine::ExternalPlugin::getLatencySeconds ( )
overridevirtual

Returns the plugin's processing latency in seconds.

Reimplemented from engine::Plugin.

◆ noTail()

bool engine::ExternalPlugin::noTail ( )
overridevirtual

Returns true if the plugin has no tail (i.e.

output is silent once input stops).

Reimplemented from engine::Plugin.

Referenced by producesAudioWhenNoAudioInput().

◆ getTailLength()

double engine::ExternalPlugin::getTailLength ( ) const
overridevirtual

Returns the length of the plugin's tail in seconds (e.g.

reverb decay).

Reimplemented from engine::Plugin.

◆ trackPropertiesChanged()

void engine::ExternalPlugin::trackPropertiesChanged ( )
overridevirtual

Track name or colour has changed.

Reimplemented from engine::Plugin.

◆ getWrappedAudioProcessor()

juce::AudioProcessor * engine::ExternalPlugin::getWrappedAudioProcessor ( ) const
overridevirtual

Returns the underlying juce::AudioProcessor, if this plugin wraps one.

Only ExternalPlugin returns non-null by default.

Reimplemented from engine::Plugin.

References getAudioPluginInstance().

◆ deleteFromParent()

void engine::ExternalPlugin::deleteFromParent ( )
overridevirtual

Attempts to delete this plugin, whether it's a master plugin, track plugin, etc.

This will call removeFromParent but also hide any automation parameters etc. being shown on tracks and hide plugin windows etc. Use this method if the plugin is being fully deleted from the Edit.

Reimplemented from engine::Plugin.

◆ getSelectableDescription()

juce::String engine::ExternalPlugin::getSelectableDescription ( )
overridevirtual

Subclasses must return a description of what they are.

Implements engine::Selectable.

◆ getFile()

juce::File engine::ExternalPlugin::getFile ( ) const

◆ getPluginUID()

juce::String engine::ExternalPlugin::getPluginUID ( ) const

References desc.

◆ getDebugName()

const char * engine::ExternalPlugin::getDebugName ( ) const
noexcept

◆ setBusesLayout()

bool engine::ExternalPlugin::setBusesLayout ( juce::AudioProcessor::BusesLayout )

Attempts to change the full bus layout of the wrapped plugin.

Temporarily stops playback to safely reconfigure.

◆ setBusLayout()

bool engine::ExternalPlugin::setBusLayout ( juce::AudioChannelSet ,
bool isInput,
int busIndex )

Attempts to change a single bus layout.

◆ getNumPrograms()

int engine::ExternalPlugin::getNumPrograms ( ) const

◆ getCurrentProgram()

int engine::ExternalPlugin::getCurrentProgram ( ) const

◆ getProgramName()

juce::String engine::ExternalPlugin::getProgramName ( int index)

◆ getNumberedProgramName()

juce::String engine::ExternalPlugin::getNumberedProgramName ( int i)

◆ getCurrentProgramName()

juce::String engine::ExternalPlugin::getCurrentProgramName ( )

◆ setCurrentProgram()

void engine::ExternalPlugin::setCurrentProgram ( int index,
bool sendChangeMessage )

◆ setCurrentProgramName()

void engine::ExternalPlugin::setCurrentProgramName ( const juce::String & name)

◆ hasNameForMidiProgram()

bool engine::ExternalPlugin::hasNameForMidiProgram ( int programNum,
int bank,
juce::String & name )
overridevirtual

Returns the name for a midi program, if there is one.

programNum = 0 to 127.

Reimplemented from engine::Plugin.

◆ hasNameForMidiNoteNumber()

bool engine::ExternalPlugin::hasNameForMidiNoteNumber ( int note,
int midiChannel,
juce::String & name )
overridevirtual

If it's a synth that names its notes, this can return the name it uses for this note 0-127.

Midi channel is 1-16

Reimplemented from engine::Plugin.

◆ getVSTXML()

const VSTXML * engine::ExternalPlugin::getVSTXML ( ) const
noexcept

◆ getAudioPluginInstance()

juce::AudioPluginInstance * engine::ExternalPlugin::getAudioPluginInstance ( ) const

Returns the underlying juce::AudioPluginInstance, or nullptr if not yet loaded.

Referenced by getWrappedAudioProcessor().

◆ setDeletesPluginInstanceSynchronously()

void engine::ExternalPlugin::setDeletesPluginInstanceSynchronously ( bool shouldDeleteSynchronously)
noexcept

If enabled, the wrapped juce::AudioPluginInstance is destroyed synchronously when this plugin is deleted rather than via the shared asynchronous deleter.

ARA-bound instances need this: the ARA spec requires a bound plugin instance to be destroyed before the document controller it is bound to.

◆ getActiveNotes()

ActiveNoteList engine::ExternalPlugin::getActiveNotes ( ) const

◆ createEditor()

std::unique_ptr< EditorComponent > engine::ExternalPlugin::createEditor ( )
overridevirtual

Creates a custom editor component for this plugin, or nullptr if none.

Reimplemented from engine::Plugin.

◆ getTotalNumInputChannels()

int engine::ExternalPlugin::getTotalNumInputChannels ( ) const

Member Data Documentation

◆ xmlTypeName

const char* engine::ExternalPlugin::xmlTypeName
static

Referenced by getPluginType().

◆ desc

juce::PluginDescription engine::ExternalPlugin::desc

The plugin's description (format, name, manufacturer, file path, etc.).

Referenced by getIdentifierString(), getName(), getPluginUID(), getVendor(), isAU(), isSynth(), isVST(), and isVST3().

◆ dryValue

juce::CachedValue<float> engine::ExternalPlugin::dryValue

Dry/wet mix values and their automatable parameters.

◆ wetValue

juce::CachedValue<float> engine::ExternalPlugin::wetValue

◆ dryGain

AutomatableParameter::Ptr engine::ExternalPlugin::dryGain

Referenced by takesAudioInput().

◆ wetGain

AutomatableParameter::Ptr engine::ExternalPlugin::wetGain

The documentation for this class was generated from the following file: