HISE Logo Forum
    • Categories
    • Register
    • Login

    Matching Gain Before And After Effects

    Scheduled Pinned Locked Moved Scripting
    68 Posts 10 Posters 4.0k 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.
    • ?
      A Former User @d.healey
      last edited by

      @d-healey the source is still on github, i stopped because it was bleeding money and i lost the motivation to keep making instruments (sampling, editing, etc)

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @A Former User
        last edited by

        @iamlamprey Oh that's a shame. It seemed like you were onto a good thing.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey
          last edited by

          I could use something like this.

          The level going into my scriptnode effect is X the level coming out is Y. Is there a scriptnode method to work out the difference and apply the reverse to a gain module so I get roughly the same volume out as in?

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          A 1 Reply Last reply Reply Quote 1
          • A
            aaronventure @d.healey
            last edited by

            @d-healey Didn't we go over this? :face_with_tongue:

            https://forum.hise.audio//post/70594

            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @aaronventure
              last edited by

              @aaronventure Apparently not, see my last post in the thread

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              orangeO 1 Reply Last reply Reply Quote 0
              • orangeO
                orange @d.healey
                last edited by orange

                @d-healey
                You need an automatic gain detector and gain updater to compensate the I/O gain difference in the scriptnode, right?

                Which kind of effects will there be?

                develop Branch / XCode 13.1
                macOS Monterey / M1 Max

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @orange
                  last edited by d.healey

                  @orange Yeah. I have a convolution node followed by a filter.

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  ustkU orangeO 2 Replies Last reply Reply Quote 0
                  • ustkU
                    ustk @d.healey
                    last edited by ustk

                    @d-healey The thing is there's no real method afaik. You don't wan't to apply the gain difference to each samples, so there should be an integration happening somewhere. I think two enveloppe followers for IN & OUT signal with same settings should give you the difference you need. Then from here, I guess it's a matter of dB calculation.

                    I tried in the past. I'm sure it can work but I stopped before going further once I just told myself this would necessarily create some gain fluctuation at some point. The user won't have the possibility to get the control over these fluctuation, and they will also be frequency dependant.

                    In my opinion, gain compensation should be a fixed value determined during effect development, but that is just me thinking :man_shrugging: (or a value that is changed with some FX parameters)

                    Can't help pressing F5 in the forum...

                    1 Reply Last reply Reply Quote 1
                    • orangeO
                      orange @d.healey
                      last edited by orange

                      @d-healey I think, each effect needs different approach.
                      For example the gain compensation method used for preamp modeling and the method used for reverb are different from each other.

                      Christoph suggested this normalizing method for the convolution reverb a while ago.

                      HiseSnippet 1495.3oc0X8zaaTDEeVmLND2Vfp1BWmKHbjJF6RnTARTm3jzZAN0pNDUNElr6X6Qd2YV1c1jXPbhK8Fm6M9HvUt0u.bpeQ3a.7d6t16t0tINVsEgsj0Nu4My768989yrtaf1VDFpCHVqevXeAw5pzdiUlgsFxkJR6cHVuKsCOzHBXIh1drOOLT3PrrV4An.q0WkD+4uu+1bWtxVjIhPNTKsEeqzSZxj1s42Hcc2i6HNP5kS6Ma11VqZoc0Q.dVgVm3ysGwGH1mipUhRrJuqiznC5Y3FQHny1Zmw8FpOUkn+gxP4wtBbPCROXiRDSZMT55zchsFRHVq1MyxWIwxuIsizQNUdlG38imfksh79.qRmGjZbIfjUNHsZBjtNsmcfz2jMChmqPaq.BoOGb04gRhtDqmSaoAETlZd7Qh8BfASWP06Vu9sYvOa7U8iT1FoVwzp80FwiTU2nxOWY8J+RE1KOU+9ycN7XBztthf4NMxtAm2Bqph7NVDba1Ib2HwTEAyunOs7h4SsSr5bJpUsURyi7Eoi2S65f9J74YY.RpaCd56ZuC2v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wo3qD2BA1LwqhgKTO1JWt4ZKetITo5UlaN4fmYq2Jxn8fR0NS6GlF.j2FJv+2Hi+mpvBR+evj8DyLcD1xig66T4h5cWLga832D3NNaeYx4JSwfshbQ43M5+CTQJ5KvBH8DHpM3k+6EtfKfTpvEPJX5qb9l98lSuw60bg5MV3VA.du.K+0vUDlON9garyKteRrcOOsFZQLaW5Ma9V3NBWk9XQnv7JhCJVSdasdjGO9J7K2aX+13EN731A5iRqKfASuSrDHnRE+2PsNsCNl0fbRZ2G7MCHdRG4Q113ql9IMHj4ul6rDq4yVh0r4RrlOeIVycWh07EKwZt24tF7emKMsCKUBB5taxEGr1Ug80iqlP9WbbZh+C
                      

                      Original post:

                      Link Preview Image
                      Normalizing Audio in Convolution Node?

                      Like @alhug said, the file analyser node is what you need. HiseSnippet 1495.3oc0X8zaaTDEeVmLND2Vfp1BWmKHbjJF6RnTARTm3jzZAN0pNDUNElr6X6Qd2YV1c1jXPbhK8Fm6M9Hv...

                      favicon

                      Forum (forum.hise.audio)

                      develop Branch / XCode 13.1
                      macOS Monterey / M1 Max

                      d.healeyD ustkU 2 Replies Last reply Reply Quote 1
                      • d.healeyD
                        d.healey @orange
                        last edited by

                        @orange Read Aarron's post from a few hours ago in this thread :face_with_tongue:

                        That normalization thing doesn't appear to be the same as makeup gain

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public HISE tutorials

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

                          @orange You're right, the approach depends on the FX itself, and on the result you want to achieve too (transparent, or as part of the effect)...

                          Christoph's example seems to act like a compressor, this proves the gain fluctuation issue one might have

                          So, should the gain compensation act as a compressor (or expander) with noticeable fluctuations, or transparently with non-input-level-dependency (apart from parameter indexation) should be the question one wants to ask first.

                          Can't help pressing F5 in the forum...

                          d.healeyD 1 Reply Last reply Reply Quote 0
                          • d.healeyD
                            d.healey @ustk
                            last edited by

                            @ustk Maybe I'm too simple but my thought is if a human can look at the input volume level before, and adjust a gain knob so the output level is the same as the input, why can't this be done automatically?

                            Libre Wave - Freedom respecting instruments and effects
                            My Patreon - HISE tutorials
                            YouTube Channel - Public HISE tutorials

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

                              the example of input dependency giving nasty fluctuations, might be:

                              • An input containing all frequencies
                              • A LPF in the effect, let say set to 1KHz

                              -> The difference between input an output will vary for high frequencies, leading to effect pumping while the output frequency content doesn't change (because those high freq are not passing through)

                              in short, the gain of the effect will fluctuate because of the input, while the effect itself doesn't sound different.

                              Can't help pressing F5 in the forum...

                              d.healeyD 1 Reply Last reply Reply Quote 0
                              • d.healeyD
                                d.healey @ustk
                                last edited by

                                @ustk If the attack/release is slow enough it should smooth out the pumping?

                                Libre Wave - Freedom respecting instruments and effects
                                My Patreon - HISE tutorials
                                YouTube Channel - Public HISE tutorials

                                ustkU 1 Reply Last reply Reply Quote 0
                                • ustkU
                                  ustk @d.healey
                                  last edited by

                                  @d-healey Saying this is just another way for what I am saying too.
                                  A user compensating manually IS a fixed compensation (the user is not moving the knob permanently while the signal changes). So this is the "automatic" case covered by parameter compensation. (so automatic, but fixed because not input dependent, only parameter dependent)

                                  Compensation by IN/OUT comparison will necessarily introduce comp/expand like behaviour, more or less noticeable depending on the integration time (Smooth parameter in Chris's example, or att/rel of an enveloppe follower, or any integration value that a comparison requires if you don't want a sample to sample accuracy (which would be even nastier anyway)

                                  Can't help pressing F5 in the forum...

                                  d.healeyD 1 Reply Last reply Reply Quote 0
                                  • d.healeyD
                                    d.healey @ustk
                                    last edited by d.healey

                                    @ustk said in Matching Gain Before And After Effects:

                                    (the user is not moving the knob permanently while the signal changes

                                    Sure they are, the knob is automatable for exactly this purpose. If the input goes up during playback they can bring down the output, and vice versa.

                                    So maybe what I need is a threshold for the amount of variation to compensate for?

                                    Libre Wave - Freedom respecting instruments and effects
                                    My Patreon - HISE tutorials
                                    YouTube Channel - Public HISE tutorials

                                    orangeO ustkU 2 Replies Last reply Reply Quote 0
                                    • ustkU
                                      ustk @d.healey
                                      last edited by

                                      @d-healey said in Matching Gain Before And After Effects:

                                      @ustk If the attack/release is slow enough it should smooth out the pumping?

                                      Exactly you are right, reducing is not removing though, so if this is not an issue then you can go this way.
                                      The issue is that if you reduce the integration time, it won't react fast enough and let the difference "pass-through" without being taken into account. You see, in the end you'll have a compressor/expander setting questioning. Fast enough to react or slow enough to be transparent?

                                      Can't help pressing F5 in the forum...

                                      1 Reply Last reply Reply Quote 0
                                      • orangeO
                                        orange @d.healey
                                        last edited by orange

                                        @d-healey

                                        So maybe what I need is a threshold for the amount of variation to compensate for?

                                        You are now describing limiter/compressor/expander 😊

                                        develop Branch / XCode 13.1
                                        macOS Monterey / M1 Max

                                        d.healeyD 1 Reply Last reply Reply Quote 1
                                        • ustkU
                                          ustk @d.healey
                                          last edited by

                                          @d-healey said in Matching Gain Before And After Effects:

                                          Sure they are, the knob is automatable for exactly this purpose. If the input goes up during playback they can bring down the output, and vice versa.

                                          In this case effectively you fall in the slow integration case and you might go down the input/output compensation. After all, the ancestor of a compressor was a fader adjusted manually...

                                          Can't help pressing F5 in the forum...

                                          1 Reply Last reply Reply Quote 1
                                          • d.healeyD
                                            d.healey @orange
                                            last edited by

                                            @orange Some compressors have auto makeup gain, how does that work because that's what I want :)

                                            Libre Wave - Freedom respecting instruments and effects
                                            My Patreon - HISE tutorials
                                            YouTube Channel - Public HISE tutorials

                                            ustkU Dan KorneffD 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            16

                                            Online

                                            1.8k

                                            Users

                                            11.9k

                                            Topics

                                            103.8k

                                            Posts