Forum
    • Categories
    • Register
    • Login

    Mono plugin with side-chain

    Scheduled Pinned Locked Moved Feature Requests
    11 Posts 6 Posters 70 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • David HealeyD
      David Healey @ustk
      last edited by

      @ustk How do you add a sidechain to a plugin?

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - HISE tutorials
      My Patreon - More HISE tutorials

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @David Healey
        last edited by ustk

        @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=4 which is the normal num channel + the sidechain channels
        And
        HISE_SIDECHAIN_CHANNEL_LAYOUT=1 which I didn't know about until tonight...

        I'll try tomorrow to actually export a test plugin and see how it goes...

        Hise made me an F5 dude, any other app just suffers...

        J 1 Reply Last reply Reply Quote 0
        • J
          JC @ustk
          last edited by JC

          @ustk what does HISE_SIDECHAIN_CHANNEL_LAYOUT=1 do?

          dannytaurusD 1 Reply Last reply Reply Quote 0
          • dannytaurusD
            dannytaurus @JC
            last edited by

            @JC Claude gives a decent definition:

            HISE_SIDECHAIN_CHANNEL_LAYOUT changes the bus layout of an exported FX plugin so the DAW sees a dedicated sidechain input. There's exactly one place it's used, in getHiseBusProperties() at hi_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_CHANNELS worth 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_PLUGIN builds (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 if HI_SUPPORT_MONO_CHANNEL_LAYOUT or HISE_MIDIFX_PLUGIN is active.
            • The guard is #ifdef, not #if — so defining it at all enables it, even HISE_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.

            Meat Beats: https://meatbeats.com
            Klippr Video: https://klippr.video

            Oli UllmannO 1 Reply Last reply Reply Quote 0
            • Oli UllmannO
              Oli Ullmann @dannytaurus
              last edited by

              @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?

              ustkU 1 Reply Last reply Reply Quote 0
              • ustkU
                ustk @Oli Ullmann
                last edited by

                @Oli-Ullmann Yes, that's why I've made a patch and hopefully a PR soon.

                Hise made me an F5 dude, any other app just suffers...

                dannytaurusD 1 Reply Last reply Reply Quote 1
                • dannytaurusD
                  dannytaurus @ustk
                  last edited by dannytaurus

                  @ustk What's your intention behind mono compatibility? Is it for a specific DAW?

                  And are you looking for mono sidechain input, or stereo?

                  Meat Beats: https://meatbeats.com
                  Klippr Video: https://klippr.video

                  ustkU 1 Reply Last reply Reply Quote 0
                  • HISEnbergH
                    HISEnberg @ustk
                    last edited by

                    @ustk I’m away from my system, but i did this a few years back (mono and stereo with sidechain support for VST3/AU/AAX). I had to modify the HISE source code at the time, perhaps this is built in now.. Once I have a moment I’ll share with you the process ;)

                    Sonic Architect && Software Mercenary

                    1 Reply Last reply Reply Quote 0
                    • ustkU
                      ustk @dannytaurus
                      last edited by ustk

                      @dannytaurus said in Mono plugin with side-chain:

                      @ustk What's your intention behind mono compatibility? Is it for a specific DAW?

                      Simply for mono tracks like compressing bass for instance where you might need sidechain with the kick

                      And are you looking for mono sidechain input, or stereo?

                      In the end I think I just need to "monoize" the sidechain if it's forced stereo with mono plugins. I still have to investigate this, but it's not crucial as long as a mono track goes through the first SC channel... The ideal is to have the possibility to connect either mono or stereo SC no matter if the plugin is inserted on a mono or stereo track.

                      @HISEnberg Nice! Claude patched Hise for me, I am testing it in the afternoon...
                      If yours was made a few years ago then it might not account for the existence of HISE_SIDECHAIN_CHANNEL_LAYOUT

                      Hise made me an F5 dude, any other app just suffers...

                      1 Reply Last reply Reply Quote 1
                      • ustkU
                        ustk
                        last edited by ustk

                        Claude said:

                        Main bus   Sidechain   Host buffer  SC lands at    Internal scratch
                        mono         mono         2 ch        buf 1        [m0][m0][sc0][sc0]
                        mono         stereo       3 ch        buf 1–2      [m0][m0][scL][scR]
                        stereo       mono         3 ch        buf 2        [L][R][sc0][sc0]
                        stereo       stereo       4 ch        buf 2–3      [L][R][scL][scR]
                        either	     none          —           —           ch2/3 silent
                        

                        So a mono-track instance sidechained from a stereo source works fine: the mono main is duplicated across ch0/1 (HISE renders internally in stereo regardless) and only channel 0 is copied back out, while the stereo sidechain keeps its L/R on ch2/3. A mono sidechain gets duplicated. The network always sees one fixed layout — no mode-dependent logic anywhere.

                        Stereo sidechain detection is genuine, not left-channel-only. envelope_follower::processFrame takes max(abs(s)) across all channels of the frame, so it detects the louder of L/R.

                        I say:
                        All good 👍

                        Hise made me an F5 dude, any other app just suffers...

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post

                        22

                        Online

                        2.5k

                        Users

                        13.9k

                        Topics

                        120.9k

                        Posts