aboutsummaryrefslogtreecommitdiff
path: root/src/components/original.py
diff options
context:
space:
mode:
authorBrianna2017-07-15 19:40:08 -0400
committerGitHub2017-07-15 19:40:08 -0400
commitf420ad69f5f6f3c830fea890a760ce0ce61ba571 (patch)
tree2a7f9df3eebbae8da4317516f84dfe7490b5d36a /src/components/original.py
parent94d4acc1f4f4abe4029e8f9c050932b67cae8cec (diff)
parentbcb8f27c2e4434d2296dcd66bf279b76ee0d0a4f (diff)
Merge audio-mixing branch
some basic audio features + more user feedback + merging static components
Diffstat (limited to 'src/components/original.py')
-rw-r--r--src/components/original.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components/original.py b/src/components/original.py
index 638095d..f5776a4 100644
--- a/src/components/original.py
+++ b/src/components/original.py
@@ -21,6 +21,7 @@ class Component(Component):
def widget(self, parent):
self.parent = parent
+ self.settings = self.parent.core.settings
self.visColor = (255, 255, 255)
self.scale = 20
self.y = 0
@@ -50,7 +51,7 @@ class Component(Component):
self.visColor = self.RGBFromString(self.page.lineEdit_visColor.text())
self.scale = self.page.spinBox_scale.value()
self.y = self.page.spinBox_y.value()
- self.parent.drawPreview()
+
super().update()
def loadPreset(self, pr, presetName=None):
@@ -76,8 +77,8 @@ class Component(Component):
def previewRender(self, previewWorker):
spectrum = numpy.fromfunction(
lambda x: float(self.scale)/2500*(x-128)**2, (255,), dtype="int16")
- width = int(previewWorker.core.settings.value('outputWidth'))
- height = int(previewWorker.core.settings.value('outputHeight'))
+ width = int(self.settings.value('outputWidth'))
+ height = int(self.settings.value('outputHeight'))
return self.drawBars(
width, height, spectrum, self.visColor, self.layout
)
@@ -88,8 +89,8 @@ class Component(Component):
self.smoothConstantUp = 0.8
self.lastSpectrum = None
self.spectrumArray = {}
- self.width = int(self.worker.core.settings.value('outputWidth'))
- self.height = int(self.worker.core.settings.value('outputHeight'))
+ self.width = int(self.settings.value('outputWidth'))
+ self.height = int(self.settings.value('outputHeight'))
for i in range(0, len(self.completeAudioArray), self.sampleSize):
if self.canceled: