# memberdef

refid: ab8cfc3f2709a79e733e58556712da062
name: ticksPerBeat
definition: double TimePosition::BarBeatTick::ticksPerBeat
type: double
scope: TimePosition::BarBeatTick
detaileddescription:
Number of ticks within a bar.
Usually a moderately large integer with many denominators, such as 1920.0.


refid: a2e75f234cbbda1ed0517075e67d27191
name: name
definition: d_string Parameter::name
type: d_string
scope: Parameter
detaileddescription:
The name of this parameter.
A parameter name can contain any character, but hosts might have a hard time with non-ascii ones.
The name doesn't have to be unique within a plugin instance, but it's recommended.


refid: a0b5193e6131f65878dfb6fe4d9f5e970
name: symbol
definition: d_string Parameter::symbol
type: d_string
scope: Parameter
detaileddescription:
The symbol of this parameter.
A parameter symbol is a short restricted name used as a machine and human readable identifier.
The first character must be one of _, a-z or A-Z and subsequent characters can be from _, a-z, A-Z and 0-9.
@note: Parameter symbols MUST be unique within a plugin instance.


refid: aa9ee36848d60d8ddd9185b9a3f2ce93f
name: unit
definition: d_string Parameter::unit
type: d_string
scope: Parameter
detaileddescription:
The unit of this parameter.
This means something like "dB", "kHz" and "ms".
Can be left blank if units do not apply to this parameter.


refid: a3096e491376cb9378be55915d748de57
name: Plugin
definition: Plugin::Plugin
argsstring: (const uint32_t parameterCount, const uint32_t programCount, const uint32_t stateCount)
scope: Plugin
detaileddescription:
Plugin class constructor.
You must set all parameter values to their defaults, matching ParameterRanges::def.
If you're using states you must also set them to their defaults by calling d_setState().


refid: aa0feb17c3dcf13a106505eb6d6b2a3ac
name: d_getBufferSize
definition: uint32_t Plugin::d_getBufferSize
type: uint32_t
argsstring: () const noexcept
scope: Plugin
detaileddescription:
Get the current buffer size that will probably be used during processing, in frames.
This value will remain constant between activate and deactivate.
@note: This value is only a hint!
       Hosts might call d_run() with a higher or lower number of frames.
@see d_bufferSizeChanged(uint32_t)


refid: ace888940905e8875284e07c52bf7404f
name: d_getSampleRate
definition: double Plugin::d_getSampleRate
type: double
argsstring: () const noexcept
scope: Plugin
detaileddescription:
Get the current sample rate that will be used during processing.
This value will remain constant between activate and deactivate.
@see d_sampleRateChanged(double)


refid: ade0a082a3a2936286537a04f4b972225
name: d_getTimePosition
definition: const TimePosition& Plugin::d_getTimePosition
type: const TimePosition &
argsstring: () const noexcept
scope: Plugin
detaileddescription:
Get the current host transport time position.
This function should only be called during d_run().
You can call this during other times, but the returned position is not guaranteed to be in sync.
@note: TimePos is not supported in LADSPA and DSSI plugin formats.


refid: a7816b45ffb52b0a6308cabb792b1a56f
name: d_setLatency
definition: void Plugin::d_setLatency
type: void
argsstring: (uint32_t frames) noexcept
scope: Plugin
detaileddescription:
Change the plugin audio output latency to @a frames.
This function should only be called in the constructor, d_activate() and d_run().
@note This function is only available if DISTRHO_PLUGIN_WANT_LATENCY is enabled.


refid: afa10aea18e4036b4a7487f2779d92e0f
name: d_writeMidiEvent
definition: bool Plugin::d_writeMidiEvent
type: bool
argsstring: (const MidiEvent &midiEvent) noexcept
scope: Plugin
detaileddescription:
Write a MIDI output event.
This function must only be called during d_run().
Returns false when the host buffer is full, in which case do not call this again until the next d_run().


refid: ae512b28d1b274a055de33812cf094d81
name: d_getLabel
definition: virtual const char* Plugin::d_getLabel
type: const char *
argsstring: () const =0
scope: Plugin
detaileddescription:
Get the plugin label.
A plugin label follows the same rules as Parameter::symbol, with the exception that it can start with numbers.


refid: a3f93a8eb97db3dc9984c357c5ffca5ec
name: d_initParameter
definition: virtual void Plugin::d_initParameter
type: void
argsstring: (uint32_t index, Parameter &parameter)=0
scope: Plugin
detaileddescription:
Initialize the parameter @a index.
This function will be called once, shortly after the plugin is created.


refid: a8a1792b7c5c6a3fd9cd626c7156ec3b6
name: d_initProgramName
definition: virtual void Plugin::d_initProgramName
type: void
argsstring: (uint32_t index, d_string &programName)=0
scope: Plugin
detaileddescription:
Set the name of the program @a index.
This function will be called once, shortly after the plugin is created.
Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled.


refid: a65f9f9d4a30b0a56dfa42703c0b4db76
name: d_initState
definition: virtual void Plugin::d_initState
type: void
argsstring: (uint32_t index, d_string &stateKey, d_string &defaultStateValue)=0
scope: Plugin
detaileddescription:
Set the state key and default value of @a index.
This function will be called once, shortly after the plugin is created.
Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled.


refid: af088f855761b67489f19f42fbb585088
name: d_getParameterValue
definition: virtual float Plugin::d_getParameterValue
type: float
argsstring: (uint32_t index) const =0
scope: Plugin
detaileddescription:
Get the current value of a parameter.
The host may call this function from any context, including realtime processing.


refid: a4cdd613f58a013429094700f3d83904a
name: d_setParameterValue
definition: virtual void Plugin::d_setParameterValue
type: void
argsstring: (uint32_t index, float value)=0
scope: Plugin
detaileddescription:
Change a parameter value.
The host may call this function from any context, including realtime processing.
When a parameter is marked as automable, you must ensure no non-realtime operations are called.
@note This function will only be called for parameter inputs.


refid: a1d001e50781b35df23f6d9a218f5f804
name: d_setProgram
definition: virtual void Plugin::d_setProgram
type: void
argsstring: (uint32_t index)=0
scope: Plugin
detaileddescription:
Change the currently used program to @a index.
The host may call this function from any context, including realtime processing.
Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled.


refid: ad9c46a36cab96f52a0370043093bca68
name: d_setState
definition: virtual void Plugin::d_setState
type: void
argsstring: (const char *key, const char *value)=0
scope: Plugin
detaileddescription:
Change an internal state @a key to @a value.
Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled.


refid: af67102a7c6d19a8530ce0e3293e55667
name: d_run
definition: virtual void Plugin::d_run
type: void
scope: Plugin
argsstring:
(const float **inputs, float **outputs, uint32_t frames, const MidiEvent *midiEvents, uint32_t midiEventCount)=0

detaileddescription:
Run/process function for plugins with MIDI input.
@note: Some parameters might be null if there are no audio inputs/outputs or MIDI events.


refid: a2c6ac454e24b667d54eaaf63da252627
name: d_bufferSizeChanged
definition: virtual void Plugin::d_bufferSizeChanged
type: void
argsstring: (uint32_t newBufferSize)
scope: Plugin
detaileddescription:
Optional callback to inform the plugin about a buffer size change.
This function will only be called when the plugin is deactivated.
@note: This value is only a hint!
       Hosts might call d_run() with a higher or lower number of frames.
@see d_getBufferSize()


refid: a469b53e1c1417a32d766cf96d1b3c45e
name: d_sampleRateChanged
definition: virtual void Plugin::d_sampleRateChanged
type: void
argsstring: (double newSampleRate)
scope: Plugin
detaileddescription:
Optional callback to inform the plugin about a sample rate change.
This function will only be called when the plugin is deactivated.
@see d_getSampleRate()


refid: a9599da33720f4648e9ce78cc18249b07
name: d_parameterChanged
definition: virtual void UI::d_parameterChanged
type: void
argsstring: (uint32_t index, float value)=0
scope: UI
detaileddescription:
A parameter has changed on the plugin side.
This is called by the host to inform the UI about parameter changes.


refid: a7d703d2caff4765f270686b8428a2fa0
name: d_programChanged
definition: virtual void UI::d_programChanged
type: void
argsstring: (uint32_t index)=0
scope: UI
detaileddescription:
The current program has changed on the plugin side.
This is called by the host to inform the UI about program changes.


refid: a7f508ebffec7a5168b532ccb9d81df70
name: d_stateChanged
definition: virtual void UI::d_stateChanged
type: void
argsstring: (const char *key, const char *value)=0
scope: UI
detaileddescription:
A state has changed on the plugin side.
This is called by the host to inform the UI about state changes.


refid: a18f4b84a973405fc098e69047e0d1994
name: d_sampleRateChanged
definition: virtual void UI::d_sampleRateChanged
type: void
argsstring: (double newSampleRate)
scope: UI
detaileddescription:
Optional callback to inform the UI about a sample rate change on the plugin side.
@see d_getSampleRate()


refid: aaf729415450434ad6690db93fd936bbf
name: d_uiReshape
definition: virtual void UI::d_uiReshape
type: void
argsstring: (uint width, uint height)
scope: UI
detaileddescription:
OpenGL window reshape function, called when parent window is resized.
You can reimplement this function for a custom OpenGL state.
@see Window::onReshape(uint,uint)


refid: a8de15be030bbdf0eb81461349cb1cc77
name: onResize
definition: void UI::onResize
type: void
argsstring: (const ResizeEvent &ev) override
scope: UI
detaileddescription:
OpenGL widget resize function, called when the widget is resized.
This is overriden here so the host knows when the UI is resized by you.
@see Widget::onResize(const ResizeEvent&)


refid: ga888482a9f695c2ca2f433e5f3172dcc4
name: DISTRHO_PLUGIN_NAME
initializer: "Plugin Name"
detaileddescription:
The plugin name.@n
This is used to identify your plugin before a Plugin instance can be created.
@note This macro is required.


refid: ga854bde6b6fdb0d47182149dbab0fed72
name: DISTRHO_PLUGIN_IS_SYNTH
initializer: 1
detaileddescription:
Wherever the plugin is a synth.@n
@ref DISTRHO_PLUGIN_WANT_MIDI_INPUT is automatically enabled when this is too.
@see DISTRHO_PLUGIN_WANT_MIDI_INPUT


refid: gac6873a3950f52f3fde8e386af63b69a1
name: DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
initializer: 0
detaileddescription:
Enable direct access between the %UI and plugin code.
@see UI::d_getPluginInstancePointer()
@note DO NOT USE THIS UNLESS STRICTLY NECESSARY!!
      Try to avoid it at all costs!


refid: gad6b0ebf10e048f4742f29735da4d4930
name: DISTRHO_PLUGIN_WANT_LATENCY
initializer: 1
detaileddescription:
Wherever the plugin introduces latency during audio or midi processing.
@see Plugin::d_setLatency(uint32_t)


refid: gadf2e2eb7550e4116001c816adfb04a70
name: DISTRHO_PLUGIN_WANT_MIDI_INPUT
initializer: 1
detaileddescription:
Wherever the plugin wants MIDI input.@n
This is automatically enabled if @ref DISTRHO_PLUGIN_IS_SYNTH is true.


refid: gad95e24b17f196260cee15255fdb5b677
name: DISTRHO_PLUGIN_WANT_PROGRAMS
initializer: 1
detaileddescription:
Wherever the plugin provides its own internal programs.
@see Plugin::d_initProgramName(uint32_t, d_string&)
@see Plugin::d_setProgram(uint32_t)


refid: ga255f43cc0997af8b56abcca260c875e0
name: DISTRHO_PLUGIN_WANT_STATE
initializer: 1
detaileddescription:
Wherever the plugin uses internal non-parameter data.
@see Plugin::d_initState(uint32_t, d_string&, d_string&)
@see Plugin::d_setState(const char*, const char*)


refid: gad49e79936a2aa5afa089cbc051426ccd
name: DISTRHO_UI_USE_NANOVG
initializer: 1
detaileddescription:
Wherever the %UI uses NanoVG for drawing instead of the default raw OpenGL calls.@n
When enabled your %UI instance will subclass @ref NanoWidget instead of @ref Widget.


refid: ga420a88022da249b9f38a6046998dbd7c
name: DISTRHO_UI_URI
initializer: DISTRHO_PLUGIN_URI "#UI"
detaileddescription:
The %UI URI when exporting in LV2 format.@n
By default this is set to @ref DISTRHO_PLUGIN_URI with "#UI" as suffix.


refid: ga0a3633c93e8589f4b3e6124bb97ad8d4
name: kParameterIsOutput
definition: const uint32_t kParameterIsOutput
type: const uint32_t
initializer: = 0x10
detaileddescription:
Parameter is of output type.
When unset, parameter is assumed to be of input type.

Parameter inputs are changed by the host and must not be changed by the plugin.
The only exception being when changing programs, see Plugin::d_setProgram().
Outputs are changed by the plugin and never modified by the host.


