molke-productions / qloud

Tool to measure loudspeaker frequency and step responses and distortions
GNU General Public License v2.0
28 stars 6 forks source link

Qtcharts implementation #10

Closed be1 closed 4 years ago

be1 commented 4 years ago

Hello, I implemented a QtCharts version here. No more dependency to Qwt. If you wish to use it, can you consider my pull request ? Thanks, Benoît

be1 commented 4 years ago

This branch also includes printing which is a nice feature.

gaydenko commented 4 years ago

It is really very intriguing addition, especially for me as initial creator :) Hope @molke-productions will find a weekend hour to evaluate and probably merge this new QLoud incarnation!

be1 commented 4 years ago

@gaydenko Thank you for having set it open sourced ! @molke-productions taking back maintenance, me, other people maybe : That's the power of free software for durability !

molke-productions commented 4 years ago

Sorry for the delay. I’m still trying to understand GitHub, but I should be notified now without being explicitly mentioned. @be1 Your alternative implementation seems to be working just fine. Thank you very much. Since you seem to be much more capable with Qt than me, I can also give you direct write access to this repository?

I tried merging your pull request into a new qtcharts branch for now. If there are no reservations, this can also become the master branch (maybe as a new major version).

The only thing I did change (apart from some code formatting) are tick mark/axis settings to get 20 dB divisions in SPL and harmonics plots.

I have two suggestions which are above my abilities. First, zooming in y-direction does not seem to work on my system with the new implementation. Is this a restriction of Qt Charts? Second, I would prefer to have the new print button not spanning the whole window width. This might prevent accidentally clicking on it. To maximize the plot area, it might be even better to move it to the top row (exists only on the SPL tab)?

be1 commented 4 years ago

@molke-productions Glad you like my proposition. Yes, I will modify the print button size, you are right. I will try to know how to zoom on the y-axis in QtCharts. If you want to give me write access to your repo, this is ok for me. I'll first use your qtchart branch.

be1 commented 4 years ago

Couldn't find an easy way to both zoom in x-axis AND y-axis in QtChart.Sorry. I may investigate more later for subclassing QChartView and implement that kind of zoom myself.

molke-productions commented 4 years ago

No worries. One less dependency is well worth it. But maybe this should be resolved before declaring it the new master branch. Actually, I tend to do plots externally (GNU Octave) if I want more fine-grained control. In this regard, for me, an ASCII export of the plotted data would be more useful than direct printing, so I don’t have to deal with the audio files again.

be1 commented 4 years ago

Thanks, I will work in the qtcharts branch. The idea of exporting ASCII is a good idea. I only know Gnuplot. If you have any GNU Octave import example I would be glad if you could send me an example by attachment here. Thanks !

molke-productions commented 4 years ago

Attached is a simple example (rename qloudplot.m.txt to .m). Some constants (path, key, …) have to be manually adjusted for your setup. This is a reduced version of a slightly more elaborate comparison between different simulations and the measured response of a crossover (loudspeaker.pdf), and it plots just the magnitude response (my signal processing courses were a long time ago).

loudspeaker.pdf qloudplot.m.txt

molke-productions commented 4 years ago

As for the zoom, maybe it is easier to bind the directions to different events – like left click to x-axis and right click to y-axis (double-click for reset)?

be1 commented 4 years ago

Hello. So I switched to your repository, branch qcharts. I made some new features on it, including GNU octave output for SPL plot only. As I don't know octave, could you implement octave output for the other tabs ? If you wan to... I'm closing this ticket now.

be1 commented 4 years ago

I could find, by reading the docs, an easy way to zoom in with a rectangular selection :-)