# Custom VST2 opcodes when both plugin and host written with JUCE

**URL:** <https://forum.juce.com/t/custom-vst2-opcodes-when-both-plugin-and-host-written-with-juce/26928>\
**Category:** General JUCE discussion\
**Created:** [March 22, 2018, 5:12pm UTC](https://forum.juce.com/t/custom-vst2-opcodes-when-both-plugin-and-host-written-with-juce/26928 "2018-03-22T17:12:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![xenakios](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/xenakios/32/4047_2.png) [@xenakios](https://forum.juce.com/u/xenakios)\
**Post date:** [March 22, 2018, 5:12pm UTC](https://forum.juce.com/t/custom-vst2-opcodes-when-both-plugin-and-host-written-with-juce/26928/1 "2018-03-22T17:12:37Z")

</div>

How can that be done? Do I need to alter the JUCE plugin client and host source codes to achieve it?

---

<div class="post-metadata">

**Author:** ![xenakios](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/xenakios/32/4047_2.png) [@xenakios](https://forum.juce.com/u/xenakios)\
**Post date:** [March 23, 2018, 3:29pm UTC](https://forum.juce.com/t/custom-vst2-opcodes-when-both-plugin-and-host-written-with-juce/26928/2 "2018-03-23T15:29:55Z")

</div>

I guess this is something that isn’t done by anyone…? I can see the JUCE VST2 client code has some support for Presonus and Cockos specific stuff but I can’t quite figure out how it could be done cleanly for a plugin and a host that are both written with JUCE.

---

<div class="post-metadata">

**Author:** ![rory](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rory/32/534_2.png) [@rory](https://forum.juce.com/u/rory)\
**Post date:** [March 23, 2018, 4:08pm UTC](https://forum.juce.com/t/custom-vst2-opcodes-when-both-plugin-and-host-written-with-juce/26928/3 "2018-03-23T16:08:11Z")

</div>

I’m not sure I follow the question, but you don’t need to use any plugin SDK if you just want to load AudioProcessor’s in an AudioProcessorGraph.

---

<div class="post-metadata">

**Author:** ![xenakios](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/xenakios/32/4047_2.png) [@xenakios](https://forum.juce.com/u/xenakios)\
**Post date:** [March 23, 2018, 4:09pm UTC](https://forum.juce.com/t/custom-vst2-opcodes-when-both-plugin-and-host-written-with-juce/26928/4 "2018-03-23T16:09:29Z")

</div>

No, I don’t want to be directly including the AudioProcessor/plugin in my host’s source code. I want it to be a normal plugin that can be used in any host but with my own JUCE based host, I’d like to have some additional functionality.

---

<div class="post-metadata">

**Author:** ![rory](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rory/32/534_2.png) [@rory](https://forum.juce.com/u/rory)\
**Post date:** [March 23, 2018, 4:22pm UTC](https://forum.juce.com/t/custom-vst2-opcodes-when-both-plugin-and-host-written-with-juce/26928/5 "2018-03-23T16:22:46Z")

</div>

Bear with me for a moment. So you want to create a VST plugin, that when loaded in your own host will have some extra features available to it? I think I have it now 😉 I’m not really sure, but can you not write a simple wrapper for your custom plugin type and then load that into the graph?

---

<div class="post-metadata">

**Author:** ![xenakios](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/xenakios/32/4047_2.png) [@xenakios](https://forum.juce.com/u/xenakios)\
**Post date:** [March 23, 2018, 4:27pm UTC](https://forum.juce.com/t/custom-vst2-opcodes-when-both-plugin-and-host-written-with-juce/26928/6 "2018-03-23T16:27:33Z")

</div>

> [@Rory](#):
>
> can you not write a simple wrapper for your custom plugin type and then load that into the graph?

Well, the problem is that I don’t know what would be the most sensible thing to do and which would involve the minimum possible changes into the JUCE source code. This is especially frustrating as I have already managed to do a VST plugin that can be loaded in Cockos Reaper and which can use special functions from Reaper. But I just can’t quite figure out how this stuff should work if both the plugin and the host are written by me with JUCE… 😒

---

<div class="post-metadata">

**Author:** ![rory](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rory/32/534_2.png) [@rory](https://forum.juce.com/u/rory)\
**Post date:** [March 23, 2018, 5:35pm UTC](https://forum.juce.com/t/custom-vst2-opcodes-when-both-plugin-and-host-written-with-juce/26928/7 "2018-03-23T17:35:16Z")

</div>

I don’t see why you would need to modify the JUCE source code at all? But perhaps I’m being a little naive…
