I’ve been using Arta and Steps for years before I got the QA403. The Steps program was able to create a graph which plots the first 6 harmonics over frequency which is assential when designing an amplifier. I think I need the same data wich is displayed in the THD Bargraph visualizer. I could not find any sourcecode of [ThdBargraph] How can I get the n-th harmonic via the REST api after doing an acquisition? Or do I have to process the fft data myself for that?
I want to create an opensource c# program which plots this graph:
I will create an application which sets the generator to a certain frequency and then I will get the harmonics by calculating the bins and get their value with PeakDbv.
Hi @breedj, via REST you can run an acquisition, and then ask the REST server to compute the THD for you. For example, if you did the acq with a 1 kHz tone and wanted to look at all harmonics through 20k that would be:
GET localhost:9402/ThdDb/1000/20000
Note that you can adjust the stop frequency for the calc. So, if you want to look at the THD with a 100 Hz fundamental with just the harmonics up to and including 500 Hz you could issue:
GET localhost:9402/ThdDb/100/500
That would return the left/right channel THD ratio expressed in dB. You can also do ThdPct if you’d like in percent.
Thanks Matt. I’ve discovered the api and already started using it. I think it is perfect for what I like to do and easy to use. I will use PeakDbv instead of ThdDb because it does not give me the distortion of the single harmonics, only a range where the start is always the fundamental. But I have tested PeakDbv where you can specify a custom frequency range and it is perfect for what I need. And I noticed I can also use /Data/Frequency/Input and do my own calculations as well.
I will post a link to the repository of my program after I’ve have made a working version. I will first compare the results with some other systems like Audio Precision.