(Jul-03-2018, 04:17 PM)Alfalfa Wrote: Hi there,
I'm not sure about how you want to use it in your code, but QTimer are very easy. Like I shown you, you can simply init it in the __init__ of your gui loop (SoundApp), then use self.timer to manipulate it if needed. You don't need to init a new singleshot timer recursively like you've done (line 36). Single shots timers are.. for single shot. They fire only once. If you want to repeat an action every few seconds, simply init a QTimer with an interval, then start it and it will loop forever.
Thank you so much!!

I'll try it right away when I get home, and see if there's any problem while I processing it
(Jul-03-2018, 10:02 PM)DeaD_EyE Wrote: Hello, I can only help a bit with signal processing.
Instead of making a fft and throwing the negative frequencies away, you should do a rfft.
Here a corrected version and additional the same with a rfft.
def getFFT(data, rate): """Given some data and rate, returns FFTfreq and FFT (half).""" window_size = len(data) data *= np.hamming(window_size) fft = np.fft.fft(data).real freq = np.fft.fftfreq(window_size, 1.0 / rate) half_size = slice(None, window_size // 2) return freq[half_size], fft[half_size] def getRFFT(data, rate): """Given some data and rate, returns RFFTfreq and RFFT.""" window_size = len(data) data *= np.hamming(window_size) rfft = np.fft.rfft(data).real freq = np.fft.rfftfreq(window_size, 1.0 / rate) return freq, rfft
Thank you so much! I'll try to changed the FFT then and see the results
but I have a question if I want to change the number that written in the axis XY inside the graph to alphabet like ABCD instead 0123, how can I do that?
I want to make a marker for some number into alphabet like 198 into G, 440 into A, etc