Spectrum Analyzer in python (>= 3.10)
using wxPython numpy scipy soundfile sounddevice matplolib

To run program click run.py You can select a desired device using "input device" menu Then you select sampling frequency available with this device.
Press button to start sampling. Signal is plotted in Oscilloscope window (time signal Tab). Only index ranging ranging from beginning to end indices are plotted. Values can be changed during sampling with slider.
Spectrum is plotted in Oscilloscope window (Spectral Tab). It can be real time spectrum if button Enable plot spectrum is red (in Interface window spectrum tab). Frequency plotted can be select using slider in Interface window spectrum tab
Selecting With the Keyboard and Mouse
press shift key and click in spectral tab : give frequency and fft modulus click
press ctrl key and click in spectral tab : plot a cross around peak more than -x dB than clicked value click
press alt key and click in spectral tab : plot bandwidth at level -x dB relative to clicked value
press ctrl+shift key and click in spectral tab : total harmonic distorsion All numerical values are printed in window named Oscilloscope Logger and in grid Marker values (copy and paste values in your favorite spreadsheet is available)
You can fix space between peak in parameters (intervace window) tab using slider. You can change level of bandpass in parameters (intervace window) tab using slider Bandwidth


