diff --git a/main.py b/main.py index 376b74d..a088c8e 100644 --- a/main.py +++ b/main.py @@ -176,9 +176,10 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow): # Graphics plot self.PlotWidget.setXRange(0, 100, padding=0) # x axis range self.PlotWidget.setYRange(0, 1, padding=0) # y axis range + self.PlotWidget.setLogMode(False, False) + self.PlotWidget.setMouseEnabled(x=False, y=False) self.PlotWidget.getAxis("bottom").setTicks([]) # Remove x-axis ticks self.PlotWidget.getAxis("bottom").setLabel("") # Remove x-axis label - self.PlotWidget.setLogMode(False, False) # Remove y-axis labels and decorations self.PlotWidget.getAxis("left").setTicks([]) # Remove y-axis ticks self.PlotWidget.getAxis("left").setLabel("") # Remove y-axis label @@ -392,7 +393,7 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow): self.clear_audio_visualization() y = self.audio_visualizer.get_amplitudes() x = [i for i in range(len(y))] - self.PlotWidget.setLogMode(True, True) + # x = nparray([0, 31.25, 62.5, 125, 250, 500, 1000, 2000, 4000, 8000, 15000, 20000]) self.PlotWidget.plot(x, y, fillLevel=0, fillBrush=mkBrush("b")) self.PlotWidget.show() diff --git a/utils/fft_analyser.py b/utils/fft_analyser.py index 44d0f1f..4ca752a 100644 --- a/utils/fft_analyser.py +++ b/utils/fft_analyser.py @@ -6,11 +6,11 @@ from PyQt5 import QtCore from pydub import AudioSegment import numpy as np from scipy.ndimage.filters import gaussian_filter1d -from logging import debug +from logging import debug, info class FFTAnalyser(QtCore.QThread): - """Analyses a song on a playlist using FFTs.""" + """Analyses a song using FFTs.""" calculated_visual = QtCore.pyqtSignal(np.ndarray) @@ -57,7 +57,6 @@ class FFTAnalyser(QtCore.QThread): freq = np.fft.fftfreq(fourier.size, d=0.05) amps = 2 / v_sample.size * np.abs(fourier) data = np.array([freq, amps]).T - # info(data) point_range = 1 / self.resolution point_samples = []