[Migration Guide] v0.3.x -> v0.4.x #7

Open
opened 2025-08-18 02:28:09 +02:00 by Xaymar · 1 comment
Xaymar commented 2025-08-18 02:28:09 +02:00 (Migrated from github.com)

This issue contains necessary information for migration from v0.3.x as well as newly supported features in v0.4.x.

Legend

  • indicates that a feature, function, or support for something was removed.
  • ⚠️ indicates a new bug, glitch or exploit.
  • 🔧 indicates a generic change, like moved files or renames.
  • 🛠️ indicates that a bug, glitch, or exploit was fixed.
  • 🆕 indicates a new feature, function, or support for something.
  • ℹ️ indicates a change in documentation that may require attention.
This issue contains necessary information for migration from v0.3.x as well as newly supported features in v0.4.x. ### Legend - ❌ indicates that a feature, function, or support for something was removed. - ⚠️ indicates a new bug, glitch or exploit. - 🔧 indicates a generic change, like moved files or renames. - 🛠️ indicates that a bug, glitch, or exploit was fixed. - 🆕 indicates a new feature, function, or support for something. - ℹ️ indicates a change in documentation that may require attention.
Xaymar commented 2025-08-18 02:58:33 +02:00 (Migrated from github.com)

Migration Guide v0.3.4 to v0.4.0

  • 🔧 To mimic proper libraries and clean up the directory structure a bit all files were moved to the include directory.

Important Changes

  • Due to Steinberg fully dropping support for VST 2.x from their official VST 3.x SDK the files for it were removed.
  • 🆕 VST_HOST_OPCODE_GET_SAMPLE_RATE and VST_HOST_OPCODE_GET_BLOCK_SIZE are now available for querying the currently set sample rate and block size. This is helpful for hosts which suck at implementing VST 2.x properly. This theme strangely continues into VST 3.x hosts too.
  • 🆕 Plug-ins can now use VST_HOST_OPCODE_EDITOR_RESIZE to request a resize of their editor window as long as the host supports sizeWindow.
  • 🆕 Plug-ins in multi-threaded hosts can now query the host for which thread is currently active using VST_HOST_OPCODE_GET_ACTIVE_THREAD. Very useful to prevent memory corruption in cases where UI and Processing happen asynchronously.
  • 🆕ℹ️ (#2, #3) The SDK now has basic event support for MIDI events which could be useful.

Not-so-important Changes

  • 🔧 The SDK now technically supports everything down to C89 and C++98 by sacrificing some functionality. I still recommend using modern C and C++ just because you won't fall into as much undefined behavior nonsense that GCC loves to "optimize" away. Yeah I'm looking at you, for and while loops that vanish or randomly turn into out-of-bounds memory accesses even though the code is correct.
  • 🆕 Figured out that some hosts return a language index with the new VST_HOST_OPCODE_LANGUAGE opcode. So far it seems to be 0 or 1 only.
  • 🆕 Some hosts allow you to query the path of the currently loaded effect via the new VST_HOST_OPCODE_GET_EFFECT_DIRECTORY opcode. It is unfortunately limited to a relatively short maximum path length.
  • 🆕 You can now ask the host for the speaker arrangement you've just told the host with VST_HOST_OPCODE_OUTPUT_GET_SPEAKER_ARRANGEMENT and VST_HOST_OPCODE_INPUT_GET_SPEAKER_ARRANGEMENT. I don't know why these exist.
  • 🆕 The input/output latency can now be queried with VST_HOST_OPCODE_INPUT_LATENCY and VST_HOST_OPCODE_OUTPUT_LATENCY, though all hosts I tested it with limited this to ASIO devices only. Not sure what use it could have.
  • ℹ️ VST_HOST_OPCODE_EDITOR_UPDATE requests a refresh of all information related to the plug-in, not just the editor
  • ℹ️ VST_HOST_OPCODE_PARAM_START_EDIT and VST_HOST_OPCODE_PARAM_STOP_EDIT are actually used to lock and unlock parameters from modification in the host through any means. Support for this behavior varies by host, but many respect the Plug-ins wishes.
  • ℹ️ Defined most of the Virtual Key Codes that are used by VST_EFFECT_OPCODE_EDITOR_VKEY_DOWN and VST_EFFECT_OPCODE_EDITOR_VKEY_UP
## Migration Guide v0.3.4 to v0.4.0 - 🔧 To mimic proper libraries and clean up the directory structure a bit all files were moved to the `include` directory. ### Important Changes - ❌ Due to Steinberg fully dropping support for VST 2.x from their official VST 3.x SDK the files for it were removed. - 🆕 `VST_HOST_OPCODE_GET_SAMPLE_RATE` and `VST_HOST_OPCODE_GET_BLOCK_SIZE` are now available for querying the currently set sample rate and block size. This is helpful for hosts which suck at implementing VST 2.x properly. This theme strangely continues into VST 3.x hosts too. - 🆕 Plug-ins can now use `VST_HOST_OPCODE_EDITOR_RESIZE` to request a resize of their editor window as long as the host supports `sizeWindow`. - 🆕 Plug-ins in multi-threaded hosts can now query the host for which thread is currently active using `VST_HOST_OPCODE_GET_ACTIVE_THREAD`. Very useful to prevent memory corruption in cases where UI and Processing happen asynchronously. - 🆕ℹ️ (#2, #3) The SDK now has basic event support for MIDI events which could be useful. ### Not-so-important Changes - 🔧 The SDK now technically supports everything down to C89 and C++98 by sacrificing some functionality. I still recommend using modern C and C++ just because you won't fall into as much undefined behavior nonsense that GCC loves to "optimize" away. Yeah I'm looking at you, for and while loops that vanish or randomly turn into out-of-bounds memory accesses even though the code is correct. - 🆕 Figured out that some hosts return a language index with the new `VST_HOST_OPCODE_LANGUAGE` opcode. So far it seems to be 0 or 1 only. - 🆕 Some hosts allow you to query the path of the currently loaded effect via the new `VST_HOST_OPCODE_GET_EFFECT_DIRECTORY` opcode. It is unfortunately limited to a relatively short maximum path length. - 🆕 You can now ask the host for the speaker arrangement you've just told the host with `VST_HOST_OPCODE_OUTPUT_GET_SPEAKER_ARRANGEMENT` and `VST_HOST_OPCODE_INPUT_GET_SPEAKER_ARRANGEMENT`. I don't know why these exist. - 🆕 The input/output latency can now be queried with `VST_HOST_OPCODE_INPUT_LATENCY` and `VST_HOST_OPCODE_OUTPUT_LATENCY`, though all hosts I tested it with limited this to ASIO devices only. Not sure what use it could have. - ℹ️ `VST_HOST_OPCODE_EDITOR_UPDATE` requests a refresh of all information related to the plug-in, not just the editor - ℹ️ `VST_HOST_OPCODE_PARAM_START_EDIT` and `VST_HOST_OPCODE_PARAM_STOP_EDIT` are actually used to lock and unlock parameters from modification in the host through any means. Support for this behavior varies by host, but many respect the Plug-ins wishes. - ℹ️ Defined most of the Virtual Key Codes that are used by `VST_EFFECT_OPCODE_EDITOR_VKEY_DOWN` and `VST_EFFECT_OPCODE_EDITOR_VKEY_UP`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: xaymar/VST2SDK#7