# Styling the Standalone plugin window?

**URL:** <https://forum.juce.com/t/styling-the-standalone-plugin-window/21872>\
**Category:** Audio Plugins\
**Created:** [April 17, 2017, 8:55pm UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872 "2017-04-17T20:55:55Z")\
**Posts on this page:** 15\
**Page:** 2

<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:** [August 29, 2017, 10:57am UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/21 "2017-08-29T10:57:35Z")

</div>

Oh yes, can you please add AsyncQuitRetrier() to the Standalone code so it doesn’t crash if you quit while the Audio/MIDI Setup dialog is open?

Thanks,

Rail

---

<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:** [August 30, 2017, 10:11am UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/22 "2017-08-30T10:11:35Z")

</div>

OK the standalone code won’t assert anymore when quitting. Fix is on develop with commit [b78ce1f](https://github.com/WeAreROLI/JUCE/commit/b78ce1f059fb6941c95e7726d5398714348307c4).

---

<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:** [August 30, 2017, 7:08pm UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/23 "2017-08-30T19:08:51Z")

</div>

Thanks!

---

<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:** [August 31, 2017, 10:14pm UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/24 "2017-08-31T22:14:09Z")

</div>

> [@fabian](#):
>
> You can just use discrete channels AudioChannelSet::discreteChannels (X).

Hi fabian,

So this kinda works… If I change my code for testing to:

```
MyProcessor:: MyProcessor() : AudioProcessor (BusesProperties().withOutput ("Out", AudioChannelSet::discreteChannels (32), true))
{
:
}

```

The Audio/MIDI Setup for SoundFlower64 now shows all the outputs and if I leave everything as the default with all outputs enabled/selected then all my routing works perfectly… the problem is if I try and change anything in the Audio/MIDI Setup… say I de-select Output 3+4 then I need to get a callback to indicate that Out 3+4 is disabled to my plug-in so I can modify my graph connections (otherwise everything is offset by the 2 disabled Outputs - personally I’d prefer that they get disabled and everything else stay constant)… is there a callback for that? The other thing is that if you do disable Output 3+4 you hit two asserts in the code in AudioProcessor::setPlayConfigDetails() and if you then try and re-enable Output 3+4 it does… but after that the options in the Setup don’t respond to any Output selections after that (even if you select a different output device and switch back to SoundFlower64).

Any thoughts?

Thanks,

Rail

---

<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:** [September 1, 2017, 10:41am UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/25 "2017-09-01T10:41:10Z")

</div>

I assume this is when you run your plug-in in standalone mode, right? To be honest, we’ve never really tried this with more than two channels. I’ve just tried this now with [Loopback](https://rogueamoeba.com/loopback/) instead of SoundFlower and I can confirm that the standalone target works well if everything is left as default.

> [@Rail\_Jon\_Rogut](#):
>
> the problem is if I try and change anything in the Audio/MIDI Setup… say I de-select Output 3+4

How are you disabling outputs? In JUCE’s audio settings screen or in Apple’s Audio/MIDI Setup? I can’t seem to disable any of the channels in both.

---

<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:** [September 1, 2017, 11:14pm UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/26 "2017-09-01T23:14:12Z")

</div>

> [@fabian](#):
>
> I assume this is when you run your plug-in in standalone mode, right? To be honest, we’ve never really tried this with more than two channels. I’ve just tried this now with Loopback instead of SoundFlower and I can confirm that the standalone target works well if everything is left as default.
> 
> Rail\_Jon\_Rogut:
> 
> the problem is if I try and change anything in the Audio/MIDI Setup… say I de-select Output 3+4
> 
> How are you disabling outputs? In JUCE’s audio settings screen or in Apple’s Audio/MIDI Setup? I can’t seem to disable any of the channels in both.

Correct, this is only an issue for Standalone. Everything works perfectly fine in all the other formats.

I changed some code slightly to allow disabling the outputs… I’ll be sending you a PM soon showing the issue(s) and another company’s Standalone JUCE based plug-in trying to do the same thing as I’m trying to do (and failing on and off).

Rail

---

<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:** [September 2, 2017, 10:35am UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/27 "2017-09-02T10:35:46Z")

</div>

Thinking about this… perhaps it’s correct to not allow the user to remove/change the Outputs for the device… which means this will be fine with the change… If it is, other than relying on the preprocessor defined JucePlugin\_Build\_Standalone at compile time to set up the output buses which would mean building the Standalone separately… is there any way to change the BusesProperties at run time when the AudioProcessor is created?

Thanks,

Rail

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [October 31, 2017, 11:50pm UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/28 "2017-10-31T23:50:57Z")

</div>

Hi fabian. I’m having real trouble getting this to work without causing lots of redefinition problems on OSX and Windows.

Here is my class:

> **[MIDISynthStandaloneApp.cpp](https://www.dropbox.com/s/2cb3pyugdvjl1df/MIDISynthStandaloneApp.cpp?dl=0)**
>
> Shared with Dropbox

Which is essentially a copy of juce\_StandaloneFilterApp.cpp with a mainWindow-\>setUsingNativeTitleBar (true) added to initialise() to set native windows.

I think I’ve followed your instructions, though obviously the HelloWorldApplication doesn’t contain any of the standalone filter window code contained in the juce\_StandaloneFilterApp.cpp default app. I managed to get this working for debug on OSX but ran in to lots of redefinitions for release on OSX - now trying to get it working on Windows and hitting lots of re definitions again. Feels like I’m doing something wrong just to be able to call setUsingNativeTitleBar (true).

Thx

---

<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:** [November 1, 2017, 12:13am UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/29 "2017-11-01T00:13:36Z")

</div>

I just got this working yesterday… PM me if you need help… It took a little work to get it working right.

I’ll be watching the game and handing out candy… so it may be a slower response 😉

EDIT: See [Reference to point is ambiguous](https://forum.juce.com/t/reference-to-point-is-ambiguous/24884/8)

Rail

---

<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:** [November 2, 2017, 9:27am UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/31 "2017-11-02T09:27:02Z")

</div>

Sorry for the late reply! You shouldn’t simply be copying the whole `juce_StandaloneFilterApp.cpp` with all the headers etc. Just add the include for the `JuceHeader.h` as you would with any other `.cpp` file that you would add to your project.

---

<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:** [November 2, 2017, 9:39am UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/32 "2017-11-02T09:39:28Z")

</div>

That almost works… except that StandalonePluginHolder in juce\_StandaloneFilterWindow.h needs

```
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client

    #include <juce_audio_plugin_client/utility/juce_IncludeModuleHeaders.h>

#endif

```

or it’ll choke on not finding the definition for createPluginFilterOfType

Rail

---

<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:** [November 2, 2017, 11:54am UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/33 "2017-11-02T11:54:21Z")

</div>

OK thanks @Rail_Jon_Rogut. A fix for this is now on develop with commit [853b93b](https://github.com/WeAreROLI/JUCE/commit/853b93b7c5e1d3fd021cf81a8a48605c2db0cf68).

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [November 2, 2017, 5:33pm UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/34 "2017-11-02T17:33:26Z")

</div>

thx!

---

<div class="post-metadata">

**Author:** ![pauloesteban](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@pauloesteban](https://forum.juce.com/u/pauloesteban)\
**Post date:** [April 7, 2020, 10:48am UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/35 "2020-04-07T10:48:31Z")

</div>

Hi,

Do you have an idea how to add an item in the menu for standalone plugins? I found this as starting point [Extra macOS menu items to respect disabled flag](https://forum.juce.com/t/extra-macos-menu-items-to-respect-disabled-flag/37276)

Cheers

---

<div class="post-metadata">

**Author:** ![pizzafilms](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pizzafilms/32/562_2.png) [@pizzafilms](https://forum.juce.com/u/pizzafilms)\
**Post date:** [April 7, 2020, 11:58pm UTC](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872/36 "2020-04-07T23:58:50Z")

</div>

Take a look in juce\_StandaloneFilterWindow.h and look for `void buttonClicked(Button*)`. That’s where it builds the PopupMenu.

[Previous page](https://forum.juce.com/t/styling-the-standalone-plugin-window/21872.md?page=1)
