Conversation
plotview.cpp
Outdated
| void PlotView::setPowerMin(int power) | ||
| { | ||
| powerMin = power; | ||
| // HVI_REVIEW: Not needed? powerMin = power; |
There was a problem hiding this comment.
It does look like these are unused and should be removed. I'd prefer that as a separate commit that just deletes the lines, rather than commenting them out
plotview.cpp
Outdated
| { | ||
| if (spectrogramPlot != nullptr) | ||
| spectrogramPlot->setTimeResolution(resolution); | ||
| // updateView(true); |
There was a problem hiding this comment.
This shouldn't be commented out, it should just be deleted
spectrogramcontrols.cpp
Outdated
| timeResolutionSlider = new QSlider(Qt::Horizontal, widget); | ||
| timeResolutionSlider->setRange(0, 99); | ||
| layout->addRow(new QLabel(tr("Time resolution:")), timeResolutionSlider); | ||
|
|
There was a problem hiding this comment.
Minor nit, but I'd prefer this to be just under the zoom slider - it makes sense to group FFT size/zoom/resolution together.
spectrogramplot.cpp
Outdated
| int windowSize = fftSize - zeroCount; | ||
| for (int i = 0; i < windowSize; i++) { | ||
| float term = float(2*i - windowSize + 1) / windowSize; | ||
| window[i] = bessel(beta * sqrt(1.0 - term * term)) / denominator; |
There was a problem hiding this comment.
Currently I notice that the spectrogram shifts to the right as you increase the time resolution slider. To stop that happening, I think that the non-zero values should be centered in the window, rather than left-aligned.
|
This is looking like a nice feature, thanks for submitting and let me know what you think about the proposed changes. |
|
I will be making the changes you requested. |
|
I've been doing my own improvements in the meantime: I now use the liquid-dsp implementation of the kaiser window, and I made the beta parameter configurable as it is also handy to be able to tune the fft window shape. |
|
Hey miek, |
|
ping |
Increasing time resolution by narrowing the fft window function. The window function now is a Kaiser bessel function.
Also, I removed some variables that were not used.. They are just commented out, so please review this and if there is a reason for this, please let me know.