Hi there,

Does anyone have Steve Harris' new email address? st...@plugin.org.uk
fails with "550 5.1.2 Bad destination system address".

Anyway, some of you who package or copied code from meterbridge may be
interested in this as well.

-=-=-=-=-
Hi Steve,

Haven't seen you around much on LAD. I hope this email finds you well.

Are you still maintaining meterbridge? I've stumbled over a bug in 0.9.2
The IEC scale is not continuous. Attached patch resolves the issue.

I don't have access to the IEC-268-18 specs, so I can't tell if the
patch is correct, but it does fix the discontinuity between -60db and
-50db. To make it obvious, here's the annotated iec_scale(float db):

   if (db < -70.0f) {
     def = 0.0f;
   } else if (db < -60.0f) {
     def = (db + 70.0f) * 0.25f;        //  0.0  ..   2.5
   } else if (db < -50.0f) {
//   def = (db + 60.0f) * 0.5f + 5.0f;  //  5.0  ..  10.0 // bug? v0.9.2
     def = (db + 60.0f) * 0.5f + 2.5f;  //  2.5  ..   7.5 // fix!
   } else if (db < -40.0f) {
     def = (db + 50.0f) * 0.75f + 7.5;  //  7.5  ..  15.0
   } else if (db < -30.0f) {
     def = (db + 40.0f) * 1.5f + 15.0f; // 15.0  ..  30.0
   } else if (db < -20.0f) {
     def = (db + 30.0f) * 2.0f + 30.0f; // 30.0  ..  50.0
   } else if (db < 0.0f) {
     def = (db + 20.0f) * 2.5f + 50.0f; // 50.0  .. 100.0
   } else {
     def = 100.0f;
   }


Furthermore, the DPM image has a couple of problems:
The markers at -10, -19, -20, -25, -30, -35, -55 are off by one pixel
(they need to be moved 1px down), the -45db marker is correct.

The marks for -40, and -50 are missing and it's easy to mistake the
-45db and -55db marks to correspond to the -40db, -50db annotations.

Last but not least, the minus-signs of all annotation does not align
with the marks and the font used for the annotation text is somewhat
blurry..

All fixed in attached image.

Cheers!
robin

diff --git a/src/dpm_meters.c b/src/dpm_meters.c
index 34738c2..b1ea69c 100644
--- a/src/dpm_meters.c
+++ b/src/dpm_meters.c
@@ -33,7 +33,7 @@ int iec_scale(float db) {
          } else if (db < -60.0f) {
                  def = (db + 70.0f) * 0.25f;
          } else if (db < -50.0f) {
-                 def = (db + 60.0f) * 0.5f + 5.0f;
+                 def = (db + 60.0f) * 0.5f + 2.5f;
          } else if (db < -40.0f) {
                  def = (db + 50.0f) * 0.75f + 7.5;
          } else if (db < -30.0f) {

<<attachment: iec268-scale.png>>

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Reply via email to