Forum

    • Register
    • Login
    • Search
    • Categories

    Meters linearity...

    Feature Requests
    1
    1
    24
    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.
    • ustk
      ustk last edited by ustk

      @Christoph-Hart I always found the behaviour of the meters weird. They are linear... Is that intentional?
      I had a glance at the source, and while the meter class setPeak function has a forcelinear option, it is apparently not used in the processor headers.
      Rather, they seem to be directly constructed using the drawStereoMeter method, and this one linearises the values like so:

      void VuMeter::drawStereoMeter(Graphics &g)
      {
      	const float vL = jmin(1.0f, (l + 100.0f) / 100.0f);
      	const float vR = jmin(1.0f, (r + 100.0f) / 100.0f);
      
      	getLaf()->drawStereoMeter2(g, *this, type, vL, vR);
      }
      

      shouldn't it be instead:

      void VuMeter::drawStereoMeter(Graphics &g)
      {
      	const float vL = jmin(1.0f, Decibels::decibelsToGain(l));
      	const float vR = jmin(1.0f, Decibels::decibelsToGain(r));
      
      	getLaf()->drawStereoMeter2(g, *this, type, vL, vR);
      }
      

      Tired to press F5 in the forum...
      Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

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

      20
      Online

      742
      Users

      5.4k
      Topics

      50.4k
      Posts