This is a migration guide for anyone that uses this SDK recreation. A lot has changed thanks to scanning thousands of available VST 1.x and 2.x plug-ins automatically instead of going through them manually.
Generic Changes
- All type definitions via
typedef and struct should now have the proper _t suffix attached.
enums that incorrectly had a plural name now have a singular name, i.e. FLAGS -> FLAG.
char[] buffer sizes are now in their own enum instead of #define and have been split by what they're for and their stated size is now correct.
- The code should now be compliant with C99 standards and compile in all C and C++ compilers if included as a C header. If the C++ compiler does not support C headers the minimum C++ version is C++20 or most compilers with proprietary extensions enabled.
Effect Changes
- The recreated SDK now has almost all categories deciphered into what they're most likely to be. This is respected by DAW software like Adobe Audition, FL Studio, etc. In some hosts this even changes how the host interacts with your effect.
- The super rare container plug-in is now properly documented and supported, see
VST_EFFECT_CATEGORY_CONTAINER for more information. Note that hosts may not actually support container plug-ins so it is not a safe option to use.
- Effect flags were moved into their own enumeration named
VST_EFFECT_FLAG
- Discovered an alternative bypass functionality that many VST 2.3+ hosts implement that is enabled by returning
VST_STATUS_TRUE from the VST_EFFECT_OPCODE_SUPPORTS query for bypass. This alternative mode requires the plug-in to handle the whole bypass code instead of having the host handle it. Could be useful for effects that require a constant feed of data or they regain their initial delay. See documentation for vst_effect_supports.bypass for more information.
- Found a few hosts that implement the old VST 2.3 behavior instead of the new VST 2.4 behavior. These hosts expect us to implement
VST_EFFECT_OPCODE_IDLE and have optional support for VST_EFFECT_PROCESS_BEGIN and VST_EFFECT_PROCESS_END. You can query the host for support using startStopProcess, see vst_host_supports.startStopProcess. I recommend an additional host version check when the plug-in is loaded to ensure that you are in a 2.4 or later host.
- Added
#defines for the actual default values that VST 1.x and 2.x expects your plug-in to default to as VST_DEFAULT_SAMPLE_RATE and VST_DEFUALT_BLOCK_SIZE. Hosts are not required to change the sample rate of your plug-in to match these defaults, but many of them do as a safety precaution.
Custom Editor Changes
vst_rect_t is now in the correct counter-clockwise order as defined by Steinberg instead of the same order as RECT from WinAPI. Adjust your code accordingly.
- A lot of effect op-codes had their documentation improved or entirely replaced in order to improve the code.
- For automatable parameters we must notify the host about changes using the new
VST_HOST_OPCODE_AUTOMATE op-code. This expects the parameter index as well as a float representation of the value - even for integer parameters.
- For all parameters we need to notify the host that the user has started or stopped editing a parameter in our user interface using
VST_HOST_OPCODE_PARAM_START_EDIT and VST_HOST_OPCODE_PARAM_STOP_EDIT.
- On Mac OS we can request that the host redraws the editor window using
VST_HOST_OPCODE_EDITOR_UPDATE. Doesn't appear to be supported by all hosts as many just ignore it.
Parameter Changes
- The final flag is now properly documented as
VST_PARAMETER_FLAG_RAMPING. It allows the host to gradually increase/decrease the value of a parameter if it is automated instead of snapping to the target value immediately.
- The float value representing a parameter is expected to be normalized inclusively between 0.0 and 1.0 in quite a lot of hosts. I'm not yet sure if this also affects integer parameters that are converted to floats.
- A new op-code
VST_EFFECT_OPCODE_PARAM_VALUE_FROM_STRING is added that allows the host to set a parameter from a string. This complements VST_EFFECT_OPCODE_PARAM_GET_VALUE which is used to do the opposite. The functions set_parameter and get_parameter appear to be only used for parameters that are automatable but not all hosts respect this and usually the functions have priority.
Program/Bank Changes
- Added the
VST_EFFECT_FLAG_CHUNKS flag to indicate support for saving and loading of banks and programs. Take a look at VST_EFFECT_OPCODE_SET_CHUNK_DATA and VST_EFFECT_OPCODE_GET_CHUNK_DATA for further information. A bank appears to be a collection of program data.
- Added the op-codes
VST_EFFECT_OPCODE_PROGRAM_SET_BEGIN and VST_EFFECT_OPCODE_PROGRAM_SET_END which are called by the host to notify the plug-in that the host is now loading a program. These have no parameters so it's likely for the currently selected program.
- Added the op-code
VST_EFFECT_OPCODE_PROGRAM_LOAD which is sent prior to the op-codes in (2), but it uses a yet unknown structured format.
Input/Output Changes
- It is now possible to ask the host if it supports dynamic input/output changes via the
VST_HOST_OPCODE_SUPPORTS query for acceptIOChanges. If it returns true from this we can emit VST_HOST_OPCODE_IO_MODIFIED after we adjust the num_inputs, num_outputs, num_programs and/or delay values in our effect. This behavior is only valid while we are currently idle so it can't be tied to anything that would be automatable. Depending on the host an idle plug-in is either receiving VST_EFFECT_OPCODE_IDLE or currently between the VST_EFFECT_OPCODE_PROCESS_END and VST_EFFECT_OPCODE_PROCESS_START group. See vst_host_supports.acceptIOChanges for more information.
- Speaker properties now have placement definitions for the speakers using Azimuth, Altitude and Distance for proper mixing support. These appear to be ignored if the speaker is not of a custom type.
- Additional valid speaker arrangements were found for 4.0, 5.0 and 7.1.
- Fixed the definition for speaker types incorrectly claiming the Rear Surround speakers are Side speakers. Adjust your code accordingly to support proper 4.0/5.0/5.1 audio.
- Figured out that the
VST_EFFECT_OPCODE_INPUT_GETCHANNELNAME and VST_EFFECT_OPCODE_OUTPUT_GETCHANNELNAME actually point to a structure describing each input/output stream. Therefore a new structure was created called vst_stream_properties_t that should be used to describe each input/output stream that you support. Seems to be used by the host for num_inputs and num_outputs. The new op-codes are VST_EFFECT_OPCODE_INPUT_GET_PROPERTIES and VST_EFFECT_OPCODE_OUTPUT_GET_PROPERTIES.
This is a migration guide for anyone that uses this SDK recreation. A lot has changed thanks to scanning thousands of available VST 1.x and 2.x plug-ins automatically instead of going through them manually.
Generic Changes
typedefandstructshould now have the proper_tsuffix attached.enums that incorrectly had a plural name now have a singular name, i.e.FLAGS->FLAG.char[]buffer sizes are now in their ownenuminstead of#defineand have been split by what they're for and their stated size is now correct.Effect Changes
VST_EFFECT_CATEGORY_CONTAINERfor more information. Note that hosts may not actually support container plug-ins so it is not a safe option to use.VST_EFFECT_FLAGVST_STATUS_TRUEfrom theVST_EFFECT_OPCODE_SUPPORTSquery forbypass. This alternative mode requires the plug-in to handle the whole bypass code instead of having the host handle it. Could be useful for effects that require a constant feed of data or they regain their initial delay. See documentation forvst_effect_supports.bypassfor more information.VST_EFFECT_OPCODE_IDLEand have optional support forVST_EFFECT_PROCESS_BEGINandVST_EFFECT_PROCESS_END. You can query the host for support usingstartStopProcess, seevst_host_supports.startStopProcess. I recommend an additional host version check when the plug-in is loaded to ensure that you are in a 2.4 or later host.#defines for the actual default values that VST 1.x and 2.x expects your plug-in to default to asVST_DEFAULT_SAMPLE_RATEandVST_DEFUALT_BLOCK_SIZE. Hosts are not required to change the sample rate of your plug-in to match these defaults, but many of them do as a safety precaution.Custom Editor Changes
vst_rect_tis now in the correct counter-clockwise order as defined by Steinberg instead of the same order asRECTfrom WinAPI. Adjust your code accordingly.VST_HOST_OPCODE_AUTOMATEop-code. This expects the parameter index as well as a float representation of the value - even for integer parameters.VST_HOST_OPCODE_PARAM_START_EDITandVST_HOST_OPCODE_PARAM_STOP_EDIT.VST_HOST_OPCODE_EDITOR_UPDATE. Doesn't appear to be supported by all hosts as many just ignore it.Parameter Changes
VST_PARAMETER_FLAG_RAMPING. It allows the host to gradually increase/decrease the value of a parameter if it is automated instead of snapping to the target value immediately.VST_EFFECT_OPCODE_PARAM_VALUE_FROM_STRINGis added that allows the host to set a parameter from a string. This complementsVST_EFFECT_OPCODE_PARAM_GET_VALUEwhich is used to do the opposite. The functionsset_parameterandget_parameterappear to be only used for parameters that are automatable but not all hosts respect this and usually the functions have priority.Program/Bank Changes
VST_EFFECT_FLAG_CHUNKSflag to indicate support for saving and loading of banks and programs. Take a look atVST_EFFECT_OPCODE_SET_CHUNK_DATAandVST_EFFECT_OPCODE_GET_CHUNK_DATAfor further information. A bank appears to be a collection of program data.VST_EFFECT_OPCODE_PROGRAM_SET_BEGINandVST_EFFECT_OPCODE_PROGRAM_SET_ENDwhich are called by the host to notify the plug-in that the host is now loading a program. These have no parameters so it's likely for the currently selected program.VST_EFFECT_OPCODE_PROGRAM_LOADwhich is sent prior to the op-codes in (2), but it uses a yet unknown structured format.Input/Output Changes
VST_HOST_OPCODE_SUPPORTSquery foracceptIOChanges. If it returns true from this we can emitVST_HOST_OPCODE_IO_MODIFIEDafter we adjust thenum_inputs,num_outputs,num_programsand/ordelayvalues in our effect. This behavior is only valid while we are currently idle so it can't be tied to anything that would be automatable. Depending on the host an idle plug-in is either receivingVST_EFFECT_OPCODE_IDLEor currently between theVST_EFFECT_OPCODE_PROCESS_ENDandVST_EFFECT_OPCODE_PROCESS_STARTgroup. Seevst_host_supports.acceptIOChangesfor more information.VST_EFFECT_OPCODE_INPUT_GETCHANNELNAMEandVST_EFFECT_OPCODE_OUTPUT_GETCHANNELNAMEactually point to a structure describing each input/output stream. Therefore a new structure was created calledvst_stream_properties_tthat should be used to describe each input/output stream that you support. Seems to be used by the host fornum_inputsandnum_outputs. The new op-codes areVST_EFFECT_OPCODE_INPUT_GET_PROPERTIESandVST_EFFECT_OPCODE_OUTPUT_GET_PROPERTIES.