Mono plugin with side-chain
-
This seems to be exclusive, so one or the other from what Claude reports.
But I definitely need to use my plugin on mono tracks, and the whole purpose of the plugin is to have a side chain in the first place. So I can't live without the two.
So is there a solution to this before I start patching Hise?
-
@ustk How do you add a sidechain to a plugin?
-
@David-Healey Well this is new to me so not very clear yet.
But the old trick was to add more channels in the the routing matrix and route them the way you want.Now on top of this there are extra proc:
HISE_NUM_FX_PLUGIN_CHANNELS=4which is the normal num channel + the sidechain channels
And
HISE_SIDECHAIN_CHANNEL_LAYOUT=1which I didn't know about until tonight...I'll try tomorrow to actually export a test plugin and see how it goes...
-
@ustk what does HISE_SIDECHAIN_CHANNEL_LAYOUT=1 do?
-
@JC Claude gives a decent definition:
HISE_SIDECHAIN_CHANNEL_LAYOUTchanges the bus layout of an exported FX plugin so the DAW sees a dedicated sidechain input. There's exactly one place it's used, ingetHiseBusProperties()athi_core/hi_dsp/plugin_parameter/PluginParameterProcessor.cpp:610:- With the flag defined: the plugin declares three buses — a main stereo Input, a second stereo input bus named Sidechain, and a stereo Output. DAWs recognize the named sidechain bus and offer their normal sidechain routing UI for it (Live's "Sidechain" chooser, Logic's side chain menu, etc.). The sidechain signal arrives in HISE as channels 3/4 of the processed buffer.
- Without it (default): the FX plugin instead declares
HISE_NUM_FX_PLUGIN_CHANNELSworth of paired stereo Input n/Output n buses — a generic multichannel layout where extra inputs aren't labeled as sidechain, which many hosts won't expose as sidechain routing at all.
A few practical notes:
- It only matters in
FRONTEND_IS_PLUGINbuilds (exported FX plugins, i.e. ProjectType "FX plugin"). It has no effect on instrument plugins, standalone builds, or the HISE IDE, and it's bypassed entirely ifHI_SUPPORT_MONO_CHANNEL_LAYOUTorHISE_MIDIFX_PLUGINis active. - The guard is
#ifdef, not#if— so defining it at all enables it, evenHISE_SIDECHAIN_CHANNEL_LAYOUT=0. Leave it out entirely to disable. - You'd typically set it via ExtraDefinitions in the project settings so it gets baked into the exported plugin.
-
@dannytaurus
So if I understand this cortect, it's only for stereo plug-ins?If we have HI_SUPPORT_MONO_CHANNEL_LAYOUT enabled, we have to compile two versions of our plug-in?
One stereo with sidechain and one mono without sidechain?
-
@Oli-Ullmann Yes, that's why I've made a patch and hopefully a PR soon.
-
@ustk What's your intention behind mono compatibility? Is it for a specific DAW?
And are you looking for mono sidechain input, or stereo?