# How to access plugin's AudioProcessor from juce:AudioPluginInstance?

**URL:** <https://forum.juce.com/t/how-to-access-plugins-audioprocessor-from-juce-audioplugininstance/65108>\
**Category:** Audio Plugins\
**Created:** [February 5, 2025, 3:23am UTC](https://forum.juce.com/t/how-to-access-plugins-audioprocessor-from-juce-audioplugininstance/65108 "2025-02-05T03:23:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![obstruct2085](https://avatars.discourse-cdn.com/v4/letter/o/9fc348/32.png) [@obstruct2085](https://forum.juce.com/u/obstruct2085)\
**Post date:** [February 5, 2025, 3:23am UTC](https://forum.juce.com/t/how-to-access-plugins-audioprocessor-from-juce-audioplugininstance/65108/1 "2025-02-05T03:23:04Z")

</div>

In the example `AudioPluginHost` code, it runs a callback with a `juce:AudioPluginInstance` when a plugin is loaded. How can I access the actual plugin instance rather than this wrapper to the instance?

For example, my plugin’s entry point is `MyPluginProcessor` extends `juce::AudioProcessor` and `MyPluginInterface`, what would be the proper way to get `MyPluginProcessor` out off `juce:AudioPluginInstance` in my host code?

```auto
class MyPluginProcessor : public juce::AudioProcessor, public MyPluginInterface
{
...
// some override functions from MyPluginInterface
void ExampleFunction() override;
...
}

```

```auto
void PluginGraph::addPluginCallback (std::unique_ptr<AudioPluginInstance> instance,
                                     const String& error,
                                     Point<double> pos,
                                     PluginDescriptionAndPreference::UseARA useARA)
{
    ...
    MyPluginInterface* my_interface = dynamic_cast<MyPluginInterface*>( instance.get() );
    my_interface->ExampleFunction();
    ...
}

```

I tried to cast the instance to my interface but realised it was not my plugin’s instance.

I’m trying to implement some unique functionalities that are only available between my plugin and host that are not part of VST3 or AU standards.
