# FR: Allow custom VST3 UIDs

**URL:** <https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490>\
**Category:** Feature Requests\
**Created:** [May 21, 2024, 6:27pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490 "2024-05-21T18:27:21Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![cal](https://avatars.discourse-cdn.com/v4/letter/c/f1d935/32.png) [@cal](https://forum.juce.com/u/cal)\
**Post date:** [May 21, 2024, 6:27pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/1 "2024-05-21T18:27:22Z")

</div>

Hello,

I’m currently working on a project that uses a JUCE wrapper to replace a VST SDK-based plugin (and several other wrappers). With a matching Manufacturer Code and Plugin Code, I can get the VST2 and AU versions of the JUCE plugin to replace the existing plugin in DAW projects.

But for VST3, the UID that the host uses to identify plugins is partially hard-coded in JUCE:

```auto
inline static const FUID iid { TUID INLINE_UID (0xABCDEF01, 0x9182FAEB, JucePlugin_ManufacturerCode, JucePlugin_PluginCode) };

```

To get the new VST3 to replace the old one, the whole UID must be the same, so there is no choice but to modify this line in the JUCE source code.

My request then is some way of setting the entire VST3 UID with a JUCE setting.

Thank you for your consideration.

---

<div class="post-metadata">

**Author:** ![realMatous](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@realMatous](https://forum.juce.com/u/realMatous)\
**Post date:** [September 1, 2025, 3:15pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/2 "2025-09-01T15:15:48Z")

</div>

+1

I am dealing with the same issue, porting old code to JUCE and some way of assigning manual VST3 IDs. Any ideas?

---

<div class="post-metadata">

**Author:** ![HansTheFourth](https://avatars.discourse-cdn.com/v4/letter/h/848f3c/32.png) [@HansTheFourth](https://forum.juce.com/u/HansTheFourth)\
**Post date:** [October 7, 2025, 11:21am UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/3 "2025-10-07T11:21:56Z")

</div>

This seems to do the trick (in my particular situation), but I’d appreciate some input from someone more experienced. So far only tested in Reaper (win and macOS).

In juce\_VST3ModuleInfo.h:

```auto
[[maybe_unused]] static VST3Interface::Id getVST3InterfaceId (VST3Interface::Type interfaceType)
{
   #if JUCE_VST3_CAN_REPLACE_VST2
    if (interfaceType == VST3Interface::Type::controller || interfaceType == VST3Interface::Type::component)
        return VST3Interface::vst2PluginId (JucePlugin_VSTUniqueID, JucePlugin_Name, interfaceType);
   #endif

#if defined(CUSTOM_UID)
	if (interfaceType == VST3Interface::Type::component)
	{
		auto res = VST3Interface::Id();
		constexpr std::array<unsigned, 4> UID = CUSTOM_UID;

		for (int i = 0; i < 16; ++i)
		{
			const unsigned pos = i / 4;
			const unsigned off = (3 - (i % 4)) * 8; // big-endian
			res[i] = static_cast<std::byte>((UID[pos] >> off) & 0xFF);
		}
#if JUCE_WINDOWS
		std::swap(res[0], res[3]);
		std::swap(res[1], res[2]);
		std::swap(res[4], res[5]);
		std::swap(res[6], res[7]);
#endif

		return res;
	}
#endif

    return VST3Interface::jucePluginId (JucePlugin_ManufacturerCode, JucePlugin_PluginCode, interfaceType);
}

```

In your project’s preprocessor definitions (example):  
`CUSTOM_UID={0x01234567,0x89ABCDEF,0x78965412,0x19732846}`

---

<div class="post-metadata">

**Author:** ![anthony-nicholls](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/anthony-nicholls/32/1246_2.png) [@anthony-nicholls](https://forum.juce.com/u/anthony-nicholls)\
**Post date:** [October 7, 2025, 12:19pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/4 "2025-10-07T12:19:17Z")

</div>

Rather than having to change JUCE can you use [`JUCE_VST3_COMPATIBLE_CLASSES`](https://docs.juce.com/develop/juce__VST3ClientExtensions_8h.html#a7c706b37d98b969d8e690c0e9c9f24ff) to add the VST3 UID you need to be compatible with?

---

<div class="post-metadata">

**Author:** ![HansTheFourth](https://avatars.discourse-cdn.com/v4/letter/h/848f3c/32.png) [@HansTheFourth](https://forum.juce.com/u/HansTheFourth)\
**Post date:** [October 7, 2025, 1:17pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/5 "2025-10-07T13:17:05Z")

</div>

I must be doing something wrong, because this doesn’t work for me. I replaced the custom UID macro with this:  
`JUCE_VST3_COMPATIBLE_CLASSES=VST3Interface::hexStringToId(“0123456789ABCDEF7896541219732846”)`  
but Reaper doesn’t recognize it as the same plugin. It might also be a DAW issue, but that’s all the more reason to actually use the old UID.

Another (definitely not me doing things wrong) issue is that this approach doesn’t work if the user decides to go to a previous (pre-JUCE) version. Even though it would be a PITA to modify JUCE on every machine with every JUCE update, I’d still prefer to do that than introduce easily avoidable incompatibility.

EDIT: I guess the hexStringToId() approach needs some/all of the byte shuffling done when creating the UID string, is that correct? Still, I think my second point stands.

---

<div class="post-metadata">

**Author:** ![anthony-nicholls](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/anthony-nicholls/32/1246_2.png) [@anthony-nicholls](https://forum.juce.com/u/anthony-nicholls)\
**Post date:** [October 7, 2025, 2:24pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/6 "2025-10-07T14:24:26Z")

</div>

> [@HansTheFourth](#):
>
> EDIT: I guess the hexStringToId() approach needs some/all of the byte shuffling done when creating the UID string, is that correct? Still, I think my second point stands.

Yes you would need to check what the actual value is of the VST3 you want to replace.

Looking back at the implementation you’ve suggested I think if we add something like this we would expect the `CUSTOM_UID` to be the correct UID, no need to shuffle bytes. That should also make managing the change in JUCE for yourself that little bit easier.

---

<div class="post-metadata">

**Author:** ![HansTheFourth](https://avatars.discourse-cdn.com/v4/letter/h/848f3c/32.png) [@HansTheFourth](https://forum.juce.com/u/HansTheFourth)\
**Post date:** [October 7, 2025, 2:27pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/7 "2025-10-07T14:27:41Z")

</div>

Having it be the final UID without shuffling bytes is fair enough I guess.

I keep trying to figure out the hexStringToId() approach, but it just doesn’t want to work. I got to a point where my original implementation and hexStringToId() return the same byte array, but Reaper still doesn’t replace the instance with the new version.

---

<div class="post-metadata">

**Author:** ![anthony-nicholls](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/anthony-nicholls/32/1246_2.png) [@anthony-nicholls](https://forum.juce.com/u/anthony-nicholls)\
**Post date:** [October 7, 2025, 2:48pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/8 "2025-10-07T14:48:07Z")

</div>

I’m surprised, I thought reaper supported it.

Maybe check out the **VST3PluginTestHost** in the SDK ([VST 3 Plug-in Test Host - VST 3 Developer Portal](https://steinbergmedia.github.io/vst3_dev_portal/pages/What+is+the+VST+3+SDK/Plug-in+Test+Host.html#vst-3-plug-in-test-host))

If nothing else I think you can use this to give you the UID you need from the original plugin.

---

<div class="post-metadata">

**Author:** ![HansTheFourth](https://avatars.discourse-cdn.com/v4/letter/h/848f3c/32.png) [@HansTheFourth](https://forum.juce.com/u/HansTheFourth)\
**Post date:** [October 7, 2025, 3:45pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/9 "2025-10-07T15:45:35Z")

</div>

I’m not sure how to check whether or not it works in the test host. I did just try it in Cubase and it doesn’t work there either, so I’m really confused…

EDIT: I just double checked and the byte arrays produced by my code and hexStringToId() are definitely the same, so I really have no idea what’s going on. Is there something more needed for this to work? I assumed not overriding VST3ClientExtensions::getCompatibleParameterIds() would just result in state being messed up, am I wrong?

---

<div class="post-metadata">

**Author:** ![anthony-nicholls](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/anthony-nicholls/32/1246_2.png) [@anthony-nicholls](https://forum.juce.com/u/anthony-nicholls)\
**Post date:** [October 16, 2025, 8:00pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/10 "2025-10-16T20:00:43Z")

</div>

Please check out the develop branch, we’ve added a new preprocessor definition `JUCE_VST3_COMPONENT_CLASS` this should be defined as a quoted string containing 32 hex characters representing the the class ID you want to use [VST3: Add support for defining a custom VST3 component class ID · juce-framework/JUCE@1294562 · GitHub](https://github.com/juce-framework/JUCE/commit/1294562075528b2fe836a6d7891afee410535913)

---

<div class="post-metadata">

**Author:** ![HansTheFourth](https://avatars.discourse-cdn.com/v4/letter/h/848f3c/32.png) [@HansTheFourth](https://forum.juce.com/u/HansTheFourth)\
**Post date:** [October 17, 2025, 9:02am UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/11 "2025-10-17T09:02:36Z")

</div>

Awesome, that works great! Thank you.

---

<div class="post-metadata">

**Author:** ![siedschl](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@siedschl](https://forum.juce.com/u/siedschl)\
**Post date:** [March 7, 2026, 6:26pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/12 "2026-03-07T18:26:10Z")

</div>

I am TRYING to get this to work but somehow the result I see in Steinberg’s validator is not what I have defined. But the root of the issue for me is: a plugin that previously was built with JUCE 6.1.4 now has a different class ID when built with the very latest JUCE, even though plugin and manufacturer code have definitely not changed. I couldn’t find any breaking changes that would have caused this, so what could be going on? Obviously this kills backwards compatibility…?

EDIT: ah, it was another case of JUCE\_VST3\_CAN\_REPLACE\_VST2 having a different value now. Sorry… that is kind of a tricky one though…

---

<div class="post-metadata">

**Author:** ![anthony-nicholls](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/anthony-nicholls/32/1246_2.png) [@anthony-nicholls](https://forum.juce.com/u/anthony-nicholls)\
**Post date:** [March 7, 2026, 10:49pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/13 "2026-03-07T22:49:32Z")

</div>

> [@siedschl](#):
>
> ah, it was another case of JUCE\_VST3\_CAN\_REPLACE\_VST2 having a different value now

Is it that `JUCE_VST3_CAN_REPLACE_VST2` was enabled in your JUCE 6 version and wasn’t in the JUCE 8 version? Do you know why this value changed for you? i.e. are you saying JUCE caused the value to change or was this an error on your end?

As a side note if you have `JUCE_VST3_CAN_REPLACE_VST2` enabled you probably also want to check the value of `JUCE_FORCE_USE_LEGACY_PARAM_IDS`, if this is enabled in both your old and new projects there is nothing more to do. If it _isn’t_ enabled then you should get a warning on the latest version of JUCE explaining what to do next.

---

<div class="post-metadata">

**Author:** ![siedschl](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@siedschl](https://forum.juce.com/u/siedschl)\
**Post date:** [March 8, 2026, 8:38am UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/14 "2026-03-08T08:38:54Z")

</div>

It was my mistake, I went through all the Projucer settings when setting everything up for JUCE8 and I thought “Why would I want this enabled, there was already a VST3 version of the plugin with JUCE6 so if a user still chose to use the VST2 there is probably a reason for it”, hence I disabled that setting. Not suspecting that this would cause the plugin ID to change, of course.

---

<div class="post-metadata">

**Author:** ![anthony-nicholls](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/anthony-nicholls/32/1246_2.png) [@anthony-nicholls](https://forum.juce.com/u/anthony-nicholls)\
**Post date:** [March 8, 2026, 2:30pm UTC](https://forum.juce.com/t/fr-allow-custom-vst3-uids/61490/15 "2026-03-08T14:30:27Z")

</div>

Thanks that’s useful to know. For what it’s worth one reason you might want to keep `JUCE_VST3_CAN_REPLACE_VST2` enabled (ignoring the fact that it changes the ID) is if a user were ever to open some DAW session that was originally saved with the VST2 version. Or even if they wanted to load a preset that was originally saved in the DAW using the VST2 version, you would likely need it enabled.
