AmpThdVersusFrequency Exception in 1.197

Switched to running 1.197 last week and I have stumbled onto an Exception being thrown during Automated Tests AmpThdVersusFrequency. (Maybe it also happened in older versions, I don’t know.)

Just for context, running a QA403 with 1.197 on Win 10, 16GB of RAM and plenty of disk space available.

400 (Bad Request: Exception: (Illegal values passed to FindPeakBin))
QA403ExceptionCapture

Believe it has something to do with the highest frequency fundamental being tested, related to Stop frequency (and Nyquist?):

Also note - Only happens if “Measure THD+N instead of THD” is checked in AmpThdVersusFrequency Options popup.

@96k sample rate:
In AmpThdVersusFrequency Options popup, set the Stop Frequency to 40961 or higher, last test in sweep runs at 40.959kHz, throws the exception (Illegal values passed to FindPeakBin).
Set Stop Frequency to 40960, last test in sweep runs at 28.962kHz, everything runs normally.

@48k sample rate:
In AmpThdVersusFrequency Options popup, set Stop Frequency to 20481 or higher, last test in sweep runs at 20.479kHz, throws the exception (Illegal values passed to FindPeakBin).
Set Stop Frequency to 20480, last test in sweep runs at 14.481kHz, everything runs normally.

Without a 200kHz measurement bandwidth, the THD calculations at high frequencies (20k) will be of limited value, as you’re simply not capturing the harmonics in the first place.

Even at 192kHz sampling, you can’t get accurate 10kHz THD.

Maybe the command line startup at 384kHz Fs with a high quality external gen could get you close to meaningful 20kHz THD- I don’t know, haven’t tried it yet.

What have you set your global THD mesurement stop frequency to?

image

Hi John @restorer-john

Thanks for the explanation, I do understand that THD is not measurable (or at best is of limited usefulness) at the higher frequencies due to the lack of measurable harmonics, depending on sample rate selected as you mentioned.

So I typically run at 96k sample rate with measurement stop frequency set to 44 or 45kHz. Experimenting with this particular error message I was also running some tests at 48k samples and 24.0 kHz measurement stop frequency, just to see if I could replicate the error scenario, which I did.

The point of my post was basically just to flag the fact that the plugin is throwing unhandled exceptions - and I was trying to leave enough breadcrumbs for a developer to be able to replicate the issue. The user either shouldn’t be able to enter settings that cause exceptions to be thrown, or the code should handle them gracefully. In my humble opinion.

Cheers! - Steve

1 Like