# Juce 4.2 broke VST3 over-shadows VST2 (Cubase)

**URL:** <https://forum.juce.com/t/juce-4-2-broke-vst3-over-shadows-vst2-cubase/20391>\
**Category:** Audio Plugins\
**Created:** [December 26, 2016, 2:07pm UTC](https://forum.juce.com/t/juce-4-2-broke-vst3-over-shadows-vst2-cubase/20391 "2016-12-26T14:07:29Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttg](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ttg/32/14456_2.png) [@ttg](https://forum.juce.com/u/ttg)\
**Post date:** [December 26, 2016, 2:07pm UTC](https://forum.juce.com/t/juce-4-2-broke-vst3-over-shadows-vst2-cubase/20391/1 "2016-12-26T14:07:29Z")

</div>

Happy Holidays!  
It seems that somewhere on the way something got broken for VST2/VST3 layouts.

Expected behavior:  
Usually Cubase **ONLY** shows and uses the VST3 plug-in version when/if available.  
 ![](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/3/3ee6246648cd54e8289b63f8fc9518510476e739.png)

Current regression behavior:  
Cubase shows both.  
 ![](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/1/1991b61779a79350cb4beebbbbf0c2fa2fd3aff9.png)

They’re still interchangeable (no harm done). when VST2 unavailable it’ll load VST3 and vice-versa.

I’ve yet to throughly bisect/investigate this but I can reproduce it since 4.2.0 tag.  
v4.1.0 doesn’t suffer from this issue.

**I’ve tested:**  
JuceDemoPlugin  
NoiseGate

---

<div class="post-metadata">

**Author:** ![ttg](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ttg/32/14456_2.png) [@ttg](https://forum.juce.com/u/ttg)\
**Post date:** [December 28, 2016, 11:26am UTC](https://forum.juce.com/t/juce-4-2-broke-vst3-over-shadows-vst2-cubase/20391/2 "2016-12-28T11:26:03Z")

</div>

Another observation,  
Since monolithic plug-ins **DOES** exists (for Windows…) I’ve checked latest master (#1066a). and on Windows this is working as expected.  
So this is a Mac issue\*?

---

<div class="post-metadata">

**Author:** ![ttg](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ttg/32/14456_2.png) [@ttg](https://forum.juce.com/u/ttg)\
**Post date:** [January 2, 2017, 11:14am UTC](https://forum.juce.com/t/juce-4-2-broke-vst3-over-shadows-vst2-cubase/20391/3 "2017-01-02T11:14:28Z")

</div>

Friendly 2017 bump 😉

So it seems that it got broken when switching to newer JUCE Shared Code.

Again this is a Mac issue.  
I’ve also made sanity of Cubase with non-JUCE VST3/VST2 plug-ins. the expected behavior is VST3 will show while VST2 will hide (If Cubase consider them such).

Fun long commit to check:

> <https://github.com/WeAreROLI/JUCE/commit/70949aa0c6de95ed7814e97061a81aa1e27bcf80>

---

<div class="post-metadata">

**Author:** ![ttg](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ttg/32/14456_2.png) [@ttg](https://forum.juce.com/u/ttg)\
**Post date:** [January 2, 2017, 11:52am UTC](https://forum.juce.com/t/juce-4-2-broke-vst3-over-shadows-vst2-cubase/20391/4 "2017-01-02T11:52:08Z")

</div>

So as it seems the switch to separated (non-polymorphic) plug-in build has the following bug:  
Such logic:  
`#if JucePlugin_Build_VST3 && JUCE_VST3_CAN_REPLACE_VST2`  
(juce\_VST\_Wrapper.cpp) wouldn’t work as **JucePlugin\_Build\_VST3** is explicitly set to 0 for VST!

This should be fixed asap. as any plug-in released since 4.2 would have this ugly behavior under Cubase.

---

<div class="post-metadata">

**Author:** ![yairadix](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yairadix/32/1114_2.png) [@yairadix](https://forum.juce.com/u/yairadix)\
**Post date:** [January 2, 2017, 3:58pm UTC](https://forum.juce.com/t/juce-4-2-broke-vst3-over-shadows-vst2-cubase/20391/5 "2017-01-02T15:58:31Z")

</div>

For other folks needing this fixed, we now have this problem fixed in the SR branch

> <https://github.com/soundradix/JUCE/commit/ddc442c531cc053d76c2ec1103cb75d403e51bcd>

Cheers, Yair

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [January 3, 2017, 7:28pm UTC](https://forum.juce.com/t/juce-4-2-broke-vst3-over-shadows-vst2-cubase/20391/6 "2017-01-03T19:28:10Z")

</div>

We’ll look into this…

---

<div class="post-metadata">

**Author:** ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)\
**Post date:** [January 12, 2017, 11:34am UTC](https://forum.juce.com/t/juce-4-2-broke-vst3-over-shadows-vst2-cubase/20391/7 "2017-01-12T11:34:31Z")

</div>

This is now fixed on the develop branch.

---

<div class="post-metadata">

**Author:** ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)\
**Post date:** [January 25, 2017, 4:33pm UTC](https://forum.juce.com/t/juce-4-2-broke-vst3-over-shadows-vst2-cubase/20391/8 "2017-01-25T16:33:21Z")

</div>

> [@t0m](#):
>
> This is now fixed on the develop branch.

I am sorry, but the committed solution breaks some code of mine. I’ll explain:

What I need to do is forward a `vendorSpecific()` call received by my VST2 to the underlying `AudioProcessor`, which implements the proper response to it.

For that purpose, I asked a feature to be added a while back: [Forward unhandled VST vendorSpecific() calls to AudioProcessor?](https://forum.juce.com/t/forward-unhandled-vst-vendorspecific-calls-to-audioprocessor/16650))

Since nothing came out of that request, I have resorted to changing the JUCE code in a minimal way myself: added a virtual callback to `AudioProcessor`, and called it from the `handleManufacturerSpecific()` method that was part of the VST2 wrapper, instead of immediately returning 0 from it (this is described in my second post in the topic linked above).

Your fix has now delegated the handling of that opcode to a free function (`handleManufacturerSpecificVST2Opcode()`) that is completely outside of the wrapper.

While I understand your reason for doing so, this strips away that callback from its intended context, and it doesn’t even receive a pointer to the underlying `AudioProcessor`, which makes it completely impossible for me to call that virtual callback I added to `AudioProcessor` for my purpose.

Now, I’d like if you could solve this in one of the following ways (preferred way comes first):

1. Provide a way for `AudioProcessor` to receive and respond vendorSpecific() calls that are not handled by the VST2 wrapper internally, which was my original request.  
After much fiddling I don’t think there is a good cross-format way to do that, so I think that adding a virtual callback to `AudioProcessor` like I did, possibly guarded by `#ifdef JucePlugin_Build_VST2`, is acceptable.

2. Bring the `handleManufacturerSpecific()` method back into the wrapper, and call from there your free function `handleManufacturerSpecificVST2Opcode()`. This will at least allow me to rebase my code with minimal changes.

3. Add to your free function an additional `AudioProcessor&` argument, that I can use to call my virtual callback.

---

<div class="post-metadata">

**Author:** ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)\
**Post date:** [February 1, 2017, 12:11pm UTC](https://forum.juce.com/t/juce-4-2-broke-vst3-over-shadows-vst2-cubase/20391/9 "2017-02-01T12:11:26Z")

</div>

See the other topic for a resolution.
