-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge in VSTSDK/vst3_dev_portal from main to deploy * commit 'b261ee9a5649c4d1ca7ac5d53c965b7c35a3118c': [fix] strings review [fix] typo [update] add restartcomp example for remap [update] doc [fix] link [update] license [update] doc about remap [update] history [update] history [update] remove cmake option about VST2 [update] remove any reference to VST2 Wrapper
- Loading branch information
Showing
20 changed files
with
200 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
src/pages/Technical+Documentation/Change+History/3.7.11/IRemapParamID.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
>/ [VST Home](../../../) / [Technical Documentation](../../Index.md) | ||
> | ||
># \[3.7.11\] Remap Paramater ID | ||
**On this page:** | ||
|
||
[[_TOC_]] | ||
|
||
**Related pages:** | ||
|
||
- [Moduleinfo](../../../Technical+Documentation/VST+Module+Architecture/ModuleInfo-JSON.md) | ||
- [Compatibility with VST 2.x or VST 1](../../../FAQ/Compatibility+with+VST+2.x+or+VST+1.md) | ||
|
||
--- | ||
|
||
## Introduction | ||
|
||
When a VST 3 plug-in intends to replace another one, whether it's an older version or a VST 2 version, it may be necessary to inform the host about parameter remapping. The **IRemapParamID** new plug-in interface facilitates such remapping. | ||
|
||
There is two main use cases when a plug-in requires such remapping: | ||
- When a VST 3 plug-in replaces another plug-in (whether VST 2 or a previously released VST 3 version) with a different UID. In this scenario, this new VST 3 plug-in should utilize the [Moduleinfo](../../../Technical+Documentation/VST+Module+Architecture/ModuleInfo-JSON.md) to indicate that it replaces another plug-in. Certain parameters from the older plug-in may be remapped to dedicated parameters of the new plug-in to enable the host resynchronize any references to older parameters (such as in automation or remote control). | ||
For example, VST 2 parameters are identified using indices, while VST 3 parameters utilize ParamIDs. With this new interface, hosts can remap the older indices to the new associated ParamIDs if there are not the same. | ||
|
||
- When a VST 3 plug-in is updated to a new version wherein some parameters have changed their ParamIDs. Upon loading a project, the plug-in detects that the project was created with an older version and notifies the host (**kParamIDMappingChanged**) that the **IRemapParamID** interface must be used for resynchronize certain parameters (if the host already has references to plug-in parameters, such as in automation). | ||
|
||
## IRemapParamID | ||
|
||
The Plug-in has to implement this interface **IRemapParamID** in its *EditController*. The retrieved paramID should match the one it replaces, maintaining the same behavior during automation playback. | ||
|
||
- \[plug imp\] | ||
- \[released: 3.7.11\] | ||
|
||
## RestartFlags: kParamIDMappingChanged | ||
|
||
In the second use case defined above, upon loading its state, the plug-in informs the host of parameter ID changes using the **kParamIDMappingChanged** flag within the *IComponentHandler::restartComponent* function. This notification should be triggered by the *EditController* whithin the **setComponentState** or **setState** methods (during project loading). Subsequently, the host can remap any utilized parameters, such as automation, by utilizing the **IRemapParamID** interface. | ||
|
||
- \[plug imp\] | ||
- \[released: 3.7.11\] | ||
|
||
## Example | ||
|
||
**In controller.h**: | ||
|
||
``` c++ | ||
//------------------------------------------------------------------------ | ||
class TestRemapParamIDController : public EditController, public IRemapParamID | ||
{ | ||
public: | ||
//... | ||
//--- from IRemapParamID --------------------------------------------- | ||
tresult PLUGIN_API getCompatibleParamID (const TUID pluginToReplaceUID /*in*/, | ||
Vst::ParamID oldParamID /*in*/, | ||
Vst::ParamID& newParamID /*out*/) override; | ||
|
||
//--- from EditController -------------------------------------------- | ||
tresult PLUGIN_API setComponentState (IBStream* state) override; | ||
|
||
//---Interface--------- | ||
DEFINE_INTERFACES | ||
DEF_INTERFACE (IRemapParamID) | ||
END_DEFINE_INTERFACES (EditController) | ||
DELEGATE_REFCOUNT (EditController) | ||
//... | ||
}; | ||
``` | ||
**In controller.cpp**: | ||
``` c++ | ||
//------------------------------------------------------------------------ | ||
tresult PLUGIN_API TestRemapParamIDController::getCompatibleParamID (const TUID pluginToReplaceUID, | ||
Vst::ParamID oldParamID, | ||
Vst::ParamID& newParamID) | ||
{ | ||
//--- We want to replace the AGain plug-in------- | ||
//--- check if the host is asking for remapping parameter of the AGain plug-in | ||
static const FUID AGainProcessorUID (0x84E8DE5F, 0x92554F53, 0x96FAE413, 0x3C935A18); | ||
FUID uidToCheck (FUID::fromTUID (pluginToReplaceUID)); | ||
if (AGainProcessorUID != uidToCheck) | ||
return kResultFalse; | ||
//--- host wants to remap from AGain------------ | ||
newParamID = -1; | ||
switch (oldParamID) | ||
{ | ||
//--- map the kGainId (0) to our param kMyGainParamTag | ||
case 0: | ||
{ | ||
newParamID = kMyGainParamTag; | ||
break; | ||
} | ||
} | ||
//--- return kResultTrue if the mapping happens------------ | ||
return (newParamID == -1) ? kResultFalse : kResultTrue; | ||
} | ||
//------------------------------------------------------------------------ | ||
tresult PLUGIN_API TestRemapParamIDController::setComponentState (IBStream* state) | ||
{ | ||
//... | ||
IBStreamer streamer (state, kLittleEndian); | ||
// Read the state | ||
bool remapNeeded = false; | ||
// here if we decode that the state was from an older plug-in | ||
//... | ||
// then restartComponent | ||
if (remapNeeded) | ||
componentHandler->restartComponent (kParamIDMappingChanged); | ||
return kResultOk; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,11 @@ You can choose between the [Proprietary Steinberg VST 3](#proprietary-steinberg- | |
|
||
## Proprietary Steinberg VST 3 license | ||
|
||
The "***Proprietary Steinberg VST 3***" license allows you to distribute your **VST 3** plug-in/host in a binary form. However, please note the following requirements: | ||
The "**Proprietary Steinberg VST 3**" license allows you to distribute your **VST 3** plug-in/host in a binary form. However, please note the following requirements: | ||
- You need written permission from **Steinberg Media Technologies GmbH** in order to distribute your **VST 3** plug-in/host (Steinberg will send you the countersigned License agreement included in the SDK that you signed and sent to us). | ||
- You need to mention **Steinberg Media Technologies GmbH** in the about box and/or documentation of your **VST 3** plug-in/host and follow the [Steinberg VST usage guidelines](Usage+guidelines.md). | ||
|
||
For more details please read the "***Proprietary Steinberg VST 3***" license agreement. If you accept it, please enter all required information, sign it and send it back to us, either via land mail (to the [Steinberg address](https://o.steinberg.net/en/extras/about.html) mentioned in the license), or via e-mail to [[email protected]](mailto:[email protected]) or via fax (+49 (0)40 210 35-300). We will countersign the license agreement and send it back to you. | ||
For more details please read the "**Proprietary Steinberg VST 3**" license agreement. If you accept it, please enter all required information, sign it and send it back to us, either via land mail (to the [Steinberg address](https://o.steinberg.net/en/extras/about.html) mentioned in the license), or via e-mail to [[email protected]](mailto:[email protected]) or via fax (+49 (0)40 210 35-300). We will countersign the license agreement and send it back to you. | ||
|
||
>ⓘ **As PDF**\ | ||
> [The License agreement](../../resources/VST3_License_Agreement.pdf) is part of the VST SDK package, too. | ||
|
@@ -41,7 +41,7 @@ For more information about [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html) | |
``` | ||
//---------------------------------------------------------------------------- | ||
// LICENSE | ||
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved | ||
// (c) 2024, Steinberg Media Technologies GmbH, All Rights Reserved | ||
//---------------------------------------------------------------------------- | ||
This license applies only to files referencing this license, | ||
for other files of the Software Development Kit therespective embedded license text | ||
|
Oops, something went wrong.