aboutsummaryrefslogtreecommitdiff
path: root/src/components/original.py
diff options
context:
space:
mode:
authortassaron2022-05-08 00:48:50 -0400
committertassaron2022-05-08 00:48:50 -0400
commit4ab75a9a51789b22b24b9cd482de9b2a55d6c271 (patch)
tree6a513f522e37c270ecdd95d1fca00ae5890774bf /src/components/original.py
parentf35571743e7422088cf0f631d16d192c63f145e0 (diff)
Add sensitivity option to classic visualizer
Allows to decide how balanced the up/down smoothing is. The default (0) is the same as before; increasing sensitivity makes the up/down values closer to each other (less smooth, more sensitive)
Diffstat (limited to 'src/components/original.py')
-rw-r--r--src/components/original.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/original.py b/src/components/original.py
index 80228fe..289e982 100644
--- a/src/components/original.py
+++ b/src/components/original.py
@@ -38,6 +38,7 @@ class Component(Component):
'layout': self.page.comboBox_visLayout,
'scale': self.page.spinBox_scale,
'y': self.page.spinBox_y,
+ 'smooth': self.page.spinBox_smooth,
}, colorWidgets={
'visColor': self.page.pushButton_visColor,
}, relativeWidgets=[
@@ -53,8 +54,8 @@ class Component(Component):
def preFrameRender(self, **kwargs):
super().preFrameRender(**kwargs)
- self.smoothConstantDown = 0.08
- self.smoothConstantUp = 0.8
+ self.smoothConstantDown = 0.08 + 0 if not self.smooth else self.smooth / 15
+ self.smoothConstantUp = 0.8 - 0 if not self.smooth else self.smooth / 15
self.lastSpectrum = None
self.spectrumArray = {}