# General Help

**URL:** <https://forum.juce.com/t/general-help/14910>\
**Category:** Audio Plugins\
**Created:** [June 4, 2015, 3:46pm UTC](https://forum.juce.com/t/general-help/14910 "2015-06-04T15:46:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lawrence\_Farr](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/lawrence_farr/32/163_2.png) [@Lawrence\_Farr](https://forum.juce.com/u/Lawrence_Farr)\
**Post date:** [June 4, 2015, 3:46pm UTC](https://forum.juce.com/t/general-help/14910/1 "2015-06-04T15:46:01Z")

</div>

I'm using the source code methods from the demo plugin in my project and following the same coding methods but after I used this in my project...

&nbsp; &nbsp; _&nbsp; BeatzAudioProcessor\* getProcessor() const_

_&nbsp;&nbsp; &nbsp;{  
&nbsp;&nbsp; &nbsp; &nbsp;return static\_cast\<BeatzAudioProcessor&\> (processor);  
&nbsp;&nbsp; &nbsp;}_  
&nbsp;

It returns the following error is Visual Studio...

&nbsp;

_IntelliSense: no suitable conversion function from "BeatzAudioProcessor" to "BeatzAudioProcessor \*"&nbsp;_

&nbsp;

Which points to some obvious difference in how I formatted or referenced something in my copying of all that, but it escapes me. &nbsp; Any help would be appreciated. &nbsp; I'm down to only 3 errors in my "transplant" of the coding example to my project so I'm almost there.

&nbsp;

The demo example is formatted the same way...

_JuceDemoPluginAudioProcessor& getProcessor() const  
&nbsp; &nbsp; {  
&nbsp; &nbsp; &nbsp; &nbsp; return static\_cast\<JuceDemoPluginAudioProcessor&\> (processor);  
&nbsp; &nbsp; }_  
&nbsp;

&nbsp;

The only obvious difference I can see in my code and the demo code is the former is (ownerFilter) and the latter is (owner). &nbsp;Not sure if that's the difference or not...

_BeatzAudioProcessorEditor::BeatzAudioProcessorEditor (BeatzAudioProcessor& ownerFilter)_

_&nbsp; &nbsp; : AudioProcessorEditor(ownerFilter)_

&nbsp;

Thanks in advance. &nbsp;I can post all of the modified cpp's and header files if that will help.  
&nbsp;

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [June 4, 2015, 4:36pm UTC](https://forum.juce.com/t/general-help/14910/2 "2015-06-04T16:36:59Z")

</div>

How did you declare processor ?

---

<div class="post-metadata">

**Author:** ![Lawrence\_Farr](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/lawrence_farr/32/163_2.png) [@Lawrence\_Farr](https://forum.juce.com/u/Lawrence_Farr)\
**Post date:** [June 4, 2015, 5:51pm UTC](https://forum.juce.com/t/general-help/14910/3 "2015-06-04T17:51:00Z")

</div>

Bear with my relative inexperience. &nbsp;I've searched through&nbsp;the demo code trying to reconcile that, looking for a specific declaration for that and also for "ourProcessor", &nbsp;another one of my three errors.

I can't yet find anything in the demo code that specifically defines "processor" as such, so it's obviously something I'm missing.

Comparing them side by side&nbsp;I can't see any area where the code obviously differs.

Here's the source. &nbsp;If you open it in VS you'll see the 3 errors.

http://theaudiocave.com/devstuff/Beatzz.zip

&nbsp;

---

<div class="post-metadata">

**Author:** ![Jordan\_Harris](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@Jordan\_Harris](https://forum.juce.com/u/Jordan_Harris)\
**Post date:** [June 4, 2015, 6:56pm UTC](https://forum.juce.com/t/general-help/14910/4 "2015-06-04T18:56:00Z")

</div>

I'm not sure, but maybe you should use **BeatzAudioProcessor&** instead of **BeatzAudioProcessor\***. Looks like you're trying to return a pointer from a non-pointer. That's typically the kind of error message you'll get with that sort of thing.

---

<div class="post-metadata">

**Author:** ![Lawrence\_Farr](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/lawrence_farr/32/163_2.png) [@Lawrence\_Farr](https://forum.juce.com/u/Lawrence_Farr)\
**Post date:** [June 7, 2015, 3:15pm UTC](https://forum.juce.com/t/general-help/14910/5 "2015-06-07T15:15:53Z")

</div>

Thanks a lot Jordan. &nbsp;I'm very appreciative for all of your responses. &nbsp;&nbsp;

For clarity, my history is corporate, I was a corporate staffer in my previous life and I can whack up a business class&nbsp;app in VB or C# in no time, so I never really needed to use C++ until I wanted to port some of my stand alone musical tools to vst plugins, and as you might expect, there's a good bit of a learning curve involved there.

At any rate, the adventure continues. &nbsp; When I stepped back (knowing what I don't know) it occurred to me that what I probably should have done was not code a brand new plugin, but instead just modify the AudioPluginDemo into my plugin, so I circled back and did that, and moved my graphics over there, and now I'm a few steps closer than I was, but still not through phase one yet. &nbsp; I have something like Playhead position displaying now, but not running in real time, so I'm working on crackng that nut.

To all of you guys like yourself and Xeniaos who are so willing to share your knowledge with we who are less capabale.... &nbsp;a big virutal beer to you. &nbsp;&nbsp;Thanks a lot, it's not unappreciated or viewed as something i"m actually entitled to. &nbsp;I say the previous because I often get annoyed by people who feel like they're entitled to the knowledge of others and I never want to be one of those people.

Thanks guys.

&nbsp;

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![nicolasdanet](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nicolasdanet/32/56_2.png) [@nicolasdanet](https://forum.juce.com/u/nicolasdanet)\
**Post date:** [June 7, 2015, 4:18pm UTC](https://forum.juce.com/t/general-help/14910/6 "2015-06-07T16:18:00Z")

</div>

AFAIK, the “processor” variable is a public member of _juce::AudioProcessorEditor_.

In the code below:

```
BeatzAudioProcessor& getProcessor() const
{
    return static_cast < BeatzAudioProcessor& > (processor);
}
```

1. The owner of getProcessor function must inherit from AudioProcessorEditor.
2. BeatzAudioProcessor must inherit from AudioProcessor.

It seems something went wrong in your cloning process.

---

<div class="post-metadata">

**Author:** ![Jordan\_Harris](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@Jordan\_Harris](https://forum.juce.com/u/Jordan_Harris)\
**Post date:** [June 7, 2015, 10:28pm UTC](https://forum.juce.com/t/general-help/14910/7 "2015-06-07T22:28:17Z")

</div>

So yeah, I opened the JuceDemoPlugin and changed&nbsp;

```
JuceDemoPluginAudioProcessor&
```

to

```
JuceDemoPluginAudioProcessor*
```

and got the same error. So just use a reference (&),&nbsp;not a pointer (\*)&nbsp;and you're good to go.

&nbsp;

* * *

&nbsp;

I'd also like to mention that you don't even have to use this getProcessor() that's in the JuceDemoPlugin. If you create a plugin with the&nbsp;Audio Plugin template from the IntroJucer, you'll see the&nbsp;private member variable with a comment above it:

```
// This reference is provided as a quick way for your editor to // access the processor object that created it.
ProcessorAccessAudioProcessor& processor;
```

This is called &nbsp;ProcessorAccessAudioProcessor because I named the project ProcessorAccess (for demonstration). If you look at the constructor in PluginEditor.cpp, it initializes this **processor** variable with the AudioProcessor that's passed as a reference argument from the AudioProcessor.

So this means you can simply do something like&nbsp;

```
processor.lastUIWidth = getWidth();
```

instead of

```
getProcessor().lastUIWidth = getWidth();
```

You might find this to be an easier way to access the AudioProcessor. To be honest, I'm not exactly sure why it's done the way it is in JuceDemoPlugin. Hopefully someone can answer that one.
