From b7ff4eae91b010e29f03a68e842bb342fd65480c Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Fri, 29 Jan 2016 22:17:51 +0100 Subject: simplify formular --- voctogui/lib/audioleveldisplay.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'voctogui') diff --git a/voctogui/lib/audioleveldisplay.py b/voctogui/lib/audioleveldisplay.py index 5aaf088..ed62313 100644 --- a/voctogui/lib/audioleveldisplay.py +++ b/voctogui/lib/audioleveldisplay.py @@ -63,8 +63,8 @@ class AudioLevelDisplay(object): # -15db -> 0.50 # -5db -> 0.25 # -0db -> 0.00 (very loud) - logscale = math.log10(-0.15* (db) +1) - normalized = 1 - self.clamp(logscale, 0, 1) + logscale = 1 - math.log10(-0.15 * db + 1) + normalized = self.clamp(logscale, 0, 1) return normalized def clamp(self, value, min_value, max_value): -- cgit v1.2.3