|
VST2SDK
A recreation of the popular Steinberg VST 2.x SDK.
|
#include <cinttypes>Go to the source code of this file.
Data Structures | |
| struct | vst_rect_t |
| Window/Editor Rectangle. More... | |
| struct | vst_parameter_properties_t |
| Information about a parameter. More... | |
| struct | vst_speaker_properties_t |
| Speaker properties. More... | |
| struct | vst_speaker_arrangement_t |
| Speaker arrangement definition. More... | |
| struct | vst_stream_properties_t |
| struct | vst_event_t |
| A generic event. More... | |
| union | vst_event_midi_t |
| A MIDI event. More... | |
| union | vst_event_midi_sysex_t |
| A MIDI SysEx event. More... | |
| struct | vst_events_t |
| A collection of events. More... | |
| struct | vst_host_supports_t |
| Plug-in to Host support checks. More... | |
| struct | vst_effect_supports_t |
| Host to Plug-in support checks. More... | |
| struct | vst_effect_t |
| Plug-in Effect definition. More... | |
Macros | |
| #define | VST2SDK_VST_H |
| #define | VST_FUNCTION_INTERFACE __cdecl |
| Standard calling convention across plug-ins and hosts. | |
| #define | VST_MAX_CHANNELS 32 |
| Maximum number of channels/streams/inputs/outputs supported by VST 2.x Couldn't find any audio editing software which would attempt to add more channels. | |
| #define | VST_FOURCC(a, b, c, d) ((((uint32_t)a) << 24) | (((uint32_t)b) << 16) | (((uint32_t)c) << 8) | (((uint32_t)d) << 0)) |
| Convert four numbers into a FourCC. | |
| #define | VST_MAGICNUMBER VST_FOURCC('V', 's', 't', 'P') |
| Magic Number identifying a VST 2.x plug-in structure. | |
| #define | VST_DEFAULT_SAMPLE_RATE 44100.0f |
| Default VST 2.x Sample Rate All VST 2.x hosts expect you to initialize your plug-in to these default values. | |
| #define | VST_DEFAULT_BLOCK_SIZE 1024 |
| Default VST 2.x Block Size All VST 2.x hosts expect you to initialize your plug-in to these default values. | |
| #define | VST_ENTRYPOINT vst_effect_t* VSTPluginMain(vst_host_callback_t callback) |
| VST 2.x Entry Point for all platforms. | |
| #define | VST_ENTRYPOINT_WINDOWS vst_effect_t* MAIN(vst_host_callback_t callback) { return VSTPluginMain(callback); } |
| [DEPRECATED] VST 1.x Entry Point for Windows | |
| #define | VST_ENTRYPOINT_MACOS vst_effect_t* main_macho(vst_host_callback_t callback) { return VSTPluginMain(callback); } |
| [DEPRECATED] VST 1.x Entry Point for MacOS | |
| #define | VST_ENTRYPOINT_MACOS_POWERPC vst_effect_t* main(vst_host_callback_t callback) { return VSTPluginMain(callback); } |
| [DEPRECATED] VST 2.3 Entry Point for PowerPC | |
Typedefs | |
| typedef intptr_t(VST_FUNCTION_INTERFACE * | vst_host_callback_t) (struct vst_effect_t *plugin, int32_t opcode, int32_t p_int1, int64_t p_int2, const char *p_str, float p_float) |
| Plug-in to Host callback. | |
| typedef intptr_t(VST_FUNCTION_INTERFACE * | vst_effect_control_t) (struct vst_effect_t *self, int32_t opcode, int32_t p_int1, intptr_t p_int2, void *p_ptr, float p_float) |
| Control the VST through an opcode and up to four parameters. | |
| typedef void(VST_FUNCTION_INTERFACE * | vst_effect_process_t) (struct vst_effect_t *self, const float *const *inputs, float **outputs, int32_t samples) |
| Process the given number of samples in inputs and outputs. | |
| typedef void(VST_FUNCTION_INTERFACE * | vst_effect_set_parameter_t) (struct vst_effect_t *self, uint32_t index, float value) |
| Updates the value for the parameter at the given index, or does nothing if out of bounds. | |
| typedef float(VST_FUNCTION_INTERFACE * | vst_effect_get_parameter_t) (struct vst_effect_t *self, uint32_t index) |
| Retrieve the current value of the parameter at the given index, or do nothing if out of bounds. | |
| typedef void(VST_FUNCTION_INTERFACE * | vst_effect_process_float_t) (struct vst_effect_t *self, const float *const *inputs, float **outputs, int32_t samples) |
| Process the given number of single samples in inputs and outputs. | |
| typedef void(VST_FUNCTION_INTERFACE * | vst_effect_process_double_t) (struct vst_effect_t *self, const double *const *inputs, double **outputs, int32_t samples) |
| Process the given number of double samples in inputs and outputs. | |
| #define VST_DEFAULT_BLOCK_SIZE 1024 |
Default VST 2.x Block Size All VST 2.x hosts expect you to initialize your plug-in to these default values.
| #define VST_DEFAULT_SAMPLE_RATE 44100.0f |
Default VST 2.x Sample Rate All VST 2.x hosts expect you to initialize your plug-in to these default values.
| #define VST_ENTRYPOINT vst_effect_t* VSTPluginMain(vst_host_callback_t callback) |
VST 2.x Entry Point for all platforms.
Must be present in VST 2.x plug-ins but must not be present in VST 1.x plug-ins.
Definition at line 3127 of file vst.h.
| #define VST_ENTRYPOINT_MACOS vst_effect_t* main_macho(vst_host_callback_t callback) { return VSTPluginMain(callback); } |
| #define VST_ENTRYPOINT_MACOS_POWERPC vst_effect_t* main(vst_host_callback_t callback) { return VSTPluginMain(callback); } |
| #define VST_ENTRYPOINT_WINDOWS vst_effect_t* MAIN(vst_host_callback_t callback) { return VSTPluginMain(callback); } |
| #define VST_FOURCC | ( | a, | |
| b, | |||
| c, | |||
| d | |||
| ) | ((((uint32_t)a) << 24) | (((uint32_t)b) << 16) | (((uint32_t)c) << 8) | (((uint32_t)d) << 0)) |
| #define VST_FUNCTION_INTERFACE __cdecl |
| #define VST_MAGICNUMBER VST_FOURCC('V', 's', 't', 'P') |
| #define VST_MAX_CHANNELS 32 |
| typedef intptr_t(VST_FUNCTION_INTERFACE * vst_effect_control_t) (struct vst_effect_t *self, int32_t opcode, int32_t p_int1, intptr_t p_int2, void *p_ptr, float p_float) |
Control the VST through an opcode and up to four parameters.
| self | Pointer to the effect itself. |
| opcode | The opcode to run, see VST_EFFECT_OPCODE. |
| p_int1 | Parameter, see VST_EFFECT_OPCODE. |
| p_int2 | Parameter, see VST_EFFECT_OPCODE. |
| p_ptr | Parameter, see VST_EFFECT_OPCODE. |
| p_float | Parameter, see VST_EFFECT_OPCODE. |
| typedef float(VST_FUNCTION_INTERFACE * vst_effect_get_parameter_t) (struct vst_effect_t *self, uint32_t index) |
| typedef void(VST_FUNCTION_INTERFACE * vst_effect_process_double_t) (struct vst_effect_t *self, const double *const *inputs, double **outputs, int32_t samples) |
Process the given number of double samples in inputs and outputs.
Process input and overwrite the output in place. Host provides output buffers.
| self | Pointer to the effect itself. |
| inputs | Pointer to an array of 'const double[samples]' with size numInputs. |
| outputs | Pointer to an array of 'double[samples]' with size numOutputs. |
| samples | Number of samples per channel in inputs. |
| typedef void(VST_FUNCTION_INTERFACE * vst_effect_process_float_t) (struct vst_effect_t *self, const float *const *inputs, float **outputs, int32_t samples) |
Process the given number of single samples in inputs and outputs.
Process input and overwrite the output in place. Host provides output buffers.
@important Not thread-safe on MacOS for some reason or another.
| self | Pointer to the effect itself. |
| inputs | Pointer to an array of 'const float[samples]' with size numInputs. |
| outputs | Pointer to an array of 'float[samples]' with size numOutputs. |
| samples | Number of samples per channel in inputs. |
| typedef void(VST_FUNCTION_INTERFACE * vst_effect_process_t) (struct vst_effect_t *self, const float *const *inputs, float **outputs, int32_t samples) |
Process the given number of samples in inputs and outputs.
Used to handle input data and provides output data. We seem to be the ones that provide the output buffer?
| self | Pointer to the effect itself. |
| inputs | Pointer to an array of 'const float[samples]' with size vst_effect_t::num_inputs. |
| outputs | Pointer to an array of 'float[samples]' with size vst_effect_t::num_outputs. |
| samples | Number of samples per channel in inputs and outputs. |
| typedef void(VST_FUNCTION_INTERFACE * vst_effect_set_parameter_t) (struct vst_effect_t *self, uint32_t index, float value) |
| typedef intptr_t(VST_FUNCTION_INTERFACE * vst_host_callback_t) (struct vst_effect_t *plugin, int32_t opcode, int32_t p_int1, int64_t p_int2, const char *p_str, float p_float) |
| enum VST_BUFFER_SIZE |
Known Buffer Sizes.
Definition at line 108 of file vst.h.
| enum VST_EFFECT_CATEGORY |
Plug-in Categories Pre-defined category grouping that also affect host behavior when handling the plug-in.
This is not just a UI/UX thing, it actually affects what plug-ins can do, so place your plug-in into the correct category.
| Enumerator | |
|---|---|
| VST_EFFECT_CATEGORY_UNCATEGORIZED | |
| VST_EFFECT_CATEGORY_01 | Generic Effects Examples: Distortion, Pitch Shift, ... Supports: Delay (Optional), Tail Samples, MIDI |
| VST_EFFECT_CATEGORY_EFFECT |
|
| VST_EFFECT_CATEGORY_02 | Instruments Examples: Instruments, Synths, Samplers, ... Supports: Delay (Optional), Tail Samples, MIDI |
| VST_EFFECT_CATEGORY_INSTRUMENT |
|
| VST_EFFECT_CATEGORY_03 | Metering Examples: Loudness Meters, Volume Analysis, ... Supports: Tail Samples, MIDI
|
| VST_EFFECT_CATEGORY_METERING |
|
| VST_EFFECT_CATEGORY_04 | Mastering Examples: Compressors, Limiters, ... Supports: Delay, Tail Samples (optional), MIDI |
| VST_EFFECT_CATEGORY_MASTERING |
|
| VST_EFFECT_CATEGORY_05 | Spatializers Examples: Channel Panning, Expanders, ... Supports: Tail Samples (optional), MIDI |
| VST_EFFECT_CATEGORY_SPATIAL |
|
| VST_EFFECT_CATEGORY_06 | Delay/Echo Examples: Echo, Reverb, Room Simulation, Delay, ... Supports: Delay, Tail Samples, MIDI |
| VST_EFFECT_CATEGORY_DELAY_OR_ECHO |
|
| VST_EFFECT_CATEGORY_07 | External Processing. This VST effect is an interface to an external device and requires special handling.
|
| VST_EFFECT_CATEGORY_EXTERNAL |
|
| VST_EFFECT_CATEGORY_08 | Restoration Examples: Noise Filtering, Upsamplers, ... Supports: Delay, Tail Samples, MIDI
|
| VST_EFFECT_CATEGORY_RESTORATION |
|
| VST_EFFECT_CATEGORY_09 | Offline Processing Examples: Nothing Supports: Nothing. |
| VST_EFFECT_CATEGORY_OFFLINE |
|
| VST_EFFECT_CATEGORY_0A | Container Plug-in This plug-in contains multiple effects in one and requires special handling on both sides. Host handling: uint32_t current_select_id;
// ... in intptr_t vst_host_callback(vst_effect_t* plugin, VST_HOST_OPCODE opcode, ...)
case VST_HOST_OPCODE_SUPPORTS: {
char* text = (char*)p_ptr;
// The plug-in may ask the host if it even supports containers at all and changes behavior if we don't.
if (text && strcmp(text, vst_host_supports.shellCategory) == 0) {
return VST_STATUS_TRUE;
}
}
return current_selected_id;
// ...
// ... in whatever you use to load plug-ins ...
current_select_id;
vst_effect_t* plugin = plugin_main(&vst_host_callback);
int32_t plugin_category = plugin->control(plugin, VST_EFFECT_OPCODE_CATEGORY, 0, 0, 0, 0)
if (plugin_category == VST_EFFECT_CATEGORY_CONTAINER) {
char effect_name[VST_BUFFER_SIZE_EFFECT_NAME] effect_name;
int32_t effect_id;
// Iterate over all contained effects.
while ((effect_id = plugin->control(plugin, VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID, 0, 0, effect_name, 0)) != 0) {
// Contained effects must be named as far as I can tell.
if (effect_name[0] != 0) {
// Do some logic that does the necessary things to list these in the host.
}
}
} else {
// Do things to list only this plugin in the host.
}
// ...
@ VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID Definition vst.h:2674 Plug-in handling: // ... in vst_effect for the container
size_t current_effect_idx;
int32_t effect_list[] = {
// ... list of effect ids.
}
// ... in control(...)
// Make sure current_effect_idx doesn't exceed the maximum.
if (current_effect_idx > ARRAYSIZEOF(effect_list)) {
current_effect_idx;
return 0;
}
// Some code that turns effect indices into names to store into p_ptr.
return effect_list[current_effect_idx++]; // Return the effect id.
// ...
// Ensure the host VST 2.x compatible.
int32_t vst_version = callback(nullptr, VST_HOST_OPCODE_VST_VERSION, 0, 0, 0, 0);
if (vst_version == 0) {
return 0; // It's not so we exit early.
}
// Check if the host wants
int32_t effect_id = callback(nullptr, VST_HOST_OPCODE_CURRENT_EFFECT_ID, 0, 0, 0);
if (effect_id == 0) {
// ... logic specific to making the container.
return new vst_container_effect();
} else {
// ... logic specific to make sub effects
return new vst_sub_effect();
}
}
// ...
|
| VST_EFFECT_CATEGORY_CONTAINER |
|
| VST_EFFECT_CATEGORY_0B | Waveform Generators Examples: Sine Wave Generator, ... Supports: Delay, Tail Samples. I don't know why this exists, there's only one plug-in that has it and all it does is generate a 400hz sine wave.
|
| VST_EFFECT_CATEGORY_WAVEGENERATOR |
|
Definition at line 1618 of file vst.h.
| enum VST_EFFECT_FLAG |
Effect Flags.
| Enumerator | |
|---|---|
| VST_EFFECT_FLAG_1ls0 | Effect provides a custom editor. The host will not provide a generic editor interface and expects VST_EFFECT_OPCODE_EDITOR_OPEN and VST_EFFECT_OPCODE_EDITOR_CLOSE to work as expected. We are in charge of notifying the host about various things like which parameter is in focus and stuff.
|
| VST_EFFECT_FLAG_EDITOR |
|
| VST_EFFECT_FLAG_1ls4 | Effect uses process_float.
|
| VST_EFFECT_FLAG_SUPPORTS_FLOAT |
|
| VST_EFFECT_FLAG_1ls5 | Effect supports saving/loading programs/banks from unformatted chunk data. When not set some sort of format is expected that I've yet to decipher. |
| VST_EFFECT_FLAG_CHUNKS |
|
| VST_EFFECT_FLAG_1ls8 | Effect is an Instrument/Generator. This must be set in addition to VST_EFFECT_CATEGORY_INSTRUMENT otherwise instruments don't work right.
|
| VST_EFFECT_FLAG_INSTRUMENT |
|
| VST_EFFECT_FLAG_1ls9 | Effect does not produce tail samples when the input is silent. Not to be confused with choosing to tell the host there is no tail.
|
| VST_EFFECT_FLAG_SILENT_TAIL |
|
| VST_EFFECT_FLAG_1ls12 | Effect supports process_double. The host can freely choose between process_float and process_double as required.
|
| VST_EFFECT_FLAG_SUPPORTS_DOUBLE |
|
Definition at line 1806 of file vst.h.
| enum VST_EFFECT_OPCODE |
Host to Plug-in Op-Codes These Op-Codes are emitted by the host and we must either handle them or return 0 (false).
| Enumerator | |||||||
|---|---|---|---|---|---|---|---|
| VST_EFFECT_OPCODE_00 | Create/Initialize the effect (if it has not been created already).
| ||||||
| VST_EFFECT_OPCODE_CREATE |
| ||||||
| VST_EFFECT_OPCODE_INITIALIZE |
| ||||||
| VST_EFFECT_OPCODE_01 | Destroy the effect (if there is any) and free its memory. This should destroy the actual object created by VST_ENTRYPOINT.
| ||||||
| VST_EFFECT_OPCODE_DESTROY |
| ||||||
| VST_EFFECT_OPCODE_02 | Set which program number is currently select.
| ||||||
| VST_EFFECT_OPCODE_SET_PROGRAM |
| ||||||
| VST_EFFECT_OPCODE_PROGRAM_SET |
| ||||||
| VST_EFFECT_OPCODE_03 | Get currently selected program number.
| ||||||
| VST_EFFECT_OPCODE_GET_PROGRAM |
| ||||||
| VST_EFFECT_OPCODE_PROGRAM_GET |
| ||||||
| VST_EFFECT_OPCODE_04 | Set the name of the currently selected program.
| ||||||
| VST_EFFECT_OPCODE_SET_PROGRAM_NAME |
| ||||||
| VST_EFFECT_OPCODE_PROGRAM_SET_NAME |
| ||||||
| VST_EFFECT_OPCODE_05 | Get the name of the currently selected program.
| ||||||
| VST_EFFECT_OPCODE_GET_PROGRAM_NAME |
| ||||||
| VST_EFFECT_OPCODE_PROGRAM_GET_NAME |
| ||||||
| VST_EFFECT_OPCODE_06 | Get the value? label for the parameter.
| ||||||
| VST_EFFECT_OPCODE_PARAM_GETLABEL |
| ||||||
| VST_EFFECT_OPCODE_PARAM_GET_LABEL |
| ||||||
| VST_EFFECT_OPCODE_PARAM_LABEL |
| ||||||
| VST_EFFECT_OPCODE_07 | Get the string representing the value for the parameter.
| ||||||
| VST_EFFECT_OPCODE_PARAM_GETVALUE |
| ||||||
| VST_EFFECT_OPCODE_PARAM_GET_VALUE |
| ||||||
| VST_EFFECT_OPCODE_PARAM_VALUE |
| ||||||
| VST_EFFECT_OPCODE_PARAM_VALUE_TO_STRING |
| ||||||
| VST_EFFECT_OPCODE_08 | Get the name for the parameter.
| ||||||
| VST_EFFECT_OPCODE_PARAM_GETNAME |
| ||||||
| VST_EFFECT_OPCODE_PARAM_GET_NAME |
| ||||||
| VST_EFFECT_OPCODE_PARAM_NAME |
| ||||||
| VST_EFFECT_OPCODE_09 |
| ||||||
| VST_EFFECT_OPCODE_0A | Set the new sample rate for the plugin to use.
| ||||||
| VST_EFFECT_OPCODE_SETSAMPLERATE |
| ||||||
| VST_EFFECT_OPCODE_SET_SAMPLE_RATE |
| ||||||
| VST_EFFECT_OPCODE_0B | Sets the block size, which is the maximum number of samples passed into the effect via process calls.
| ||||||
| VST_EFFECT_OPCODE_SETBLOCKSIZE |
| ||||||
| VST_EFFECT_OPCODE_SET_BLOCK_SIZE |
| ||||||
| VST_EFFECT_OPCODE_0C | Effect processing should be suspended/paused or resumed/unpaused. Unclear if this is should result in a flush of buffers. In VST 2.3+ this is quite clear as we get process begin/end.
| ||||||
| VST_EFFECT_OPCODE_PAUSE_UNPAUSE |
| ||||||
| VST_EFFECT_OPCODE_SUSPEND_RESUME |
| ||||||
| VST_EFFECT_OPCODE_SUSPEND |
| ||||||
| VST_EFFECT_OPCODE_0D | Retrieve the client rect size of the plugins window. If no window has been created, returns the default rect.
| ||||||
| VST_EFFECT_OPCODE_WINDOW_GETRECT |
| ||||||
| VST_EFFECT_OPCODE_EDITOR_RECT |
| ||||||
| VST_EFFECT_OPCODE_EDITOR_GET_RECT |
| ||||||
| VST_EFFECT_OPCODE_0E | Create the window for the plugin.
| ||||||
| VST_EFFECT_OPCODE_WINDOW_CREATE |
| ||||||
| VST_EFFECT_OPCODE_EDITOR_OPEN |
| ||||||
| VST_EFFECT_OPCODE_0F | Destroy the plugins window.
| ||||||
| VST_EFFECT_OPCODE_WINDOW_DESTROY |
| ||||||
| VST_EFFECT_OPCODE_EDITOR_CLOSE |
| ||||||
| VST_EFFECT_OPCODE_10 | Window Draw Event? Ocasionally called simultaneously as WM_DRAW on windows.
| ||||||
| VST_EFFECT_OPCODE_WINDOW_DRAW |
| ||||||
| VST_EFFECT_OPCODE_EDITOR_DRAW |
| ||||||
| VST_EFFECT_OPCODE_11 | Window Mouse Event? Called at the same time mouse events happen.
| ||||||
| VST_EFFECT_OPCODE_WINDOW_MOUSE |
| ||||||
| VST_EFFECT_OPCODE_EDITOR_MOUSE |
| ||||||
| VST_EFFECT_OPCODE_12 | Window Keyboard Event? Called at the same time keyboard events happen.
| ||||||
| VST_EFFECT_OPCODE_WINDOW_KEYBOARD |
| ||||||
| VST_EFFECT_OPCODE_EDITOR_KEYBOARD |
| ||||||
| VST_EFFECT_OPCODE_13 | Window/Editor Idle/Keep-Alive Callback? Does not receive any parameters. Randomly called when nothing happens? Idle/Keep-Alive callback? | ||||||
| VST_EFFECT_OPCODE_EDITOR_KEEP_ALIVE |
| ||||||
| VST_EFFECT_OPCODE_14 | Window Focus Event? Sometimes called when the editor window goes back into focus.
| ||||||
| VST_EFFECT_OPCODE_15 | Window Unfocus Event? Sometimes called when the editor window goes out of focus.
| ||||||
| VST_EFFECT_OPCODE_16 |
| ||||||
| VST_EFFECT_OPCODE_FOURCC |
| ||||||
| VST_EFFECT_OPCODE_17 | Get Chunk Data. Save current program or bank state to a buffer. Behavior is different based on the VST_EFFECT_FLAG_CHUNKS flag.
| ||||||
| VST_EFFECT_OPCODE_GET_CHUNK_DATA |
| ||||||
| VST_EFFECT_OPCODE_18 | Set Chunk Data. Restore current program or bank state from a buffer. Behavior is different based on the VST_EFFECT_FLAG_CHUNKS flag.
| ||||||
| VST_EFFECT_OPCODE_SET_CHUNK_DATA |
| ||||||
| VST_EFFECT_OPCODE_19 | Send events from host to plug-in. The plug-in must support receiving events (see vst_effect_supports_t::receiveVstEvents) while the host may optionally signal to the plugin that it wants to send events to the host (see vst_host_supports_t::sendVstEvents).
| ||||||
| VST_EFFECT_OPCODE_EVENT |
| ||||||
| VST_EFFECT_OPCODE_1A | Can the parameter be automated?
| ||||||
| VST_EFFECT_OPCODE_PARAM_ISAUTOMATABLE |
| ||||||
| VST_EFFECT_OPCODE_PARAM_IS_AUTOMATABLE |
| ||||||
| VST_EFFECT_OPCODE_PARAM_AUTOMATABLE |
| ||||||
| VST_EFFECT_OPCODE_1B | Set Parameter value from string representation.
| ||||||
| VST_EFFECT_OPCODE_PARAM_SET_VALUE |
| ||||||
| VST_EFFECT_OPCODE_PARAM_VALUE_FROM_STRING |
| ||||||
| VST_EFFECT_OPCODE_1C |
| ||||||
| VST_EFFECT_OPCODE_1D |
| ||||||
| VST_EFFECT_OPCODE_1E |
| ||||||
| VST_EFFECT_OPCODE_1F | Input connected.
| ||||||
| VST_EFFECT_OPCODE_20 | Input disconnected.
| ||||||
| VST_EFFECT_OPCODE_21 | Retrieve properties for the given input index.
| ||||||
| VST_EFFECT_OPCODE_INPUT_GET_PROPERTIES |
| ||||||
| VST_EFFECT_OPCODE_INPUT_STREAM_GET_PROPERTIES |
| ||||||
| VST_EFFECT_OPCODE_22 | Retrieve properties for the given output index.
| ||||||
| VST_EFFECT_OPCODE_OUTPUT_GET_PROPERTIES |
| ||||||
| VST_EFFECT_OPCODE_OUTPUT_STREAM_GET_PROPERTIES |
| ||||||
| VST_EFFECT_OPCODE_23 | Retrieve category of this effect.
| ||||||
| VST_EFFECT_OPCODE_EFFECT_CATEGORY |
| ||||||
| VST_EFFECT_OPCODE_CATEGORY |
| ||||||
| VST_EFFECT_OPCODE_24 |
| ||||||
| VST_EFFECT_OPCODE_25 |
| ||||||
| VST_EFFECT_OPCODE_26 | Seen in plug-ins with VST_EFFECT_CATEGORY_OFFLINE.
| ||||||
| VST_EFFECT_OPCODE_27 | Seen in plug-ins with VST_EFFECT_CATEGORY_OFFLINE.
| ||||||
| VST_EFFECT_OPCODE_28 | Seen in plug-ins with VST_EFFECT_CATEGORY_OFFLINE.
| ||||||
| VST_EFFECT_OPCODE_29 | Seen in plug-ins with VST_EFFECT_CATEGORY_OFFLINE.
| ||||||
| VST_EFFECT_OPCODE_2A | Host wants to change the speaker arrangement.
| ||||||
| VST_EFFECT_OPCODE_SET_SPEAKER_ARRANGEMENT |
| ||||||
| VST_EFFECT_OPCODE_2B | |||||||
| VST_EFFECT_OPCODE_2C | Enable/Disable bypassing the effect. See VST_EFFECT_OPCODE_SUPPORTS with vst_effect_supports_t::bypass for more information.
| ||||||
| VST_EFFECT_OPCODE_BYPASS |
| ||||||
| VST_EFFECT_OPCODE_2D | Retrieve the effect name into the ptr buffer.
| ||||||
| VST_EFFECT_OPCODE_GETNAME |
| ||||||
| VST_EFFECT_OPCODE_EFFECT_NAME |
| ||||||
| VST_EFFECT_OPCODE_NAME |
| ||||||
| VST_EFFECT_OPCODE_2E | Translate an error code to a string.
| ||||||
| VST_EFFECT_OPCODE_TRANSLATE_ERROR |
| ||||||
| VST_EFFECT_OPCODE_2F | Retrieve the vendor name into the ptr buffer.
| ||||||
| VST_EFFECT_OPCODE_GETVENDOR |
| ||||||
| VST_EFFECT_OPCODE_VENDOR_NAME |
| ||||||
| VST_EFFECT_OPCODE_30 | Retrieve the product name into the ptr buffer.
| ||||||
| VST_EFFECT_OPCODE_GETNAME2 |
| ||||||
| VST_EFFECT_OPCODE_PRODUCT_NAME |
| ||||||
| VST_EFFECT_OPCODE_31 | Retrieve the vendor version in return value.
| ||||||
| VST_EFFECT_OPCODE_GETVENDORVERSION |
| ||||||
| VST_EFFECT_OPCODE_VENDOR_VERSION |
| ||||||
| VST_EFFECT_OPCODE_32 | User-defined Op-Code for VST extensions.
| ||||||
| VST_EFFECT_OPCODE_CUSTOM |
| ||||||
| VST_EFFECT_OPCODE_33 | Test for support of a specific named feature.
| ||||||
| VST_EFFECT_OPCODE_SUPPORTS |
| ||||||
| VST_EFFECT_OPCODE_34 | Number of samples that are at the tail at the end of playback.
| ||||||
| VST_EFFECT_OPCODE_GETTAILSAMPLES |
| ||||||
| VST_EFFECT_OPCODE_TAIL_SAMPLES |
| ||||||
| VST_EFFECT_OPCODE_35 | Notify effect that it is idle?
| ||||||
| VST_EFFECT_OPCODE_IDLE |
| ||||||
| VST_EFFECT_OPCODE_36 |
| ||||||
| VST_EFFECT_OPCODE_37 |
| ||||||
| VST_EFFECT_OPCODE_38 | Parameter Properties.
| ||||||
| VST_EFFECT_OPCODE_GET_PARAMETER_PROPERTIES |
| ||||||
| VST_EFFECT_OPCODE_PARAM_PROPERTIES |
| ||||||
| VST_EFFECT_OPCODE_39 |
| ||||||
| VST_EFFECT_OPCODE_3A | Retrieve the VST Version supported.
| ||||||
| VST_EFFECT_OPCODE_VST_VERSION |
| ||||||
| VST_EFFECT_OPCODE_3B | Editor Virtual Key Down Input.
| ||||||
| VST_EFFECT_OPCODE_EDITOR_VKEY_DOWN |
| ||||||
| VST_EFFECT_OPCODE_3C | Editor Virtual Key Up Event.
| ||||||
| VST_EFFECT_OPCODE_EDITOR_VKEY_UP |
| ||||||
| VST_EFFECT_OPCODE_3D |
| ||||||
| VST_EFFECT_OPCODE_3E | Midi related.
| ||||||
| VST_EFFECT_OPCODE_3F | Midi related.
| ||||||
| VST_EFFECT_OPCODE_40 | Midi related.
| ||||||
| VST_EFFECT_OPCODE_41 | Midi related.
| ||||||
| VST_EFFECT_OPCODE_42 | Midi related.
| ||||||
| VST_EFFECT_OPCODE_43 | Host is starting to set up a program. Emitted prior to the host loading a program.
| ||||||
| VST_EFFECT_OPCODE_PROGRAM_SET_BEGIN |
| ||||||
| VST_EFFECT_OPCODE_44 | Host is done setting up a program. Emitted after the host finished loading a program.
| ||||||
| VST_EFFECT_OPCODE_PROGRAM_SET_END |
| ||||||
| VST_EFFECT_OPCODE_45 | Host wants to know the current speaker arrangement.
| ||||||
| VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT |
| ||||||
| VST_EFFECT_OPCODE_46 | Get the next effect contained in this effect. This returns the next effect based on an effect internal counter, the host does not provide any index. Used in combination with VST_EFFECT_CATEGORY_CONTAINER.
| ||||||
| VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID |
| ||||||
| VST_EFFECT_OPCODE_47 | Begin processing of audio. Host is requesting that we prepare for a new section of audio separate from the previous section.
| ||||||
| VST_EFFECT_OPCODE_PROCESS_BEGIN |
| ||||||
| VST_EFFECT_OPCODE_48 | End processing of audio. Host is requesting that we stop processing audio and go into idle instead.
| ||||||
| VST_EFFECT_OPCODE_PROCESS_END |
| ||||||
| VST_EFFECT_OPCODE_49 |
| ||||||
| VST_EFFECT_OPCODE_4A |
| ||||||
| VST_EFFECT_OPCODE_4B | Host wants to know if we can load the provided bank data. Should be emitted prior to VST_EFFECT_OPCODE_SET_CHUNK_DATA by the host.
| ||||||
| VST_EFFECT_OPCODE_BANK_LOAD |
| ||||||
| VST_EFFECT_OPCODE_4C | Host wants to know if we can load the provided program data. Should be emitted prior to VST_EFFECT_OPCODE_PROGRAM_SET_BEGIN by the host.
| ||||||
| VST_EFFECT_OPCODE_PROGRAM_LOAD |
| ||||||
| VST_EFFECT_OPCODE_4D |
| ||||||
| VST_EFFECT_OPCODE_4E |
| ||||||
| VST_EFFECT_OPCODE_4F |
| ||||||
Definition at line 1894 of file vst.h.
| enum VST_EVENT_TYPE |
Available event types.
Seems like we can implement our own events for smooth automation and similar.
| Enumerator | |
|---|---|
| VST_EVENT_TYPE_00 | Invalid event. Crashes the host or plug-in if used. |
| VST_EVENT_TYPE_INVALID |
|
| VST_EVENT_TYPE_01 | MIDI Event. Allows casting vst_event_t to vst_event_midi_t. |
| VST_EVENT_TYPE_MIDI |
|
| VST_EVENT_TYPE_02 | |
| VST_EVENT_TYPE_03 | |
| VST_EVENT_TYPE_04 |
|
| VST_EVENT_TYPE_05 |
|
| VST_EVENT_TYPE_MIDI_SYSEX | MIDI SysEx Event. Allows casting vst_event_t to vst_event_midi_sysex_t. See: https://blog.landr.com/midi-sysex/ |
Definition at line 809 of file vst.h.
Definition at line 1010 of file vst.h.
| enum VST_HOST_OPCODE |
Plug-in to Host Op-Codes These Op-Codes are emitted by the plug-in and the host may handle them or return 0 (false).
We have no guarantees about anything actually happening.
| Enumerator | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| VST_HOST_OPCODE_00 | Update automation for a given Parameter. Must be used to notify the host that the parameter was changed by the user if a custom editor is used.
| ||||||||
| VST_HOST_OPCODE_AUTOMATE |
| ||||||||
| VST_HOST_OPCODE_PARAM_UPDATE |
| ||||||||
| VST_HOST_OPCODE_01 | Retrieve the Hosts VST Version.
| ||||||||
| VST_HOST_OPCODE_VST_VERSION |
| ||||||||
| VST_HOST_OPCODE_02 | Get the currently selected effect id in container plug-ins. Used in combination with VST_EFFECT_CATEGORY_CONTAINER.
| ||||||||
| VST_HOST_OPCODE_CURRENT_EFFECT_ID |
| ||||||||
| VST_HOST_OPCODE_03 | Some sort of idle keep-alive? Seems to be called only in editor windows when a modal popup is present. | ||||||||
| VST_HOST_OPCODE_KEEPALIVE_OR_IDLE |
| ||||||||
| VST_HOST_OPCODE_04 | |||||||||
| VST_HOST_OPCODE_05 | |||||||||
| VST_HOST_OPCODE_06 | |||||||||
| VST_HOST_OPCODE_07 | |||||||||
| VST_HOST_OPCODE_08 | |||||||||
| VST_HOST_OPCODE_09 | Send events from plug-in to host. The host must support receiving events (see vst_host_supports_t::receiveVstEvents) while the plug-in may optionally signal to the host that it wants to send events to the host (see vst_effect_supports_t::sendVstEvents).
| ||||||||
| VST_HOST_OPCODE_EVENT |
| ||||||||
| VST_HOST_OPCODE_0A | |||||||||
| VST_HOST_OPCODE_0B | |||||||||
| VST_HOST_OPCODE_0C | |||||||||
| VST_HOST_OPCODE_0D | Notify the host that numInputs/numOutputs/delay/numParams has changed. Only supported if the host replies VST_STATUS_TRUE to VST_HOST_OPCODE_SUPPORTS query for vst_host_supports_t::acceptIOChanges.
| ||||||||
| VST_HOST_OPCODE_IO_MODIFIED |
| ||||||||
| VST_HOST_OPCODE_0E | |||||||||
| VST_HOST_OPCODE_0F | Request that the host changes the size of the containing window.
| ||||||||
| VST_HOST_OPCODE_EDITOR_RESIZE |
| ||||||||
| VST_HOST_OPCODE_10 | Get the current sample rate the effect should be running at.
| ||||||||
| VST_HOST_OPCODE_GET_SAMPLE_RATE |
| ||||||||
| VST_HOST_OPCODE_11 | Get the current block size for the effect.
| ||||||||
| VST_HOST_OPCODE_GET_BLOCK_SIZE |
| ||||||||
| VST_HOST_OPCODE_12 | Current input latency. Appears to only work with ASIO input/output devices.
| ||||||||
| VST_HOST_OPCODE_INPUT_LATENCY |
| ||||||||
| VST_HOST_OPCODE_13 | Current output latency. Appears to only work with ASIO input/output devices.
| ||||||||
| VST_HOST_OPCODE_OUTPUT_LATENCY |
| ||||||||
| VST_HOST_OPCODE_14 | Get which effect is attached to the indexed input stream.
| ||||||||
| VST_HOST_OPCODE_INPUT_GET_ATTACHED_EFFECT |
| ||||||||
| VST_HOST_OPCODE_INPUT_STREAM_GET_ATTACHED_EFFECT |
| ||||||||
| VST_HOST_OPCODE_15 | Get which effect is attached to the indexed output stream.
| ||||||||
| VST_HOST_OPCODE_OUTPUT_GET_ATTACHED_EFFECT |
| ||||||||
| VST_HOST_OPCODE_OUTPUT_STREAM_GET_ATTACHED_EFFECT |
| ||||||||
| VST_HOST_OPCODE_16 | |||||||||
| VST_HOST_OPCODE_17 | Which thread is the host currently processing this call from? Useful for memory and thread safety since we can guarantee code paths don't intersect between threads in compatible hosts. Not so useful in incompatible hosts.
| ||||||||
| VST_HOST_OPCODE_GET_ACTIVE_THREAD |
| ||||||||
| VST_HOST_OPCODE_18 | |||||||||
| VST_HOST_OPCODE_19 | |||||||||
| VST_HOST_OPCODE_1A | |||||||||
| VST_HOST_OPCODE_1B | |||||||||
| VST_HOST_OPCODE_1C | |||||||||
| VST_HOST_OPCODE_1D | |||||||||
| VST_HOST_OPCODE_1E | |||||||||
| VST_HOST_OPCODE_1F | Retrieve the hosts output speaker arrangement. Seems to always reply with the data provided in VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT p_ptr.
| ||||||||
| VST_HOST_OPCODE_GET_OUTPUT_SPEAKER_ARRANGEMENT |
| ||||||||
| VST_HOST_OPCODE_OUTPUT_GET_SPEAKER_ARRANGEMENT |
| ||||||||
| VST_HOST_OPCODE_20 | Retrieve the vendor name into the ptr buffer.
| ||||||||
| VST_HOST_OPCODE_VENDOR_NAME |
| ||||||||
| VST_HOST_OPCODE_21 | Retrieve the product name into the ptr buffer.
| ||||||||
| VST_HOST_OPCODE_PRODUCT_NAME |
| ||||||||
| VST_HOST_OPCODE_22 | Retrieve the vendor version in return value.
| ||||||||
| VST_HOST_OPCODE_VENDOR_VERSION |
| ||||||||
| VST_HOST_OPCODE_23 | User defined OP Code, for custom interaction. | ||||||||
| VST_HOST_OPCODE_CUSTOM |
| ||||||||
| VST_HOST_OPCODE_24 | |||||||||
| VST_HOST_OPCODE_25 | Check if the host supports a certain feature.
| ||||||||
| VST_HOST_OPCODE_SUPPORTS |
| ||||||||
| VST_HOST_OPCODE_26 | What language is the host in?
| ||||||||
| VST_HOST_OPCODE_LANGUAGE |
| ||||||||
| VST_HOST_OPCODE_27 | Crash the host if p_ptr isn't nullptr. | ||||||||
| VST_HOST_OPCODE_28 | Crash the host if p_ptr isn't nullptr. | ||||||||
| VST_HOST_OPCODE_29 | Retrieve the directory of the effect that emitted this. The returned value seems to be unchanged for container plug-ins.
| ||||||||
| VST_HOST_OPCODE_GET_EFFECT_DIRECTORY |
| ||||||||
| VST_HOST_OPCODE_2A | Refresh everything related to the effect that called this. This includes things like parameters, programs, banks, windows, files, meters, streams, sample rate, block size, and a lot more. Anything that has to do with the effect should be refreshed when the effect calls this.
| ||||||||
| VST_HOST_OPCODE_EDITOR_UPDATE |
| ||||||||
| VST_HOST_OPCODE_REFRESH |
| ||||||||
| VST_HOST_OPCODE_2B | Notify host that a parameter is being edited. "Locks" the parameter from being edited in compatible hosts.
| ||||||||
| VST_HOST_OPCODE_PARAM_START_EDIT |
| ||||||||
| VST_HOST_OPCODE_PARAM_LOCK |
| ||||||||
| VST_HOST_OPCODE_2C | Notify host that parameter is no longer being edited. "Unlocks" the parameter for further editing in compatible hosts. Remember to call the VST_HOST_OPCODE_PARAM_UPDATE op-code afterwards so that the host knows it needs to update its automation data.
| ||||||||
| VST_HOST_OPCODE_PARAM_STOP_EDIT |
| ||||||||
| VST_HOST_OPCODE_PARAM_UNLOCK |
| ||||||||
| VST_HOST_OPCODE_2D | Crash the host depending on what p_ptr is pointing at. | ||||||||
| VST_HOST_OPCODE_2E | Crash the host depending on what p_ptr is pointing at. | ||||||||
| VST_HOST_OPCODE_2F | Crash the host depending on what p_ptr is pointing at. | ||||||||
| VST_HOST_OPCODE_30 | When queried by the plug-in shortly after VST_EFFECT_OPCODE_PROGRAM_LOAD it often crashes compatible hosts with a memory access exception. This exception can be controlled with p_ptr but it's unclear what that is pointing at so far. In the event that it doesn't crash the memory address we pointed at changes to a path.
| ||||||||
| VST_HOST_OPCODE_31 | Retrieve the hosts input speaker arrangement. Seems to always reply with the data provided in VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT p_int2.
| ||||||||
| VST_HOST_OPCODE_GET_INPUT_SPEAKER_ARRANGEMENT |
| ||||||||
| VST_HOST_OPCODE_INPUT_GET_SPEAKER_ARRANGEMENT |
| ||||||||
Definition at line 1044 of file vst.h.
| enum VST_PARAMETER_FLAG |
Flags for parameters.
| Enumerator | |
|---|---|
| VST_PARAMETER_FLAG_1ls0 | Parameter is an on/off switch.
|
| VST_PARAMETER_FLAG_SWITCH |
|
| VST_PARAMETER_FLAG_1ls1 | Parameter limits are set as integers.
|
| VST_PARAMETER_FLAG_INTEGER_LIMITS |
|
| VST_PARAMETER_FLAG_1ls2 | Parameter uses float steps.
|
| VST_PARAMETER_FLAG_STEP_FLOAT |
|
| VST_PARAMETER_FLAG_1ls3 | Parameter uses integer steps.
|
| VST_PARAMETER_FLAG_STEP_INT |
|
| VST_PARAMETER_FLAG_1ls4 | Parameter has an display order index for the default editor.
|
| VST_PARAMETER_FLAG_INDEX |
|
| VST_PARAMETER_FLAG_1ls5 | Parameter has a category for the default editor.
|
| VST_PARAMETER_FLAG_CATEGORY |
|
| VST_PARAMETER_FLAG_1ls6 | Parameter can be gradually increased/decreased. |
| VST_PARAMETER_FLAG_RAMPING |
|
| _VST_PARAMETER_FLAG_PAD | |
Definition at line 399 of file vst.h.
Known default speaker arrangements.
Definition at line 688 of file vst.h.
| enum VST_SPEAKER_TYPE |
Default speaker types.
Definition at line 579 of file vst.h.
| enum VST_STATUS |
Known Status Codes.
| Enumerator | |
|---|---|
| VST_STATUS_0 | Unknown / False We either don't know the answer or we can't handle the data/notification.
|
| VST_STATUS_FALSE |
|
| VST_STATUS_ERROR |
|
| VST_STATUS_UNKNOWN |
|
| VST_STATUS_1 | Yes / True We've handled the data/notification.
|
| VST_STATUS_TRUE |
|
| VST_STATUS_SUCCESS |
|
| VST_STATUS_YES |
|
| VST_STATUS_m1 | No We're unable to handle the data/notification.
|
| VST_STATUS_NO |
|
| _VST_STATUS_PAD | |
Definition at line 64 of file vst.h.
| enum VST_STREAM_FLAG |
Definition at line 758 of file vst.h.
| enum VST_VERSION |
Valid VST 1.x and 2.x versions The format is either a single digit or four digits in Base10 format.
Definition at line 140 of file vst.h.
| enum VST_VKEY |
Virtual Key codes.
Steinberg seems to like reinventing the wheel. What was the problem with just using the platform specific key codes?
Definition at line 184 of file vst.h.
| enum VST_VKEY_MODIFIER |
| Enumerator | |
|---|---|
| VST_VKEY_MODIFIER_1ls0 | One of the shift keys is held down. |
| VST_VKEY_MODIFIER_SHIFT |
|
| VST_VKEY_MODIFIER_1ls1 | One of the alt keys is held down. |
| VST_VKEY_MODIFIER_ALT |
|
| VST_VKEY_MODIFIER_1ls2 | Control on MacOS, System (Windows Logo) on Windows. Very funny Steinberg. |
| VST_VKEY_MODIFIER_SYSTEM |
|
| VST_VKEY_MODIFIER_1ls3 | Control on PC, System (Apple Logo) on Mac OS. I have questions. They're all "Why?!". |
| VST_VKEY_MODIFIER_CONTROL |
|
Definition at line 364 of file vst.h.