summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2016-01-29 22:17:51 +0100
committerMaZderMind <git@mazdermind.de>2016-01-29 22:17:51 +0100
commitb7ff4eae91b010e29f03a68e842bb342fd65480c (patch)
tree30da8a8aeadaaa04c1f69c3c4f8ec99759b5ed03
parent4037733853ad2dbb0064d68f7590e0c94f98151e (diff)
simplify formular
-rw-r--r--voctogui/lib/audioleveldisplay.py4
1 files changed, 2 insertions, 2 deletions
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):