Forum

    • Register
    • Login
    • Search
    • Categories

    Dynamics Module

    Scripting Forum
    4
    6
    1021
    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.
    • d.healey
      d.healey last edited by

      What's this do?

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

      1 Reply Last reply Reply Quote 0
      • Christoph Hart
        Christoph Hart last edited by

        It's a new compressor, gate and limiter. Check out the demo plugin in the tutorial repository:

        0_1509143015394_comp example.PNG

        https://github.com/christophhart/hise_tutorial/tree/master/DynamicsFX

        1 Reply Last reply Reply Quote 1
        • Christoph Hart
          Christoph Hart last edited by

          I really went crazy with the path rendering this time:

          // Draw the background path
          p.clear();
          p.startNewSubPath(0.0, 1.0);
          p.lineTo(gt, 1.0);
          p.lineTo(gt, 1.0 - gt);
          
          if(ct != -1.0)
          {
              p.lineTo(ct, 1.0 - ct);
          
              // this is pretty trivial...
              local nx = ct + (1.0-ct)*1.0/cr;
              local a = (1.0 - ct) * (lt - ct) / (nx - ct);
          
              if(nx > lt)
              {
                  p.lineTo(ct + a, 1.0 - lt);
                  p.lineTo(1.0, 1.0 - lt);
              }
              else
              {
                  p.lineTo(1.0, 1.0 - nx);
              }
          }
          else
          {
              p.lineTo(lt, 1.0 - lt);
              p.lineTo(1.0, 1.0 - lt);
          }
          
          p.lineTo(1.0, 0.0);
          p.lineTo(1.0, 1.0);
          p.closeSubPath();
          
          
          // Now draw the level path
          l.clear();
          l.startNewSubPath(0.0, 1.0);
          
          if(gt > lvl)
          {
              closePath(l, 0.0);
              return;
          }
          
          l.lineTo(gt, 1.0);
          l.lineTo(gt, 1.0 - gt);
          
          if(ct != -1.0)
          {
              if(ct > lvl)
              {
                  l.lineTo(lvl, 1.0-lvl);
                  closePath(l, lvl);
                  return;
              }
          
              if(lvl > lt)
              {
                  l.lineTo(ct, 1.0 - ct);
          
                  local nx = ct + (1.0-ct)*1.0/cr;
                  local a = (1.0 - ct) * (lt - ct) / (nx - ct);
          
                  if(nx > lt)
                  {
                      l.lineTo(ct + a, 1.0 - lt);
                      l.lineTo(1.0, 1.0 - lt);
                  }
                  else
                  {
                      l.lineTo(1.0, 1.0 - nx);
                  }
              }
              else
              {
                  l.lineTo(ct, 1.0 - ct);
          
                  local nx = ct + (1.0-ct)*1.0/cr;
                  local a = (1.0 - ct) * (lt - ct) / (nx - ct);
              
                  if(lvl > nx)
                  {
                      if(nx > lt)
                      {
                          l.lineTo(ct + a, 1.0 - lt);
                          l.lineTo(1.0, 1.0 - lt);
                      }
                      else
                          l.lineTo(1.0, 1.0 - nx);
                  }
                  else
                  {
                      local b = (1.0 - ct) * (lvl - ct) / (nx - ct);
                      l.lineTo(ct + b, 1.0 - lvl);
                      closePath(l, lvl);
                      return;
                  }   
              }
          }
          else
          {
              l.lineTo(lvl, 1.0 - lvl);
              closePath(l, lvl);
              return;
          }
          
          l.lineTo(1.0, 0.0);
          l.lineTo(1.0, 1.0);
          l.closeSubPath();
          
          1 Reply Last reply Reply Quote 2
          • d.healey
            d.healey last edited by

            Looks good, I'll have to tinker with it

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

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

              Yess !!! Look very good!

              1 Reply Last reply Reply Quote 0
              • R
                RalfsPlucis last edited by

                Hi there. I can't seem to figure out how to open the dynamics FX from repository folder. I apologise for asking, but could anyone please explain to me how to get it working? Kind regards.

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

                8
                Online

                855
                Users

                5.7k
                Topics

                53.0k
                Posts