Carla Backend
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
CarlaPlugin Class Referenceabstract

#include <CarlaPlugin.hpp>

Classes

class  ScopedDisabler
 
class  ScopedSingleProcessLocker
 

Public Member Functions

virtual ~CarlaPlugin ()
 
virtual PluginType getType () const noexcept=0
 
uint getId () const noexcept
 
uint getHints () const noexcept
 
uint getOptionsEnabled () const noexcept
 
bool isEnabled () const noexcept
 
const char * getName () const noexcept
 
const char * getFilename () const noexcept
 
const char * getIconName () const noexcept
 
virtual PluginCategory getCategory () const noexcept
 
virtual int64_t getUniqueId () const noexcept
 
virtual uint32_t getLatencyInFrames () const noexcept
 
uint32_t getAudioInCount () const noexcept
 
uint32_t getAudioOutCount () const noexcept
 
uint32_t getCVInCount () const noexcept
 
uint32_t getCVOutCount () const noexcept
 
virtual uint32_t getMidiInCount () const noexcept
 
virtual uint32_t getMidiOutCount () const noexcept
 
uint32_t getParameterCount () const noexcept
 
virtual uint32_t getParameterScalePointCount (uint32_t parameterId) const noexcept
 
uint32_t getProgramCount () const noexcept
 
uint32_t getMidiProgramCount () const noexcept
 
uint32_t getCustomDataCount () const noexcept
 
int32_t getCurrentProgram () const noexcept
 
int32_t getCurrentMidiProgram () const noexcept
 
const ParameterDatagetParameterData (uint32_t parameterId) const noexcept
 
const ParameterRanges & getParameterRanges (uint32_t parameterId) const noexcept
 
bool isParameterOutput (uint32_t parameterId) const noexcept
 
const MidiProgramDatagetMidiProgramData (uint32_t index) const noexcept
 
const CustomDatagetCustomData (uint32_t index) const noexcept
 
virtual std::size_t getChunkData (void **dataPtr) noexcept
 
virtual uint getOptionsAvailable () const noexcept
 
virtual float getParameterValue (uint32_t parameterId) const noexcept
 
virtual float getParameterScalePointValue (uint32_t parameterId, uint32_t scalePointId) const noexcept
 
 __attribute__ ((warn_unused_result)) virtual bool getLabel(char *strBuf) const noexcept
 
 __attribute__ ((warn_unused_result)) virtual bool getMaker(char *strBuf) const noexcept
 
 __attribute__ ((warn_unused_result)) virtual bool getCopyright(char *strBuf) const noexcept
 
 __attribute__ ((warn_unused_result)) virtual bool getRealName(char *strBuf) const noexcept
 
 __attribute__ ((warn_unused_result)) virtual bool getParameterName(uint32_t parameterId
 
 __attribute__ ((warn_unused_result)) virtual bool getParameterSymbol(uint32_t parameterId
 
 __attribute__ ((warn_unused_result)) virtual bool getParameterText(uint32_t parameterId
 
 __attribute__ ((warn_unused_result)) virtual bool getParameterUnit(uint32_t parameterId
 
 __attribute__ ((warn_unused_result)) virtual bool getParameterComment(uint32_t parameterId
 
 __attribute__ ((warn_unused_result)) virtual bool getParameterGroupName(uint32_t parameterId
 
 __attribute__ ((warn_unused_result)) virtual bool getParameterScalePointLabel(uint32_t parameterId
 
float getInternalParameterValue (int32_t parameterId) const noexcept
 
 __attribute__ ((warn_unused_result)) bool getProgramName(uint32_t index
 
 __attribute__ ((warn_unused_result)) bool getMidiProgramName(uint32_t index
 
void getParameterCountInfo (uint32_t &ins, uint32_t &outs) const noexcept
 
virtual void prepareForSave (bool temporary)
 
virtual void resetParameters () noexcept
 
virtual void randomizeParameters () noexcept
 
const CarlaStateSave & getStateSave (bool callPrepareForSave=true)
 
void loadStateSave (const CarlaStateSave &stateSave)
 
bool saveStateToFile (const char *filename)
 
bool loadStateFromFile (const char *filename)
 
bool exportAsLV2 (const char *lv2path)
 
virtual void setId (uint newId) noexcept
 
virtual void setName (const char *newName)
 
virtual void setOption (uint option, bool yesNo, bool sendCallback)
 
void setEnabled (bool yesNo) noexcept
 
void setActive (bool active, bool sendOsc, bool sendCallback) noexcept
 
void setDryWet (float value, bool sendOsc, bool sendCallback) noexcept
 
void setVolume (float value, bool sendOsc, bool sendCallback) noexcept
 
void setBalanceLeft (float value, bool sendOsc, bool sendCallback) noexcept
 
void setBalanceRight (float value, bool sendOsc, bool sendCallback) noexcept
 
void setPanning (float value, bool sendOsc, bool sendCallback) noexcept
 
void setDryWetRT (float value, bool sendCallbackLater) noexcept
 
void setVolumeRT (float value, bool sendCallbackLater) noexcept
 
void setBalanceLeftRT (float value, bool sendCallbackLater) noexcept
 
void setBalanceRightRT (float value, bool sendCallbackLater) noexcept
 
void setPanningRT (float value, bool sendCallbackLater) noexcept
 
virtual void setCtrlChannel (int8_t channel, bool sendOsc, bool sendCallback) noexcept
 
virtual void setParameterValue (uint32_t parameterId, float value, bool sendGui, bool sendOsc, bool sendCallback) noexcept
 
virtual void setParameterValueRT (uint32_t parameterId, float value, bool sendCallbackLater) noexcept
 
void setParameterValueByRealIndex (int32_t rindex, float value, bool sendGui, bool sendOsc, bool sendCallback) noexcept
 
virtual void setParameterMidiChannel (uint32_t parameterId, uint8_t channel, bool sendOsc, bool sendCallback) noexcept
 
virtual void setParameterMappedControlIndex (uint32_t parameterId, int16_t index, bool sendOsc, bool sendCallback, bool reconfigureNow) noexcept
 
virtual void setParameterMappedRange (uint32_t parameterId, float minimum, float maximum, bool sendOsc, bool sendCallback) noexcept
 
virtual void setCustomData (const char *type, const char *key, const char *value, bool sendGui)
 
virtual void setChunkData (const void *data, std::size_t dataSize)
 
virtual void setProgram (int32_t index, bool sendGui, bool sendOsc, bool sendCallback, bool doingInit=false) noexcept
 
virtual void setMidiProgram (int32_t index, bool sendGui, bool sendOsc, bool sendCallback, bool doingInit=false) noexcept
 
void setMidiProgramById (uint32_t bank, uint32_t program, bool sendGui, bool sendOsc, bool sendCallback) noexcept
 
virtual void setProgramRT (uint32_t index, bool sendCallbackLater) noexcept
 
virtual void setMidiProgramRT (uint32_t index, bool sendCallbackLater) noexcept
 
virtual void reload ()=0
 
virtual void reloadPrograms (bool doInit)
 
virtual void process (const float *const *audioIn, float **audioOut, const float *const *cvIn, float **cvOut, uint32_t frames)=0
 
virtual void bufferSizeChanged (uint32_t newBufferSize)
 
virtual void sampleRateChanged (double newSampleRate)
 
virtual void offlineModeChanged (bool isOffline)
 
virtual void idle ()
 
bool tryLock (bool forcedOffline) noexcept
 
void unlock () noexcept
 
virtual void initBuffers () const noexcept
 
virtual void clearBuffers () noexcept
 
virtual void handleOscMessage (const char *method, int argc, const void *argv, const char *types, lo_message msg)
 
void sendMidiSingleNote (uint8_t channel, uint8_t note, uint8_t velo, bool sendGui, bool sendOsc, bool sendCallback)
 
void postponeRtAllNotesOff ()
 
virtual void setCustomUITitle (const char *title) noexcept
 
virtual void showCustomUI (bool yesNo)
 
virtual void * embedCustomUI (void *ptr)
 
virtual void uiIdle ()
 
virtual void uiParameterChange (uint32_t index, float value) noexcept
 
virtual void uiProgramChange (uint32_t index) noexcept
 
virtual void uiMidiProgramChange (uint32_t index) noexcept
 
virtual void uiNoteOn (uint8_t channel, uint8_t note, uint8_t velo) noexcept
 
virtual void uiNoteOff (uint8_t channel, uint8_t note) noexcept
 
CarlaEnginegetEngine () const noexcept
 
CarlaEngineClientgetEngineClient () const noexcept
 
CarlaEngineAudioPortgetAudioInPort (uint32_t index) const noexcept
 
CarlaEngineAudioPortgetAudioOutPort (uint32_t index) const noexcept
 
CarlaEngineCVPortgetCVInPort (uint32_t index) const noexcept
 
CarlaEngineCVPortgetCVOutPort (uint32_t index) const noexcept
 
CarlaEngineEventPortgetDefaultEventInPort () const noexcept
 
CarlaEngineEventPortgetDefaultEventOutPort () const noexcept
 
void checkForMidiLearn (EngineEvent &event) noexcept
 
virtual void * getNativeHandle () const noexcept
 
virtual const void * getNativeDescriptor () const noexcept
 
virtual uintptr_t getUiBridgeProcessId () const noexcept
 
uint32_t getPatchbayNodeId () const noexcept
 
void setPatchbayNodeId (uint32_t nodeId) noexcept
 
virtual BinaryType getBinaryType () const noexcept
 
virtual const void * getExtraStuff () const noexcept
 

Public Attributes

char *const strBuf noexcept
 
char *strBuf noexcept
 
uint32_t scalePointId
 
uint32_t char *const strBuf noexcept
 

Protected Member Functions

 CarlaPlugin (CarlaEngine *engine, uint id)
 
virtual void activate () noexcept
 
virtual void deactivate () noexcept
 
virtual void cloneLV2Files (const CarlaPlugin &other)
 
virtual void restoreLV2State (bool temporary) noexcept
 
virtual void prepareForDeletion () noexcept
 
virtual void waitForBridgeSaveSignal () noexcept
 

Protected Attributes

ProtectedData *const pData
 

Friends

class CarlaEngine
 
class CarlaEngineBridge
 

Detailed Description

Carla Backend base plugin class

This is the base class for all available plugin types available in Carla Backend. All virtual calls are implemented in this class as fallback (except reload and process), so it's safe to only override needed calls.

See also
PluginType

Constructor & Destructor Documentation

◆ CarlaPlugin()

CarlaPlugin::CarlaPlugin ( CarlaEngine engine,
uint  id 
)
protected

This is the constructor of the base plugin class.

Parameters
engineThe engine which this plugin belongs to, must not be null
idThe 'id' of this plugin, must be between 0 and CarlaEngine::maxPluginNumber()

◆ ~CarlaPlugin()

virtual CarlaPlugin::~CarlaPlugin ( )
virtual

This is the destructor of the base plugin class.

Member Function Documentation

◆ getType()

virtual PluginType CarlaPlugin::getType ( ) const
pure virtualnoexcept

Get the plugin's type (a subclass of CarlaPlugin).

Note
Plugin bridges will return their respective plugin type, there is no plugin type such as "bridge". To check if a plugin is a bridge use:

◆ getId()

uint CarlaPlugin::getId ( ) const
noexcept

Get the plugin's id (as passed in the constructor).

See also
setId()

◆ getHints()

uint CarlaPlugin::getHints ( ) const
noexcept

Get the plugin's hints.

See also
Plugin Hints

◆ getOptionsEnabled()

uint CarlaPlugin::getOptionsEnabled ( ) const
noexcept

Get the plugin's options (currently in use).

See also
Plugin Options, getOptionsAvailable() and setOption()

◆ isEnabled()

bool CarlaPlugin::isEnabled ( ) const
noexcept

Check if the plugin is enabled. When a plugin is disabled, it will never be processed or managed in any way.

See also
setEnabled()

◆ getName()

const char* CarlaPlugin::getName ( ) const
noexcept

Get the plugin's internal name. This name is unique within all plugins in an engine.

See also
getRealName() and setName()

◆ getFilename()

const char* CarlaPlugin::getFilename ( ) const
noexcept

Get the currently loaded DLL filename for this plugin. (Sound kits return their exact filename).

◆ getIconName()

const char* CarlaPlugin::getIconName ( ) const
noexcept

Get the plugins's icon name.

◆ getCategory()

virtual PluginCategory CarlaPlugin::getCategory ( ) const
virtualnoexcept

Get the plugin's category (delay, filter, synth, etc).

◆ getUniqueId()

virtual int64_t CarlaPlugin::getUniqueId ( ) const
virtualnoexcept

Get the plugin's native unique Id. May return 0 on plugin types that don't support Ids.

◆ getLatencyInFrames()

virtual uint32_t CarlaPlugin::getLatencyInFrames ( ) const
virtualnoexcept

Get the plugin's latency, in sample frames.

◆ getAudioInCount()

uint32_t CarlaPlugin::getAudioInCount ( ) const
noexcept

Get the number of audio inputs.

◆ getAudioOutCount()

uint32_t CarlaPlugin::getAudioOutCount ( ) const
noexcept

Get the number of audio outputs.

◆ getCVInCount()

uint32_t CarlaPlugin::getCVInCount ( ) const
noexcept

Get the number of CV inputs.

◆ getCVOutCount()

uint32_t CarlaPlugin::getCVOutCount ( ) const
noexcept

Get the number of CV outputs.

◆ getMidiInCount()

virtual uint32_t CarlaPlugin::getMidiInCount ( ) const
virtualnoexcept

Get the number of MIDI inputs.

◆ getMidiOutCount()

virtual uint32_t CarlaPlugin::getMidiOutCount ( ) const
virtualnoexcept

Get the number of MIDI outputs.

◆ getParameterCount()

uint32_t CarlaPlugin::getParameterCount ( ) const
noexcept

Get the number of parameters. To know the number of parameter inputs and outputs separately use getParameterCountInfo() instead.

◆ getParameterScalePointCount()

virtual uint32_t CarlaPlugin::getParameterScalePointCount ( uint32_t  parameterId) const
virtualnoexcept

Get the number of scalepoints for parameter parameterId.

◆ getProgramCount()

uint32_t CarlaPlugin::getProgramCount ( ) const
noexcept

Get the number of programs.

◆ getMidiProgramCount()

uint32_t CarlaPlugin::getMidiProgramCount ( ) const
noexcept

Get the number of MIDI programs.

◆ getCustomDataCount()

uint32_t CarlaPlugin::getCustomDataCount ( ) const
noexcept

Get the number of custom data sets.

◆ getCurrentProgram()

int32_t CarlaPlugin::getCurrentProgram ( ) const
noexcept

Get the current program number (-1 if unset).

See also
setProgram()

◆ getCurrentMidiProgram()

int32_t CarlaPlugin::getCurrentMidiProgram ( ) const
noexcept

Get the current MIDI program number (-1 if unset).

See also
setMidiProgram()
setMidiProgramById()

◆ getParameterData()

const ParameterData& CarlaPlugin::getParameterData ( uint32_t  parameterId) const
noexcept

Get the parameter data of parameterId.

◆ getParameterRanges()

const ParameterRanges& CarlaPlugin::getParameterRanges ( uint32_t  parameterId) const
noexcept

Get the parameter ranges of parameterId.

◆ isParameterOutput()

bool CarlaPlugin::isParameterOutput ( uint32_t  parameterId) const
noexcept

Check if parameter parameterId is of output type.

◆ getMidiProgramData()

const MidiProgramData& CarlaPlugin::getMidiProgramData ( uint32_t  index) const
noexcept

Get the MIDI program at index.

See also
getMidiProgramName()

◆ getCustomData()

const CustomData& CarlaPlugin::getCustomData ( uint32_t  index) const
noexcept

Get the custom data set at index.

See also
getCustomDataCount() and setCustomData()

◆ getChunkData()

virtual std::size_t CarlaPlugin::getChunkData ( void **  dataPtr)
virtualnoexcept

Get the complete plugin chunk data into dataPtr.

Note
Make sure to verify the plugin supports chunks before calling this function!
Returns
The size of the chunk or 0 if invalid.
See also
setChunkData()

◆ getOptionsAvailable()

virtual uint CarlaPlugin::getOptionsAvailable ( ) const
virtualnoexcept

Get the plugin available options.

See also
Plugin Options, getOptions() and setOption()

◆ getParameterValue()

virtual float CarlaPlugin::getParameterValue ( uint32_t  parameterId) const
virtualnoexcept

Get the current parameter value of parameterId.

◆ getParameterScalePointValue()

virtual float CarlaPlugin::getParameterScalePointValue ( uint32_t  parameterId,
uint32_t  scalePointId 
) const
virtualnoexcept

Get the scalepoint scalePointId value of the parameter parameterId.

◆ __attribute__() [1/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  ) const
noexcept

Get the plugin's label (URI for LV2 plugins).

◆ __attribute__() [2/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  ) const
noexcept

Get the plugin's maker.

◆ __attribute__() [3/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  ) const
noexcept

Get the plugin's copyright/license.

◆ __attribute__() [4/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  ) const
noexcept

Get the plugin's (real) name.

See also
getName() and setName()

◆ __attribute__() [5/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  )

Get the name of the parameter parameterId.

◆ __attribute__() [6/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  )

Get the symbol of the parameter parameterId.

◆ __attribute__() [7/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  )

Get the custom text of the parameter parameterId.

See also
PARAMETER_USES_CUSTOM_TEXT

◆ __attribute__() [8/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  )

Get the unit of the parameter parameterId.

◆ __attribute__() [9/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  )

Get the comment (documentation) of the parameter parameterId.

◆ __attribute__() [10/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  )

Get the group name of the parameter parameterId.

Note
The group name is prefixed by a unique symbol and ":".

◆ __attribute__() [11/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  )

Get the scalepoint scalePointId label of the parameter parameterId.

◆ getInternalParameterValue()

float CarlaPlugin::getInternalParameterValue ( int32_t  parameterId) const
noexcept

Get the current parameter value of parameterId. parameterId can be negative to allow internal parameters.

See also
InternalParametersIndex

◆ __attribute__() [12/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  )

Get the name of the program at index.

◆ __attribute__() [13/13]

CarlaPlugin::__attribute__ ( (warn_unused_result)  )

Get the name of the MIDI program at index.

See also
getMidiProgramInfo()

◆ getParameterCountInfo()

void CarlaPlugin::getParameterCountInfo ( uint32_t &  ins,
uint32_t &  outs 
) const
noexcept

Get information about the plugin's parameter count. This is used to check how many input, output and total parameters are available.

Note
Some parameters might not be input or output (ie, invalid).
See also
getParameterCount()

◆ prepareForSave()

virtual void CarlaPlugin::prepareForSave ( bool  temporary)
virtual

Tell the plugin to prepare for save.

Parameters
temporaryWherever we are saving into a temporary location (for duplication, renaming or similar)

◆ resetParameters()

virtual void CarlaPlugin::resetParameters ( )
virtualnoexcept

Reset all possible parameters.

◆ randomizeParameters()

virtual void CarlaPlugin::randomizeParameters ( )
virtualnoexcept

Randomize all possible parameters.

◆ getStateSave()

const CarlaStateSave& CarlaPlugin::getStateSave ( bool  callPrepareForSave = true)

Get the plugin's save state. The plugin will automatically call prepareForSave() if requested.

See also
loadStateSave()

◆ loadStateSave()

void CarlaPlugin::loadStateSave ( const CarlaStateSave &  stateSave)

Get the plugin's save state.

See also
getStateSave()

◆ saveStateToFile()

bool CarlaPlugin::saveStateToFile ( const char *  filename)

Save the current plugin state to filename.

See also
loadStateFromFile()

◆ loadStateFromFile()

bool CarlaPlugin::loadStateFromFile ( const char *  filename)

Save the plugin state from filename.

See also
saveStateToFile()

◆ exportAsLV2()

bool CarlaPlugin::exportAsLV2 ( const char *  lv2path)

Export this plugin as LV2.

◆ setId()

virtual void CarlaPlugin::setId ( uint  newId)
virtualnoexcept

Set the plugin's id to newId.

See also
getId()
Note
RT call

◆ setName()

virtual void CarlaPlugin::setName ( const char *  newName)
virtual

Set the plugin's name to newName.

See also
getName() and getRealName()

◆ setOption()

virtual void CarlaPlugin::setOption ( uint  option,
bool  yesNo,
bool  sendCallback 
)
virtual

Set a plugin's option.

See also
getOptions() and getOptionsAvailable()

◆ setEnabled()

void CarlaPlugin::setEnabled ( bool  yesNo)
noexcept

Enable or disable the plugin according to yesNo. When a plugin is disabled, it will never be processed or managed in any way.

See also
isEnabled()

◆ setActive()

void CarlaPlugin::setActive ( bool  active,
bool  sendOsc,
bool  sendCallback 
)
noexcept

Set plugin as active according to active.

Parameters
sendOscSend message change over OSC
sendCallbackSend message change to registered callback

◆ setDryWet()

void CarlaPlugin::setDryWet ( float  value,
bool  sendOsc,
bool  sendCallback 
)
noexcept

Set the plugin's dry/wet signal value to value. value must be between 0.0 and 1.0.

Parameters
sendOscSend message change over OSC
sendCallbackSend message change to registered callback

◆ setVolume()

void CarlaPlugin::setVolume ( float  value,
bool  sendOsc,
bool  sendCallback 
)
noexcept

Set the plugin's output volume to value. value must be between 0.0 and 1.27.

Parameters
sendOscSend message change over OSC
sendCallbackSend message change to registered callback

◆ setBalanceLeft()

void CarlaPlugin::setBalanceLeft ( float  value,
bool  sendOsc,
bool  sendCallback 
)
noexcept

Set the plugin's output left balance value to value. value must be between -1.0 and 1.0.

Parameters
sendOscSend message change over OSC
sendCallbackSend message change to registered callback
Note
Pure-Stereo plugins only!

◆ setBalanceRight()

void CarlaPlugin::setBalanceRight ( float  value,
bool  sendOsc,
bool  sendCallback 
)
noexcept

Set the plugin's output right balance value to value. value must be between -1.0 and 1.0.

Parameters
sendOscSend message change over OSC
sendCallbackSend message change to registered callback
Note
Pure-Stereo plugins only!

◆ setPanning()

void CarlaPlugin::setPanning ( float  value,
bool  sendOsc,
bool  sendCallback 
)
noexcept

Set the plugin's output panning value to value. value must be between -1.0 and 1.0.

Parameters
sendOscSend message change over OSC
sendCallbackSend message change to registered callback
Note
Force-Stereo plugins only!

◆ setDryWetRT()

void CarlaPlugin::setDryWetRT ( float  value,
bool  sendCallbackLater 
)
noexcept

Overloaded functions, to be called from within RT context only.

◆ setVolumeRT()

void CarlaPlugin::setVolumeRT ( float  value,
bool  sendCallbackLater 
)
noexcept

◆ setBalanceLeftRT()

void CarlaPlugin::setBalanceLeftRT ( float  value,
bool  sendCallbackLater 
)
noexcept

◆ setBalanceRightRT()

void CarlaPlugin::setBalanceRightRT ( float  value,
bool  sendCallbackLater 
)
noexcept

◆ setPanningRT()

void CarlaPlugin::setPanningRT ( float  value,
bool  sendCallbackLater 
)
noexcept

◆ setCtrlChannel()

virtual void CarlaPlugin::setCtrlChannel ( int8_t  channel,
bool  sendOsc,
bool  sendCallback 
)
virtualnoexcept

Set the plugin's midi control channel.

Parameters
sendOscSend message change over OSC
sendCallbackSend message change to registered callback

◆ setParameterValue()

virtual void CarlaPlugin::setParameterValue ( uint32_t  parameterId,
float  value,
bool  sendGui,
bool  sendOsc,
bool  sendCallback 
)
virtualnoexcept

Set a plugin's parameter value.

Parameters
parameterIdThe parameter to change
valueThe new parameter value, must be within the parameter's range
sendGuiSend message change to plugin's custom GUI, if any
sendOscSend message change over OSC
sendCallbackSend message change to registered callback
See also
getParameterValue()

◆ setParameterValueRT()

virtual void CarlaPlugin::setParameterValueRT ( uint32_t  parameterId,
float  value,
bool  sendCallbackLater 
)
virtualnoexcept

Overloaded function, to be called from within RT context only.

◆ setParameterValueByRealIndex()

void CarlaPlugin::setParameterValueByRealIndex ( int32_t  rindex,
float  value,
bool  sendGui,
bool  sendOsc,
bool  sendCallback 
)
noexcept

Set a plugin's parameter value, including internal parameters. rindex can be negative to allow internal parameters change (as defined in InternalParametersIndex).

See also
setParameterValue()
setActive()
setDryWet()
setVolume()
setBalanceLeft()
setBalanceRight()

◆ setParameterMidiChannel()

virtual void CarlaPlugin::setParameterMidiChannel ( uint32_t  parameterId,
uint8_t  channel,
bool  sendOsc,
bool  sendCallback 
)
virtualnoexcept

Set parameter's parameterId MIDI channel to channel. channel must be between 0 and 15.

◆ setParameterMappedControlIndex()

virtual void CarlaPlugin::setParameterMappedControlIndex ( uint32_t  parameterId,
int16_t  index,
bool  sendOsc,
bool  sendCallback,
bool  reconfigureNow 
)
virtualnoexcept

Set parameter's parameterId mapped control index to index.

See also
ParameterData::mappedControlIndex

◆ setParameterMappedRange()

virtual void CarlaPlugin::setParameterMappedRange ( uint32_t  parameterId,
float  minimum,
float  maximum,
bool  sendOsc,
bool  sendCallback 
)
virtualnoexcept

Set parameter's parameterId mapped range to minimum and maximum.

◆ setCustomData()

virtual void CarlaPlugin::setCustomData ( const char *  type,
const char *  key,
const char *  value,
bool  sendGui 
)
virtual

Add a custom data set. If key already exists, its current value will be swapped with value.

Parameters
typeType of data used in value.
keyA key identifying this data set.
valueThe value of the data set, of type type.
sendGuiSend message change to plugin's custom GUI, if any
See also
getCustomDataCount() and getCustomData()

◆ setChunkData()

virtual void CarlaPlugin::setChunkData ( const void *  data,
std::size_t  dataSize 
)
virtual

Set the complete chunk data as data.

See also
getChunkData()
Note
Make sure to verify the plugin supports chunks before calling this function

◆ setProgram()

virtual void CarlaPlugin::setProgram ( int32_t  index,
bool  sendGui,
bool  sendOsc,
bool  sendCallback,
bool  doingInit = false 
)
virtualnoexcept

Change the current plugin program to index.

If index is negative the plugin's program will be considered unset. The plugin's default parameter values will be updated when this function is called.

Parameters
indexNew program index to use
sendGuiSend message change to plugin's custom GUI, if any
sendOscSend message change over OSC
sendCallbackSend message change to registered callback

◆ setMidiProgram()

virtual void CarlaPlugin::setMidiProgram ( int32_t  index,
bool  sendGui,
bool  sendOsc,
bool  sendCallback,
bool  doingInit = false 
)
virtualnoexcept

Change the current MIDI plugin program to index.

If index is negative the plugin's program will be considered unset. The plugin's default parameter values will be updated when this function is called.

Parameters
indexNew program index to use
sendGuiSend message change to plugin's custom GUI, if any
sendOscSend message change over OSC
sendCallbackSend message change to registered callback

◆ setMidiProgramById()

void CarlaPlugin::setMidiProgramById ( uint32_t  bank,
uint32_t  program,
bool  sendGui,
bool  sendOsc,
bool  sendCallback 
)
noexcept

This is an overloaded call to setMidiProgram(). It changes the current MIDI program using bank and program values instead of index.

◆ setProgramRT()

virtual void CarlaPlugin::setProgramRT ( uint32_t  index,
bool  sendCallbackLater 
)
virtualnoexcept

Overloaded functions, to be called from within RT context only.

◆ setMidiProgramRT()

virtual void CarlaPlugin::setMidiProgramRT ( uint32_t  index,
bool  sendCallbackLater 
)
virtualnoexcept

◆ reload()

virtual void CarlaPlugin::reload ( )
pure virtual

Reload the plugin's entire state (including programs). The plugin will be disabled during this call.

◆ reloadPrograms()

virtual void CarlaPlugin::reloadPrograms ( bool  doInit)
virtual

Reload the plugin's programs state.

◆ activate()

virtual void CarlaPlugin::activate ( )
protectedvirtualnoexcept

Plugin activate call.

◆ deactivate()

virtual void CarlaPlugin::deactivate ( )
protectedvirtualnoexcept

Plugin activate call.

◆ process()

virtual void CarlaPlugin::process ( const float *const *  audioIn,
float **  audioOut,
const float *const *  cvIn,
float **  cvOut,
uint32_t  frames 
)
pure virtual

Plugin process call.

◆ bufferSizeChanged()

virtual void CarlaPlugin::bufferSizeChanged ( uint32_t  newBufferSize)
virtual

Tell the plugin the current buffer size changed.

◆ sampleRateChanged()

virtual void CarlaPlugin::sampleRateChanged ( double  newSampleRate)
virtual

Tell the plugin the current sample rate changed.

◆ offlineModeChanged()

virtual void CarlaPlugin::offlineModeChanged ( bool  isOffline)
virtual

Tell the plugin the current offline mode changed.

◆ idle()

virtual void CarlaPlugin::idle ( )
virtual

Idle function (non-UI), called at regular intervals.

Note
: This function is NOT called from the main thread.

◆ tryLock()

bool CarlaPlugin::tryLock ( bool  forcedOffline)
noexcept

Try to lock the plugin's master mutex.

Parameters
forcedOfflineWhen true, always locks and returns true

◆ unlock()

void CarlaPlugin::unlock ( )
noexcept

Unlock the plugin's master mutex.

◆ initBuffers()

virtual void CarlaPlugin::initBuffers ( ) const
virtualnoexcept

Initialize all RT buffers of the plugin.

◆ clearBuffers()

virtual void CarlaPlugin::clearBuffers ( )
virtualnoexcept

Delete and clear all RT buffers.

◆ handleOscMessage()

virtual void CarlaPlugin::handleOscMessage ( const char *  method,
int  argc,
const void *  argv,
const char *  types,
lo_message  msg 
)
virtual

Handle an OSC message. FIXME

◆ sendMidiSingleNote()

void CarlaPlugin::sendMidiSingleNote ( uint8_t  channel,
uint8_t  note,
uint8_t  velo,
bool  sendGui,
bool  sendOsc,
bool  sendCallback 
)

Send a single midi note to be processed in the next audio callback. A note with 0 velocity means note-off.

Note
Non-RT call

◆ postponeRtAllNotesOff()

void CarlaPlugin::postponeRtAllNotesOff ( )

Send all midi notes off to the host callback. This doesn't send the actual MIDI All-Notes-Off event, but 128 note-offs instead (IFF ctrlChannel is valid).

Note
RT call

◆ setCustomUITitle()

virtual void CarlaPlugin::setCustomUITitle ( const char *  title)
virtualnoexcept

Set a custom title for the plugin UI window created by Carla.

◆ showCustomUI()

virtual void CarlaPlugin::showCustomUI ( bool  yesNo)
virtual

Show (or hide) the plugin's custom UI according to yesNo. This function is always called from the main thread.

◆ embedCustomUI()

virtual void* CarlaPlugin::embedCustomUI ( void *  ptr)
virtual

Embed the plugin's custom UI to the system pointer ptr. This function is always called from the main thread.

Note
This is very experimental and subject to change at this point

◆ uiIdle()

virtual void CarlaPlugin::uiIdle ( )
virtual

UI idle function, called at regular intervals. This function is only called from the main thread if PLUGIN_NEEDS_UI_MAIN_THREAD is set.

Note
This function may sometimes be called even if the UI is not visible yet.

◆ uiParameterChange()

virtual void CarlaPlugin::uiParameterChange ( uint32_t  index,
float  value 
)
virtualnoexcept

Tell the UI a parameter has changed.

See also
uiIdle

◆ uiProgramChange()

virtual void CarlaPlugin::uiProgramChange ( uint32_t  index)
virtualnoexcept

Tell the UI the current program has changed.

See also
uiIdle

◆ uiMidiProgramChange()

virtual void CarlaPlugin::uiMidiProgramChange ( uint32_t  index)
virtualnoexcept

Tell the UI the current midi program has changed.

See also
uiIdle

◆ uiNoteOn()

virtual void CarlaPlugin::uiNoteOn ( uint8_t  channel,
uint8_t  note,
uint8_t  velo 
)
virtualnoexcept

Tell the UI a note has been pressed.

See also
uiIdle

◆ uiNoteOff()

virtual void CarlaPlugin::uiNoteOff ( uint8_t  channel,
uint8_t  note 
)
virtualnoexcept

Tell the UI a note has been released.

See also
uiIdle

◆ getEngine()

CarlaEngine* CarlaPlugin::getEngine ( ) const
noexcept

Get the plugin's engine, as passed in the constructor.

◆ getEngineClient()

CarlaEngineClient* CarlaPlugin::getEngineClient ( ) const
noexcept

Get the plugin's engine client.

◆ getAudioInPort()

CarlaEngineAudioPort* CarlaPlugin::getAudioInPort ( uint32_t  index) const
noexcept

Get a plugin's audio input port.

◆ getAudioOutPort()

CarlaEngineAudioPort* CarlaPlugin::getAudioOutPort ( uint32_t  index) const
noexcept

Get a plugin's audio output port.

◆ getCVInPort()

CarlaEngineCVPort* CarlaPlugin::getCVInPort ( uint32_t  index) const
noexcept

Get a plugin's CV input port.

◆ getCVOutPort()

CarlaEngineCVPort* CarlaPlugin::getCVOutPort ( uint32_t  index) const
noexcept

Get a plugin's CV output port.

◆ getDefaultEventInPort()

CarlaEngineEventPort* CarlaPlugin::getDefaultEventInPort ( ) const
noexcept

Get the plugin's default event input port.

◆ getDefaultEventOutPort()

CarlaEngineEventPort* CarlaPlugin::getDefaultEventOutPort ( ) const
noexcept

Get the plugin's default event output port.

◆ checkForMidiLearn()

void CarlaPlugin::checkForMidiLearn ( EngineEvent event)
noexcept

Check if the plugin is interested on MIDI learn, and if so, map this event to the parameter that wants it. Event MUST be of control type and not have been handled before.

◆ getNativeHandle()

virtual void* CarlaPlugin::getNativeHandle ( ) const
virtualnoexcept

Get the plugin's type native handle. This will be LADSPA_Handle, LV2_Handle, etc.

◆ getNativeDescriptor()

virtual const void* CarlaPlugin::getNativeDescriptor ( ) const
virtualnoexcept

Get the plugin's type native descriptor. This will be LADSPA_Descriptor, DSSI_Descriptor, LV2_Descriptor, AEffect, etc.

◆ getUiBridgeProcessId()

virtual uintptr_t CarlaPlugin::getUiBridgeProcessId ( ) const
virtualnoexcept

Get the plugin UI bridge process Id.

◆ getPatchbayNodeId()

uint32_t CarlaPlugin::getPatchbayNodeId ( ) const
noexcept

Get the plugin's patchbay nodeId.

See also
setPatchbayNodeId()

◆ setPatchbayNodeId()

void CarlaPlugin::setPatchbayNodeId ( uint32_t  nodeId)
noexcept

Set the plugin's patchbay nodeId.

See also
getPatchbayNodeId()

◆ getBinaryType()

virtual BinaryType CarlaPlugin::getBinaryType ( ) const
inlinevirtualnoexcept

Get a plugin's binary type. This is always BINARY_NATIVE unless the plugin is a bridge.

◆ getExtraStuff()

virtual const void* CarlaPlugin::getExtraStuff ( ) const
inlinevirtualnoexcept

Handy function required by CarlaEngine::clonePlugin().

◆ cloneLV2Files()

virtual void CarlaPlugin::cloneLV2Files ( const CarlaPlugin other)
protectedvirtual

Clone/copy files from another LV2 plugin into this one..

◆ restoreLV2State()

virtual void CarlaPlugin::restoreLV2State ( bool  temporary)
protectedvirtualnoexcept

Call LV2 restore.

Parameters
temporaryWherever we are saving into a temporary location (for duplication, renaming or similar)

◆ prepareForDeletion()

virtual void CarlaPlugin::prepareForDeletion ( )
protectedvirtualnoexcept

Allow engine to signal that plugin will be deleted soon.

◆ waitForBridgeSaveSignal()

virtual void CarlaPlugin::waitForBridgeSaveSignal ( )
protectedvirtualnoexcept

Give plugin bridges a change to update their custom data sets.

Friends And Related Function Documentation

◆ CarlaEngine

friend class CarlaEngine
friend

◆ CarlaEngineBridge

friend class CarlaEngineBridge
friend

Member Data Documentation

◆ noexcept [1/3]

char *const strBuf CarlaPlugin::noexcept

◆ noexcept [2/3]

char* strBuf CarlaPlugin::noexcept

◆ scalePointId

uint32_t CarlaPlugin::scalePointId

◆ noexcept [3/3]

uint32_t char* const strBuf CarlaPlugin::noexcept

◆ pData

ProtectedData* const CarlaPlugin::pData
protected

The documentation for this class was generated from the following file:
CarlaPlugin::getHints
uint getHints() const noexcept
PLUGIN_IS_BRIDGE
static const uint PLUGIN_IS_BRIDGE
Definition: CarlaBackend.h:132