Client

Plugin interface, from the client point of view. This client has no knowledge of thread-safety, it must be handled externally. User plugins derivate from this class. Plugin formats wrappers owns one dplug.plugin.Client as a member.

class Client {}

Constructors

this
this()
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Aliases

getPluginVersion
deprecated alias getPluginVersion = getPublicVersion

Functions

buildLegalIO
LegalIO[] buildLegalIO()

Override this method to tell which I/O are legal. The returned slice must be allocated with malloc/mallocSlice.

buildParameters
Parameter[] buildParameters()

Override this method to implement parameter creation. This is an optional overload, default implementation declare no parameters. The returned slice must be allocated with malloc/mallocSlice and contains Parameter objects created with mallocEmplace.

buildPluginInfo
PluginInfo buildPluginInfo()

Override this method to tell what plugin you are. Mandatory override, fill the fields with care.

buildPresets
Preset[] buildPresets()

Override this methods to load/fill presets. This function must return a slice allocated with malloc, that contains presets crteated with mallocEmplace.

closeGUI
void closeGUI()
createGraphics
IGraphics createGraphics()

Override if you create a plugin with UI. The returned IGraphics must be allocated with mallocEmplace.

enqueueMIDIFromHost
void enqueueMIDIFromHost(MidiMessage message)

For plugin format clients only. Enqueues an incoming MIDI message.

getGUISize
bool getGUISize(int* width, int* height)
Undocumented in source. Be warned that the author may not have intended to support it.
getNextMidiMessages
const(MidiMessage)[] getNextMidiMessages(int frames)

Should only be called in processAudio. This return a slice of MIDI messages corresponding to the next frames samples. Useful if you don't want to process messages every samples, or every split buffer.

getPluginFullName
void getPluginFullName(char* p, int bufLength)
getPluginUniqueID
char[4] getPluginUniqueID()
getPublicVersion
PluginVersion getPublicVersion()
Undocumented in source. Be warned that the author may not have intended to support it.
getVendorUniqueID
char[4] getVendorUniqueID()
Undocumented in source. Be warned that the author may not have intended to support it.
graphicsAcquire
IGraphics graphicsAcquire()

Getter for the IGraphics interface This is intended for the audio thread and has acquire semantics. Not reentrant! You can't call this twice without a graphicsRelease first.

graphicsRelease
void graphicsRelease()

Mirror function to release the IGraphics from the audio-thread. Do not call if graphicsAcquire() returned null.

hasGUI
bool hasGUI()
Undocumented in source. Be warned that the author may not have intended to support it.
hostCommand
IHostCommand hostCommand()
Undocumented in source. Be warned that the author may not have intended to support it.
isLegalIO
bool isLegalIO(int numInputChannels, int numOutputChannels)
isSynth
bool isSynth()
Undocumented in source. Be warned that the author may not have intended to support it.
isValidInputIndex
bool isValidInputIndex(int index)
isValidOutputIndex
bool isValidOutputIndex(int index)
isValidParamIndex
bool isValidParamIndex(int index)
latencySamples
int latencySamples()

Override to set the plugin latency in samples. Unfortunately most of the time latency is dependent on the sampling rate and frequency, but most hosts don't support latency changes.

legalIOs
LegalIO[] legalIOs()
makeDefaultPreset
Preset makeDefaultPreset()

Returns a new default preset.

maxFramesInProcess
int maxFramesInProcess()

Override to declare the maximum number of samples to accept If greater, the audio buffers will be splitted up. This splitting have several benefits: - help allocating temporary audio buffers on the stack - keeps memory usage low and reuse it - allow faster-than-buffer-size parameter changes

maxInputs
int maxInputs()
Undocumented in source. Be warned that the author may not have intended to support it.
maxOutputs
int maxOutputs()
Undocumented in source. Be warned that the author may not have intended to support it.
openGUI
void* openGUI(void* parentInfo, void* controlInfo, GraphicsBackend backend)
Undocumented in source. Be warned that the author may not have intended to support it.
param
Parameter param(int index)
params
Parameter[] params()
pluginName
string pluginName()
Undocumented in source. Be warned that the author may not have intended to support it.
presetBank
PresetBank presetBank()
processAudio
void processAudio(const(float*)[] inputs, float*[] outputs, int frames, TimeInfo timeInfo)

Process some audio. Override to make some noise. In processAudio you are always guaranteed to get valid pointers to all the channels the plugin requested. Unconnected input pins are zeroed. This callback is the only place you may call getNextMidiMessages() (it is even required for plugins receiving MIDI).

processAudioFromHost
void processAudioFromHost(float*[] inputs, float*[] outputs, int frames, TimeInfo timeInfo)

For plugin format clients only. Calls processAudio repeatedly, splitting the buffers. Splitting allow to decouple memory requirements from the actual host buffer size. There is few performance penalty above 512 samples.

readBoolParamValue
bool readBoolParamValue(int paramIndex)

Boilerplate function to get the value of a BoolParameter,for use in processAudio.

readEnumParamValue
int readEnumParamValue(int paramIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
readFloatParamValue
float readFloatParamValue(int paramIndex)

Boilerplate function to get the value of a FloatParameter, for use in processAudio.

readIntegerParamValue
int readIntegerParamValue(int paramIndex)

Boilerplate function to get the value of an IntParameter, for use in processAudio.

receivesMIDI
bool receivesMIDI()
Undocumented in source. Be warned that the author may not have intended to support it.
reset
void reset(double sampleRate, int maxFrames, int numInputs, int numOutputs)

Override to clear state (eg: resize and clear delay lines) and allocate buffers. Important: This will be called by the audio thread. So you should not use the GC in this callback.

resetFromHost
void resetFromHost(double sampleRate, int maxFrames, int numInputs, int numOutputs)

For plugin format clients only. Calls reset(). Muzt be called by the audio thread.

setHostCommand
void setHostCommand(IHostCommand hostCommand)

For plugin format clients only.

setParameterFromHost
void setParameterFromHost(int index, float value)
Undocumented in source. Be warned that the author may not have intended to support it.
tailSizeInSeconds
float tailSizeInSeconds()

Override to set the plugin tail length in seconds. This is the amount of time before silence is reached with a silent input.

vendorName
string vendorName()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_graphics
IGraphics _graphics;
Undocumented in source.
_graphicsIsAvailable
shared(bool) _graphicsIsAvailable;
Undocumented in source.
_hostCommand
IHostCommand _hostCommand;
Undocumented in source.
_info
PluginInfo _info;
Undocumented in source.

Meta