iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IPlugProcessor Class Referenceabstract

The base class for IPlug Audio Processing. More...

#include <IPlugProcessor.h>

Inheritance diagram for IPlugProcessor:
[legend]

Public Member Functions

 IPlugProcessor (const Config &config, EAPI plugAPI)
 IPlugProcessor constructor. More...
 
 IPlugProcessor (const IPlugProcessor &)=delete
 
IPlugProcessoroperator= (const IPlugProcessor &)=delete
 
virtual void ProcessBlock (sample **inputs, sample **outputs, int nFrames)
 Override in your plug-in class to process audio In ProcessBlock you are always guaranteed to get valid pointers to all the channels the plugin requested (the maximum possible input channel count and the maximum possible output channel count including multiple buses). More...
 
virtual void ProcessMidiMsg (const IMidiMsg &msg)
 Override this method to handle incoming MIDI messages. More...
 
virtual void ProcessSysEx (ISysEx &msg)
 Override this method to handle incoming MIDI System Exclusive (SysEx) messages. More...
 
virtual void OnReset ()
 Override this method in your plug-in class to do something prior to playback etc. More...
 
virtual void OnActivate (bool active)
 Override OnActivate() which should be called by the API class when a plug-in is "switched on" by the host on a track when the channel count is known. More...
 
virtual bool SendMidiMsg (const IMidiMsg &msg)=0
 Send a single MIDI message // TODO: info about what thread should this be called on or not called on! More...
 
virtual bool SendMidiMsgs (WDL_TypedBuf< IMidiMsg > &msgs)
 Send a collection of MIDI messages // TODO: info about what thread should this be called on or not called on! More...
 
virtual bool SendSysEx (const ISysEx &msg)
 Send a single MIDI System Exclusive (SysEx) message // TODO: info about what thread should this be called on or not called on! More...
 
double GetSampleRate () const
 
int GetBlockSize () const
 
int GetLatency () const
 
int GetTailSize ()
 
bool GetBypassed () const
 
bool GetRenderingOffline () const
 
double GetSamplePos () const
 
double GetTempo () const
 
double GetPPQPos () const
 
bool GetTransportIsRunning () const
 
double GetSamplesPerBeat () const
 
void GetTimeSig (int &numerator, int &denominator) const
 
virtual void GetBusName (ERoute direction, int busIdx, int nBuses, WDL_String &str) const
 Get the name for a particular bus. More...
 
int NIOConfigs () const
 
const IOConfigGetIOConfig (int idx) const
 
int GetIOConfigWithChanCounts (std::vector< int > &inputBuses, std::vector< int > &outputBuses)
 
int MaxNBuses (ERoute direction, int *pConfigIdxWithTheMostBuses=nullptr) const
 Used to determine the maximum number of input or output buses based on what was specified in the channel I/O config string. More...
 
int MaxNChannelsForBus (ERoute direction, int busIdx) const
 For a given input or output bus what is the maximum possible number of channels. More...
 
bool HasWildcardBus (ERoute direction) const
 Check if we have any wildcard characters in the channel I/O configs. More...
 
int MaxNChannels (ERoute direction) const
 
bool IsChannelConnected (ERoute direction, int chIdx) const
 
int NChannelsConnected (ERoute direction) const
 
int NInChansConnected () const
 Convenience method to find out how many input channels are connected. More...
 
int NOutChansConnected () const
 Convenience method to find out how many output channels are connected. More...
 
bool LegalIO (int NInputChans, int NOutputChans) const
 Check if a certain configuration of input channels and output channels is allowed based on the channel I/O configs. More...
 
bool HasSidechainInput () const
 
void LimitToStereoIO ()
 This is called by IPlugVST in order to limit a plug-in to stereo I/O for certain picky hosts. More...
 
bool IsInstrument () const
 
bool IsMidiEffect () const
 
int GetAUPluginType () const
 
bool DoesMIDIIn () const
 
bool DoesMIDIOut () const
 
bool DoesMPE () const
 
void SetChannelLabel (ERoute direction, int idx, const char *formatStr, bool zeroBased=false)
 This allows you to label input/output channels in supporting VST2 hosts. More...
 
virtual void SetLatency (int latency)
 Call this if the latency of your plug-in changes after initialization (perhaps from OnReset() ) This may not be supported by the host. More...
 
void SetTailSize (int tailSize)
 Call this method if you need to update the tail size at runtime, for example if the decay time of your reverb effect changes Some apis have special interpretations of certain numbers. More...
 

Static Public Member Functions

static int ParseChannelIOStr (const char *IOStr, WDL_PtrList< IOConfig > &channelIOList, int &totalNInChans, int &totalNOutChans, int &totalNInBuses, int &totalNOutBuses)
 A static method to parse the config.h channel I/O string. More...
 

Protected Member Functions

void SetChannelConnections (ERoute direction, int idx, int n, bool connected)
 
void InitLatencyDelay ()
 
void AttachBuffers (ERoute direction, int idx, int n, PLUG_SAMPLE_DST **ppData, int nFrames)
 
void AttachBuffers (ERoute direction, int idx, int n, PLUG_SAMPLE_SRC **ppData, int nFrames)
 
void PassThroughBuffers (PLUG_SAMPLE_SRC type, int nFrames)
 
void PassThroughBuffers (PLUG_SAMPLE_DST type, int nFrames)
 
void ProcessBuffers (PLUG_SAMPLE_SRC type, int nFrames)
 
void ProcessBuffers (PLUG_SAMPLE_DST type, int nFrames)
 
void ProcessBuffersAccumulating (int nFrames)
 
void ZeroScratchBuffers ()
 
void SetSampleRate (double sampleRate)
 
void SetBlockSize (int blockSize)
 
void SetBypassed (bool bypassed)
 
void SetTimeInfo (const ITimeInfo &timeInfo)
 
void SetRenderingOffline (bool renderingOffline)
 
const WDL_String & GetChannelLabel (ERoute direction, int idx)
 

Protected Attributes

ITimeInfo mTimeInfo
 Contains detailed information about the transport state. More...
 

Detailed Description

The base class for IPlug Audio Processing.

It knows nothing about presets or parameters or user interface.

Definition at line 40 of file IPlugProcessor.h.

Constructor & Destructor Documentation

◆ IPlugProcessor()

IPlugProcessor::IPlugProcessor ( const Config &  config,
EAPI  plugAPI 
)

IPlugProcessor constructor.

Parameters
config
Todo:
Parameters
plugAPI
Todo:

Definition at line 24 of file IPlugProcessor.cpp.

References ParseChannelIOStr().

◆ ~IPlugProcessor()

IPlugProcessor::~IPlugProcessor ( )
virtual

Definition at line 61 of file IPlugProcessor.cpp.

Member Function Documentation

◆ AttachBuffers() [1/2]

void IPlugProcessor::AttachBuffers ( ERoute  direction,
int  idx,
int  n,
PLUG_SAMPLE_DST **  ppData,
int  nFrames 
)
protected

Definition at line 451 of file IPlugProcessor.cpp.

◆ AttachBuffers() [2/2]

void IPlugProcessor::AttachBuffers ( ERoute  direction,
int  idx,
int  n,
PLUG_SAMPLE_SRC **  ppData,
int  nFrames 
)
protected

Definition at line 466 of file IPlugProcessor.cpp.

◆ DoesMIDIIn()

bool IPlugProcessor::DoesMIDIIn ( ) const
inline
Returns
true if the plug-in was configured to receive midi at compile time

Definition at line 216 of file IPlugProcessor.h.

Referenced by GetAUPluginType().

◆ DoesMIDIOut()

bool IPlugProcessor::DoesMIDIOut ( ) const
inline
Returns
true if the plug-in was configured to receive midi at compile time

Definition at line 219 of file IPlugProcessor.h.

Referenced by IPlugAPP::SendMidiMsg(), and IPlugAPP::SendSysEx().

◆ DoesMPE()

bool IPlugProcessor::DoesMPE ( ) const
inline
Returns
true if the plug-in was configured to support midi polyphonic expression at compile time

Definition at line 222 of file IPlugProcessor.h.

◆ GetAUPluginType()

int IPlugProcessor::GetAUPluginType ( ) const
Returns
int The 4Char identifier for the type of audiounit plugin, e.g. 'aufx' for an effect audiounit

Definition at line 403 of file IPlugProcessor.cpp.

References DoesMIDIIn().

◆ GetBlockSize()

int IPlugProcessor::GetBlockSize ( ) const
inline
Returns
Maximum block size in samples, actual blocksize may vary each ProcessBlock()

Definition at line 104 of file IPlugProcessor.h.

◆ GetBusName()

void IPlugProcessor::GetBusName ( ERoute  direction,
int  busIdx,
int  nBuses,
WDL_String &  str 
) const
virtual

Get the name for a particular bus.

Parameters
directionInput or output bus
busIdxThe index of the bus
nBusesThe total number of buses for this direction
strString to fill with the bus name

Definition at line 119 of file IPlugProcessor.cpp.

◆ GetBypassed()

bool IPlugProcessor::GetBypassed ( ) const
inline
Returns
true if the plugin is currently bypassed

Definition at line 113 of file IPlugProcessor.h.

◆ GetChannelLabel()

const WDL_String & IPlugProcessor::GetChannelLabel ( ERoute  direction,
int  idx 
)
inlineprotected

Definition at line 276 of file IPlugProcessor.h.

◆ GetIOConfig()

const IOConfig * IPlugProcessor::GetIOConfig ( int  idx) const
inline
Returns
const Pointer to an IOConfig at idx. Can return nullptr if idx is invalid

Definition at line 151 of file IPlugProcessor.h.

Referenced by GetIOConfigWithChanCounts(), LegalIO(), and MaxNChannelsForBus().

◆ GetIOConfigWithChanCounts()

int IPlugProcessor::GetIOConfigWithChanCounts ( std::vector< int > &  inputBuses,
std::vector< int > &  outputBuses 
)
Returns
Index of IOConfig that matches input and output bus vectors. Can return -1 if not found

Definition at line 175 of file IPlugProcessor.cpp.

References IOConfig::GetBusInfo(), GetIOConfig(), IOConfig::NBuses(), and NIOConfigs().

◆ GetLatency()

int IPlugProcessor::GetLatency ( ) const
inline
Returns
Plugin latency (in samples)

Definition at line 107 of file IPlugProcessor.h.

◆ GetPPQPos()

double IPlugProcessor::GetPPQPos ( ) const
inline
Returns
The number of beats elapsed since start of project timeline.

Definition at line 126 of file IPlugProcessor.h.

References mTimeInfo.

◆ GetRenderingOffline()

bool IPlugProcessor::GetRenderingOffline ( ) const
inline
Returns
true if the plugin is currently rendering off-line

Definition at line 116 of file IPlugProcessor.h.

◆ GetSamplePos()

double IPlugProcessor::GetSamplePos ( ) const
inline
Returns
The number of samples elapsed since start of project timeline.

Definition at line 120 of file IPlugProcessor.h.

References mTimeInfo.

◆ GetSampleRate()

double IPlugProcessor::GetSampleRate ( ) const
inline
Returns
Sample rate (in Hz)

Definition at line 101 of file IPlugProcessor.h.

Referenced by GetSamplesPerBeat().

◆ GetSamplesPerBeat()

double IPlugProcessor::GetSamplesPerBeat ( ) const
Returns
The number of samples in a beat

Definition at line 107 of file IPlugProcessor.cpp.

References GetSampleRate(), and GetTempo().

◆ GetTailSize()

int IPlugProcessor::GetTailSize ( )
inline
Returns
The tail size in samples (useful for reverberation plug-ins, that may need to decay after the transport stops or an audio item ends)

Definition at line 110 of file IPlugProcessor.h.

◆ GetTempo()

double IPlugProcessor::GetTempo ( ) const
inline
Returns
The tempo in beats per minute

Definition at line 123 of file IPlugProcessor.h.

References mTimeInfo.

Referenced by GetSamplesPerBeat().

◆ GetTimeSig()

void IPlugProcessor::GetTimeSig ( int &  numerator,
int &  denominator 
) const
inline
Parameters
numeratorThe upper part of the current time signature e.g "6" in the time signature 6/8
denominatorThe lower part of the current time signature e.g "8" in the time signature 6/8

Definition at line 136 of file IPlugProcessor.h.

References mTimeInfo.

◆ GetTransportIsRunning()

bool IPlugProcessor::GetTransportIsRunning ( ) const
inline
Returns
true if the transport is running

Definition at line 129 of file IPlugProcessor.h.

References mTimeInfo.

◆ HasSidechainInput()

bool IPlugProcessor::HasSidechainInput ( ) const
inline
Returns
true if this plug-in has a side-chain input, which may not necessarily be active in the current I/O config

Definition at line 201 of file IPlugProcessor.h.

References MaxNBuses().

◆ HasWildcardBus()

bool IPlugProcessor::HasWildcardBus ( ERoute  direction) const
inline

Check if we have any wildcard characters in the channel I/O configs.

Parameters
directionReturn input or output bus count
Returns
true if the bus has a wildcard, meaning it should work on any number of channels

Definition at line 171 of file IPlugProcessor.h.

Referenced by MaxNChannelsForBus().

◆ InitLatencyDelay()

void IPlugProcessor::InitLatencyDelay ( )
protected

Definition at line 442 of file IPlugProcessor.cpp.

◆ IsChannelConnected()

bool IPlugProcessor::IsChannelConnected ( ERoute  direction,
int  chIdx 
) const
inline
Parameters
directionWhether you want to test inputs or outputs
chIdxchannel index
Returns
true if the host has connected this channel

Definition at line 180 of file IPlugProcessor.h.

Referenced by NChannelsConnected().

◆ IsInstrument()

bool IPlugProcessor::IsInstrument ( ) const
inline
Returns
true if the plug-in was configured as an instrument at compile time

Definition at line 207 of file IPlugProcessor.h.

◆ IsMidiEffect()

bool IPlugProcessor::IsMidiEffect ( ) const
inline
Returns
true if the plug-in was configured as an MFX at compile time

Definition at line 210 of file IPlugProcessor.h.

◆ LegalIO()

bool IPlugProcessor::LegalIO ( int  NInputChans,
int  NOutputChans 
) const

Check if a certain configuration of input channels and output channels is allowed based on the channel I/O configs.

Parameters
NInputChansNumber of inputs to test, if set to -1 = check NOutputChans only
NOutputChansNumber of outputs to test, if set to -1 = check NInputChans only
Returns
true if the configurations is valid

Definition at line 243 of file IPlugProcessor.cpp.

References GetIOConfig(), IOConfig::GetTotalNChannels(), and NIOConfigs().

◆ LimitToStereoIO()

void IPlugProcessor::LimitToStereoIO ( )

This is called by IPlugVST in order to limit a plug-in to stereo I/O for certain picky hosts.

Todo:
may no longer be relevant

Definition at line 257 of file IPlugProcessor.cpp.

References MaxNChannels().

Referenced by IPlugVST2::HostSpecificInit().

◆ MaxNBuses()

int IPlugProcessor::MaxNBuses ( ERoute  direction,
int *  pConfigIdxWithTheMostBuses = nullptr 
) const

Used to determine the maximum number of input or output buses based on what was specified in the channel I/O config string.

Parameters
directionReturn input or output bus count
pConfigIdxWithTheMostBusesOptional ptr to report the index of the config with the max bus count, if multiple configs have the same bus count, this should report the one with the higher channel count
Returns
The maximum bus count across all channel I/O configs

Definition at line 152 of file IPlugProcessor.cpp.

References IOConfig::NBuses(), and NIOConfigs().

Referenced by HasSidechainInput(), and MaxNChannelsForBus().

◆ MaxNChannels()

int IPlugProcessor::MaxNChannels ( ERoute  direction) const
inline
Parameters
directionWhether you want to test inputs or outputs
Returns
Total number of input or output channel buffers (not necessarily connected)

Definition at line 175 of file IPlugProcessor.h.

Referenced by IPlugVST2::HostSpecificInit(), LimitToStereoIO(), and SetChannelLabel().

◆ MaxNChannelsForBus()

int IPlugProcessor::MaxNChannelsForBus ( ERoute  direction,
int  busIdx 
) const

For a given input or output bus what is the maximum possible number of channels.

This method is not Realtime safe.

Parameters
directionReturn input or output bus count
busIdxThe index of the bus to look up
Returns
return The maximum number of channels on that bus

Definition at line 209 of file IPlugProcessor.cpp.

References GetIOConfig(), HasWildcardBus(), MaxNBuses(), IOConfig::NChansOnBusSAFE(), and NIOConfigs().

◆ NChannelsConnected()

int IPlugProcessor::NChannelsConnected ( ERoute  direction) const
Parameters
directionWhether you want to test inputs or outputs
Returns
The number of channels connected for input/output. WARNING: this assumes consecutive channel connections

Definition at line 230 of file IPlugProcessor.cpp.

References IsChannelConnected().

Referenced by NInChansConnected(), and NOutChansConnected().

◆ NInChansConnected()

int IPlugProcessor::NInChansConnected ( ) const
inline

Convenience method to find out how many input channels are connected.

Returns
The number of channels connected for input. WARNING: this assumes consecutive channel connections

Definition at line 188 of file IPlugProcessor.h.

References NChannelsConnected().

◆ NIOConfigs()

int IPlugProcessor::NIOConfigs ( ) const
inline
Returns
The number of channel I/O configs derived from the channel io string

Definition at line 148 of file IPlugProcessor.h.

Referenced by GetIOConfigWithChanCounts(), LegalIO(), MaxNBuses(), and MaxNChannelsForBus().

◆ NOutChansConnected()

int IPlugProcessor::NOutChansConnected ( ) const
inline

Convenience method to find out how many output channels are connected.

Returns
The number of channels connected for output. WARNING: this assumes consecutive channel connections

Definition at line 192 of file IPlugProcessor.h.

References NChannelsConnected().

◆ OnActivate()

virtual void IPlugProcessor::OnActivate ( bool  active)
inlinevirtual

Override OnActivate() which should be called by the API class when a plug-in is "switched on" by the host on a track when the channel count is known.

This may not work reliably because different hosts have different interpretations of "activate". Unlike OnReset() which called when the transport is reset or the sample rate changes OnActivate() is a good place to handle change of I/O connections.

Parameters
activetrue if the host has activated the plug-in

Definition at line 81 of file IPlugProcessor.h.

◆ OnReset()

virtual void IPlugProcessor::OnReset ( )
inlinevirtual

Override this method in your plug-in class to do something prior to playback etc.

(e.g.clear buffers, update internal DSP with the latest sample rate)

Definition at line 75 of file IPlugProcessor.h.

◆ ParseChannelIOStr()

int IPlugProcessor::ParseChannelIOStr ( const char *  IOStr,
WDL_PtrList< IOConfig > &  channelIOList,
int &  totalNInChans,
int &  totalNOutChans,
int &  totalNInBuses,
int &  totalNOutBuses 
)
static

A static method to parse the config.h channel I/O string.

Parameters
IOStrSpace separated cstring list of I/O configurations for this plug-in in the format ninchans-noutchans. A hypen character (-) deliminates input-output. Supports multiple buses, which are indicated using a period (.) character. For instance plug-in that supports mono input and mono output with a mono side-chain input could have a channel io string of "1.1-1". A drum synthesiser with four stereo output busses could be configured with a io string of "0-2.2.2.2";
channelIOListA list of pointers to ChannelIO structs, where we will store here
totalNInChansThe total number of input channels across all buses will be stored here
totalNOutChansThe total number of output channels across all buses will be stored here
totalNInBusesThe total number of input buses across all channel I/O configs will be stored here
totalNOutBusesThe total number of output buses across all channel I/O configs will be stored here
Returns
The number of space separated channel I/O configs that have been detected in IOStr

Definition at line 281 of file IPlugProcessor.cpp.

References IOConfig::NChansOnBusSAFE().

Referenced by IPlugProcessor().

◆ PassThroughBuffers() [1/2]

void IPlugProcessor::PassThroughBuffers ( PLUG_SAMPLE_DST  type,
int  nFrames 
)
protected

Definition at line 493 of file IPlugProcessor.cpp.

◆ PassThroughBuffers() [2/2]

void IPlugProcessor::PassThroughBuffers ( PLUG_SAMPLE_SRC  type,
int  nFrames 
)
protected

Definition at line 501 of file IPlugProcessor.cpp.

◆ ProcessBlock()

void IPlugProcessor::ProcessBlock ( sample **  inputs,
sample **  outputs,
int  nFrames 
)
virtual

Override in your plug-in class to process audio In ProcessBlock you are always guaranteed to get valid pointers to all the channels the plugin requested (the maximum possible input channel count and the maximum possible output channel count including multiple buses).

If the host hasn't connected all the pins, the unconnected channels will be full of zeros. THIS METHOD IS CALLED BY THE HIGH PRIORITY AUDIO THREAD - You should be careful not to do any unbounded, blocking operations such as file I/O which could cause audio dropouts

Parameters
inputsTwo-dimensional array containing the non-interleaved input buffers of audio samples for all channels
outputsTwo-dimensional array for audio output (non-interleaved).
nFramesThe block size for this block: number of samples per channel.

Definition at line 70 of file IPlugProcessor.cpp.

◆ ProcessBuffers() [1/2]

void IPlugProcessor::ProcessBuffers ( PLUG_SAMPLE_DST  type,
int  nFrames 
)
protected

Definition at line 519 of file IPlugProcessor.cpp.

◆ ProcessBuffers() [2/2]

void IPlugProcessor::ProcessBuffers ( PLUG_SAMPLE_SRC  type,
int  nFrames 
)
protected

Definition at line 524 of file IPlugProcessor.cpp.

◆ ProcessBuffersAccumulating()

void IPlugProcessor::ProcessBuffersAccumulating ( int  nFrames)
protected

Definition at line 541 of file IPlugProcessor.cpp.

◆ ProcessMidiMsg()

void IPlugProcessor::ProcessMidiMsg ( const IMidiMsg msg)
virtual

Override this method to handle incoming MIDI messages.

The method is called prior to ProcessBlock(). You can use IMidiQueue in combination with this method in order to queue the message and process at the appropriate time in ProcessBlock() THIS METHOD IS CALLED BY THE HIGH PRIORITY AUDIO THREAD - You should be careful not to do any unbounded, blocking operations such as file I/O which could cause audio dropouts

Parameters
msgThe incoming midi message (includes a timestamp to indicate the offset in the forthcoming block of audio to be processed in ProcessBlock())

Definition at line 91 of file IPlugProcessor.cpp.

References SendMidiMsg().

◆ ProcessSysEx()

virtual void IPlugProcessor::ProcessSysEx ( ISysEx msg)
inlinevirtual

Override this method to handle incoming MIDI System Exclusive (SysEx) messages.

The method is called prior to ProcessBlock(). THIS METHOD IS CALLED BY THE HIGH PRIORITY AUDIO THREAD - You should be careful not to do any unbounded, blocking operations such as file I/O which could cause audio dropouts

Definition at line 72 of file IPlugProcessor.h.

◆ SendMidiMsg()

virtual bool IPlugProcessor::SendMidiMsg ( const IMidiMsg msg)
pure virtual

Send a single MIDI message // TODO: info about what thread should this be called on or not called on!

Parameters
msgThe IMidiMsg to send
Returns
true if successful

Implemented in IPlugAAX, IPlugAPP, IPlugAU, IPlugAUv3, IPlugVST2, IPlugVST3ProcessorBase, and IPlugWAM.

Referenced by ProcessMidiMsg(), and SendMidiMsgs().

◆ SendMidiMsgs()

bool IPlugProcessor::SendMidiMsgs ( WDL_TypedBuf< IMidiMsg > &  msgs)
virtual

Send a collection of MIDI messages // TODO: info about what thread should this be called on or not called on!

Parameters
msgsThe IMidiMsg to send
Returns
true if successful

Reimplemented in IPlugAU.

Definition at line 96 of file IPlugProcessor.cpp.

References SendMidiMsg().

◆ SendSysEx()

virtual bool IPlugProcessor::SendSysEx ( const ISysEx msg)
inlinevirtual

Send a single MIDI System Exclusive (SysEx) message // TODO: info about what thread should this be called on or not called on!

Parameters
msgThe ISysEx to send
Returns
true if successful

Reimplemented in IPlugAPP, IPlugAU, IPlugAUv3, IPlugVST2, and IPlugWAM.

Definition at line 98 of file IPlugProcessor.h.

◆ SetBlockSize()

void IPlugProcessor::SetBlockSize ( int  blockSize)
protected

Definition at line 579 of file IPlugProcessor.cpp.

◆ SetBypassed()

void IPlugProcessor::SetBypassed ( bool  bypassed)
inlineprotected

Definition at line 273 of file IPlugProcessor.h.

◆ SetChannelConnections()

void IPlugProcessor::SetChannelConnections ( ERoute  direction,
int  idx,
int  n,
bool  connected 
)
protected

Definition at line 426 of file IPlugProcessor.cpp.

◆ SetChannelLabel()

void IPlugProcessor::SetChannelLabel ( ERoute  direction,
int  idx,
const char *  formatStr,
bool  zeroBased = false 
)

This allows you to label input/output channels in supporting VST2 hosts.

  • For example a 4 channel plug-in that deals with FuMa BFormat first order ambisonic material, might label these channels "W", "X", "Y", "Z", rather than the default "input 1", "input 2", "input 3", "input 4"
    Parameters
    idxThe index of the channel that you wish to label
    formatStrprintf style format string to compose label for the channel - where i will be the channel index
    zeroBasedIf true the index in the format string will be zero based

Definition at line 266 of file IPlugProcessor.cpp.

References MaxNChannels().

◆ SetLatency()

void IPlugProcessor::SetLatency ( int  latency)
virtual

Call this if the latency of your plug-in changes after initialization (perhaps from OnReset() ) This may not be supported by the host.

The method is virtual because it's overridden in API classes.

Parameters
latencyLatency in samples

Reimplemented in IPlugAAX, IPlugAU, IPlugVST2, IPlugVST3, and IPlugWAM.

Definition at line 272 of file IPlugProcessor.cpp.

Referenced by IPlugAAX::SetLatency(), IPlugAU::SetLatency(), IPlugVST2::SetLatency(), and IPlugVST3::SetLatency().

◆ SetRenderingOffline()

void IPlugProcessor::SetRenderingOffline ( bool  renderingOffline)
inlineprotected

Definition at line 275 of file IPlugProcessor.h.

◆ SetSampleRate()

void IPlugProcessor::SetSampleRate ( double  sampleRate)
inlineprotected

Definition at line 271 of file IPlugProcessor.h.

◆ SetTailSize()

void IPlugProcessor::SetTailSize ( int  tailSize)
inline

Call this method if you need to update the tail size at runtime, for example if the decay time of your reverb effect changes Some apis have special interpretations of certain numbers.

For VST3 set to 0xffffffff for infinite tail, or 0 for none (default) For VST2 setting to 1 means no tail

Parameters
tailSizethe new tailsize in samples

Definition at line 241 of file IPlugProcessor.h.

◆ SetTimeInfo()

void IPlugProcessor::SetTimeInfo ( const ITimeInfo timeInfo)
inlineprotected

Definition at line 274 of file IPlugProcessor.h.

◆ ZeroScratchBuffers()

void IPlugProcessor::ZeroScratchBuffers ( )
protected

Definition at line 562 of file IPlugProcessor.cpp.

Member Data Documentation

◆ mTimeInfo

ITimeInfo IPlugProcessor::mTimeInfo
protected

Contains detailed information about the transport state.

Definition at line 309 of file IPlugProcessor.h.

Referenced by GetPPQPos(), GetSamplePos(), GetTempo(), GetTimeSig(), and GetTransportIsRunning().


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