flothesof / pyqtgraph-spectrographer

A pyqtgraph based spectrogram app using pyaudio.
MIT License
35 stars 7 forks source link

pyqtgraph api changes #8

Open johnofleek opened 5 months ago

johnofleek commented 5 months ago

There have been some changes to pyqtgraph - I think I've managed to fix most of the differences in the attached code main.zip

Test with

Package             Version
------------------- -----------
contourpy           1.1.1
cycler              0.12.1
fonttools           4.51.0
importlib_resources 6.4.0
kiwisolver          1.4.5
matplotlib          3.7.5
numpy               1.24.4
packaging           24.0
pillow              10.3.0
pip                 24.0
PyAudio             0.2.14
pyparsing           3.1.2
PyQt5               5.15.10
PyQt5-Qt5           5.15.2
PyQt5-sip           12.13.0
pyqtgraph           0.13.3
python-dateutil     2.9.0.post0
setuptools          41.2.0
six                 1.16.0
zipp                3.18.1
flothesof commented 5 months ago

Thanks for your submission. I’ll take a look at it.

johnofleek commented 5 months ago

Thanks - there is an issue with my code I think your original code set TIMEOUT in float seconds. Maybe the original QTimer start() took float seconds as input. The new start() is int milli seconds. I don't know what impact the rounding will have but anyway

TIMEOUT = TIME_VECTOR.max() #seconds
TIMEOUT = int(TIMEOUT*1000)

Does seem to work

Improved version with one single event timer driving the rest

main (2).zip