Forum

    • Register
    • Login
    • Search
    • Categories

    Dynamics Comp Makeup values

    C++ Development
    3
    26
    3927
    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.
    • dustbro
      dustbro last edited by

      After playing with the dynamics module for a project, I found that the comp makeup was pretty hot.
      Changing it's value to this in Dynamics.cpp made the result more manageable.

      auto gainDb = log2((1.0 - ratio) * attenuation * -1.0 + 0.1) + log2(attenuation * -1.0);
      

      Dan Korneff - Producer / Mixer / Audio Nerd

      SteveRiggs 2 Replies Last reply Reply Quote 4
      • SteveRiggs
        SteveRiggs @dustbro last edited by SteveRiggs

        @dustbro Awesome mate. I'll try this.

        Is it just this line in the Dynamics.cpp that needs swapping for the above one? (I thought I'd check before I break something) 🙂

        Does it affect both the comp and limiter's auto makeup just changing that line? I've noticed that both have a pretty big rise in volume when you use them.

        Screen Shot 2019-10-31 at 14.08.54.png

        dustbro 1 Reply Last reply Reply Quote 0
        • dustbro
          dustbro @SteveRiggs last edited by

          @SteveRiggs Thats the line. It's only for Compressor makeup. It looks like limiterMakeupGain is a few lines above.

          Dan Korneff - Producer / Mixer / Audio Nerd

          SteveRiggs 2 Replies Last reply Reply Quote 1
          • SteveRiggs
            SteveRiggs @dustbro last edited by SteveRiggs

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • SteveRiggs
              SteveRiggs @dustbro last edited by SteveRiggs

              @dustbro Ah, I see it. Thanks.

              It looks to be laid out slightly different to the comp one.

              Do these 3 lines need adding into the limiters 'if' section?

              (I'm thinking there might be a duplicate declaration problem if it's done this way?)

              auto attenuation = limiter.getThresh();
              auto ratio = limiter.getRatio();
              auto gainDb = log2((1.0 - ratio) * attenuation * -1.0 + 0.1) + log2(attenuation * -1.0);
              
              1 Reply Last reply Reply Quote 0
              • SteveRiggs
                SteveRiggs @dustbro last edited by SteveRiggs

                @dustbro Hey man. I just got around to trying changing the comp line in the .cpp for the makeup gain but it seems to still make it get really loud when the threshold is pulled down. Is that what it's supposed to do?

                I'm trying to find a way so that the level stays as even as possible when changing the threshold with no huge jumps or drops in volume. Is there a way to do that using the same method?

                dustbro 1 Reply Last reply Reply Quote 0
                • dustbro
                  dustbro @SteveRiggs last edited by

                  @SteveRiggs Technically speaking, keeping the level even would just be another compressor. All of the makeup gain math I've seen is a formula of the threshold and ratio settings. If your input signal is really low, you'll have to crank down the threshold to start compressing, but doing so will increase the makup gain level. You can tinker with the formula to find something that works for your situation.

                  And just to be sure, once you changed this line, you recompiled HISE and used the new version, right?
                  Changing the code alone in Dynamics.cpp will not work.

                  Dan Korneff - Producer / Mixer / Audio Nerd

                  SteveRiggs 1 Reply Last reply Reply Quote 0
                  • SteveRiggs
                    SteveRiggs @dustbro last edited by

                    @dustbro said in Dynamics Comp Makeup values:

                    And just to be sure, once you changed this line, you recompiled HISE and used the new version, right?

                    Ahhh, that I didn't do 🤣 My bad! I will try it. Thanks.

                    @dustbro said in Dynamics Comp Makeup values:

                    keeping the level even would just be another compressor

                    I was thinking if maybe that was an easier option. Hopefully, it wouldn't add any noticeable latency if running a few dynamics modules. I'll experiment with a few things. Thanks man

                    1 Reply Last reply Reply Quote 0
                    • dustbro
                      dustbro last edited by

                      Did a little more tinkering

                      if (compressorMakeup)
                      		{
                      			if (compressor.getThresh() >= 0.1f)
                      			{
                      				auto attenuation = compressor.getThresh();
                      				auto ratio = compressor.getRatio();
                      				auto gainDb = log2f(-attenuation / ratio);
                      				compressorMakeupGain = (float)Decibels::decibelsToGain(gainDb);
                      			}
                      			else
                      			{
                      				compressorMakeupGain = 1.0f;
                      			}
                      		}
                      		else
                      			compressorMakeupGain = 1.0f;
                      

                      Dan Korneff - Producer / Mixer / Audio Nerd

                      SteveRiggs 1 Reply Last reply Reply Quote 1
                      • SteveRiggs
                        SteveRiggs @dustbro last edited by

                        @dustbro Cool! Hows it sounding?

                        dustbro 1 Reply Last reply Reply Quote 0
                        • dustbro
                          dustbro @SteveRiggs last edited by

                          @SteveRiggs My favorite so far. Nice and even output.

                          Dan Korneff - Producer / Mixer / Audio Nerd

                          SteveRiggs Natan 2 Replies Last reply Reply Quote 1
                          • SteveRiggs
                            SteveRiggs @dustbro last edited by

                            @dustbro Skills mate! I'll recompile and try it this eve.

                            I had a go at doing it for the limiter as well but the code is laid out slightly differently for the limiter section so I'm not sure how it would work for that part. Any ideas?

                            dustbro 1 Reply Last reply Reply Quote 0
                            • Natan
                              Natan @dustbro last edited by

                              @dustbro Sir, Could You Please Upload The Dynamics.cpp File! So We Can Swap Them!!!🙏

                              Because I'm All New To This And Don't Want To Mess Up The Codes
                              Thanks

                              SteveRiggs 1 Reply Last reply Reply Quote 0
                              • SteveRiggs
                                SteveRiggs @Natan last edited by

                                @Natanr

                                Here you go 👍

                                Dynamics.cpp.zip

                                I haven't compiled it and tested it yet so make a copy of the original Dynamics.cpp file and put it to one side before you change it in the source code, just in case.

                                Natan 1 Reply Last reply Reply Quote 1
                                • dustbro
                                  dustbro @SteveRiggs last edited by

                                  @SteveRiggs I'm gonna look at the limiter code next

                                  Dan Korneff - Producer / Mixer / Audio Nerd

                                  SteveRiggs 1 Reply Last reply Reply Quote 2
                                  • SteveRiggs
                                    SteveRiggs @dustbro last edited by

                                    @dustbro Awesome 🙂

                                    1 Reply Last reply Reply Quote 0
                                    • Natan
                                      Natan @SteveRiggs last edited by

                                      @SteveRiggs Thanks Steve, I Really Appreciate You Man

                                      SteveRiggs 1 Reply Last reply Reply Quote 1
                                      • SteveRiggs
                                        SteveRiggs @Natan last edited by

                                        @Natanr No worries mate 🍻

                                        1 Reply Last reply Reply Quote 1
                                        • dustbro
                                          dustbro last edited by

                                          and my final resting place:

                                          if (compressorMakeup)
                                          		{
                                          			auto attenuation = compressor.getThresh();
                                          			auto ratio = compressor.getRatio();
                                          			auto gainDb = (1.0 - ratio) * (attenuation * -1.0) * 0.7;
                                          
                                          			compressorMakeupGain = (float)Decibels::decibelsToGain(gainDb);
                                          		}
                                          		else
                                          			compressorMakeupGain = 1.0f;
                                          

                                          Dan Korneff - Producer / Mixer / Audio Nerd

                                          SteveRiggs 1 Reply Last reply Reply Quote 1
                                          • SteveRiggs
                                            SteveRiggs @dustbro last edited by

                                            @dustbro Nice! Even smoother now?

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

                                            18
                                            Online

                                            732
                                            Users

                                            5.4k
                                            Topics

                                            50.2k
                                            Posts