ToneBench - Audio Equipment Analyzer

Tonebench — a free, cross-platform analyzer app for the QA40x (and for any sound card)

The story

I build tube amplifiers, and a few years ago I bought a QuantAsylum QA403 to stop guessing about them. The hardware is excellent. What I kept running into was everything around it: the software only runs on Windows, measurements live as whatever files you remember to save.

So I started writing my own. It began as “just the FFT screen” and turned into something rather
larger: a cross-platform app that talks to the QA403 directly over raw USB (no vendor driver, no
DLL), does all its own DSP, and keeps every measurement in a project file on disk so a session is
still there next week. Along the way it grew a sound-card back end as well, so the same ten
measurements work through a USB interface if you don’t own a QA403 — and a complete simulator with synthetic devices under test, so you can try the whole thing out with no hardware plugged in at all.

It is free, the source is on GitHub, and there are installers for Windows and Linux. I would very
much like to hear what breaks.

Download / source: GitHub - breedj/tonebench-audio-equipment-analyzer: Cross platform audio analyzer for qa40x devices · GitHub


Impressions


What it does

Hardware

  • QuantAsylum QA403 over raw USB — libusb on both platforms, no vendor driver or DLL. The QA403 binds to WinUSB by itself on Windows; on Linux a udev rule ships with the package.
  • Any sound card, via PortAudio — ASIO, WASAPI, WDM-KS, ALSA. ARTA-style calibration for output level, input full scale and an external source, so readings are in volts rather than dBFS.
  • 48 / 96 / 192 kHz, plus an experimental 384 kHz input-only mode (measured flat to within
    a decibel out to ~180 kHz; the DAC is not usable there, and the app refuses to drive it).
  • QA451 / QA451B programmable load (optional) — 4 Ω / 8 Ω switching and supply control from the status bar.
  • Built-in simulator with a set of synthetic DUTs: tube amp, loudspeaker, phono stage,
    Butterworth / Chebyshev / Bessel / elliptic filters, clipping and crossover-distortion stages,
    a digital processor, an oscillating amplifier, and impedance fixtures. Every screen is usable and
    verifiable with nothing connected.

Measurements — ten kinds, each with its own settings, charts and stored results

  • FFT analysis — spectrum, THD, THD+N, SNR, harmonic table, two-tone IMD (SMPTE / DIN / CCIF), multitone TD+N, noise floor and weighted noise figures, with an oscilloscope (including a
    fundamental-removed residual trace) and a spectrogram beside it.
  • THD vs frequency — a tone stepped across the band: THD, D2–D5 and D6+ against frequency, with optional frequency-normalised (Temme nTHD) figures.
  • THD vs amplitude — drive stepped at one frequency, against output voltage, output power or input voltage, with an early-abort threshold so a clipping amplifier isn’t driven into the rail.
  • IMD vs amplitude — a two-tone pair stepped the same way, with its 2nd–5th order products.
  • Frequency response — a periodic chirp (or pink / white / speech-shaped periodic noise)
    deconvolved to gain, phase, coherence, group delay and phase delay, with ±1 dB / −3 dB bandwidth corners measured from the passband, and Bode, Nyquist, Nichols, pole–zero and |H(s)|-surface
    views with a rational-function fit.
  • Stepped sine response — the same curves one tone at a time: slower, but nothing else is
    playing while each point is measured.
  • Impulse response — the chirp deconvolved to an impulse, with a gated magnitude and phase,
    harmonic distortion against frequency, and cumulative spectral decay and burst decay
    surfaces, drawn as a turnable 3D waterfall or a flat sonogram.
  • Impedance — magnitude and phase in ohms through a series reference resistor, with open/short
    calibration, chirp / pink-noise / stepped-sine stimuli, and a readout that fits a capacitor, an
    inductor or a loudspeaker’s Thiele–Small parameters.
  • Output impedance / damping factor — the two-load load-step method, in ohms and as a damping
    factor against frequency (no open-circuit pass unless you tick the box — an unloaded output
    transformer is no joke).
  • Crosstalk — one channel driven, the other read: dB against frequency, either direction or both.

Analysis

  • Own DSP throughout.
  • Windows: rectangular, Hann, Hamming, Blackman-Harris, Flat Top, Kaiser 5 and Kaiser 7
    (ARTA’s α convention — −120 and −171 dB sidelobes).
  • Noise weighting: A, C, ITU-R 468, CCIR/ARM, RIAA playback and record, plus two user-loadable curves in the QA40x file format.
  • Noise density in dBV/√Hz, input-referred through a DUT-gain figure; a bandwidth setting that defines what “+N” means.
  • Fractional-octave smoothing from 1/48 to 1/3 octave, done as a proper band average (complex where the quantity is complex).
  • Automatic input ranging, output ranging derived from the stimulus, output-referred drive targets
    (“give me 1 W into 8 Ω and tell me if the amplifier can’t reach it”), external gain/divider compensation, and a configurable settle time per stimulus change.

Projects and data

  • A project is one .tbench SQLite file, kept wherever you like. Inside it: a reorderable list
    of measurements, and every run you save as a stored result with its notes, its full-resolution
    capture and the exact parameters that produced it.
  • Overlay saved runs on the live chart to compare them; annotate charts with markers, regions and rules; rename, re-analyse, and delete into a trash that holds things for a while first.
  • Export and import between projects, so a measurement set travels to someone else as one file.
  • Save as with or without results, so a project doubles as a template for the next device.

Reports and export

  • CSV — one row per FFT bin, per sweep point or per trace column.
  • PNG of any chart, at a size you choose.
  • PDF report — tick which blocks it carries (charts, readings, metric tiles, harmonic levels,
    settings, your notes), for a single result or as a whole-project report, optionally in black and
    white for printing.

Importing a simulation

LTspice and QSpice runs import and draw beside a measurement. A transient run (.raw /
.qraw) is analysed with the same code the live FFT screen uses, so its THD, THD+N, SNR and
harmonic figures mean exactly what a measured capture’s do; an AC run imports as a
frequency-response result with gain and phase. Imported traces are stored inside the project file
and behave like any other result.

The app itself

  • Runs as a local web app (bound to 127.0.0.1 only) with the UI in your browser — light and dark
    themes, responsive down to a laptop screen.
  • Its own manual, built in, in two editions over the same contents: a 15-page Simple guide in
    plain language with no formulas, and a 55-page Full manual covering every screen, control and convention, the wiring diagrams, and the simulator’s DUT models with the measured figures behind them. Every measurement screen has a ? button that opens at its own page.
  • Diagnostics for when something goes wrong: detailed logging, per-acquisition WAV recording of
    both directions, and a one-button issue report that zips up the evidence (nothing is ever
    uploaded — where it goes is your decision).
  • A dismissible update check against GitHub Releases, which can be switched off entirely.

Installing

  • Windows — a per-user installer, no administrator prompt, or a portable zip. Not code-signed,
    so SmartScreen will grumble once.
  • Linux — a .deb for Debian/Ubuntu (brings the udev rule and the menu entry) or a tar.gz with a setup script for everything else.
  • Self-contained: no .NET runtime to install, ~28 MB. Nothing is written next to the executable, so
    an upgrade is a file replacement.
5 Likes

Is it possible to use let say QA403 DAC as Analogue source and an COSMOS ADC DM at the same Time insteat of QA403 ADC ?

On REW i can’t combine QA403 at the same Time with other Devices like COSMSO ADC let say thrue FlexASIO and if i use ASIO401 i cant use other Devices need to use 2 instances REW at the same Time.

Like “REW 1” MOTU ul mk5 ASIO Generator OUT and “REW 2” COSMOS ADC DM Flex Asio as Analogue In for THD+N Measuring.

Need to test the Software tho.

Thank You :wink:

Ok seems only to work like on QASoftware only an Device setuped at Defoullt on Windows Soundsettings works mirrored.

I wish any day it would possible to choose an Mirrored Device driect from Software, so my main Soundoutput for Windows keeps playing Youtube and Desktop Stufff without change it or geting Ears blast away while measuring ;).

Or i need to use an aditional PC only for Measuring stuff.

Very nice work. I was running your older versions as well. Works fine in simulation when started from simulation shotcut/start menu but will not recognize a QA402 when started from non-simulation shortcut/start menu.

I get 127.0.0.1:8399 error connection refused. Thanks

I think that is an interesting case. I will put it on my todo list to find out.

Is the COSMOS ADC DM so much better than the QA403 ADC? Seems like an interesting device though.

The soundcard to use with ToneBench does not have to be the default Windows device.
I used a MOTU-M4 soundcard for my tests. It has multiple inputs and outputs. I used one channel pair to do the measurements and the other channels to listen to music/youtube at the same time. But if your soundcard only has one channel pair, then this wil not be possible.

Yes it is better. also more flexibel to use for different stuff but if you are using an Notchfilter on QA403 i gues you could measure the most DAC’S Out there already very good.

I will make an comparson soon. I got Victors Oszilator (1kHZ) to feed it into Analoge Gear (noise around -155dB :slight_smile: need to test it).

And i can use COSMOS APU (Notchfilter) on both Devices, QA403 as ADC DM.

For my case in special i use most Time REW with PC HDMI OUT as 7.1 Source into RME HDSPe Card for CamillaDSP and into 8 DAC’S (SMSL SU-2) for 16 Channel Out and there i use COSMOS ADC DM in Monomode for best performance i could get.

Here my actual Project (a bit much bla bla, go to side 8 :wink: )

https://www.diyaudio.com/community/threads/pc-based-dsp-with-rme-hdspe-aes-and-camilladsp-project-for-full-surround-digital-aktive-setup.440807/post-8411434

Matt (QA) can cound on my i am one of buying an QA404 if it is released :wink: I realy need AES in and out !

Here SU-2 DAC Measured with Notch (APU), SCALER and ADC DM in Mono mode, Avarage 16, all powered by an Powerbank 10000mAh:

Hi Barry,

The QA402 is currently not supported and since I do not own one I cannot test it now. So at the moment it only works with the QA403.

But I know someone who owns a QA402. So I will probably be able get it to work.

Looks like a cool project.

I do notice that the frequencies noted in the screenshots on your page say 1000.00 Hz exactly. You probaly already know, but the frequency of the generator has to be set to a fft bin frequency for the best results. Otherwise your fft will show a skirt around the fundamental which looks like phase-noise, but actually is caused by bin-leakage. It is difficult to achieve that with an external generator unless is uses a ocxo or rubidium reference. The frequency must not drift and tuned to fall in a single bin.

For instance when you use a 192 kHz sample rate and a 65536 FFT size the generator frequency must be set to 999.02 Hz, not at 1000.00 Hz.
This is what ToneBench does automatically when Snap to bin is enabled.

Below measurements with the right frequency in orange (snap to bin enabled) and the wrong frequency in blue (snap to bin disabled).

This frequency changes if you change the sample rate or FFT size.

I just want you to be aware of this in case you didn’t know.

2 Likes

Ok that i need to check by sure. Thank you.

1 Like

Here is an example, how to calculate the generator frequency based on the ADC settings.

Example (f = 1000 Hz, f_s = 192 000 Hz, N = 65 536):

  • Δf = 192 000 / 65 536 = 2.9296875 Hz
  • bin = 1000 · 65 536 / 192 000 = 341.333, so bin = 341
  • f_bin = 341 · 2.9296875 = 999.0234 Hz
1 Like

Got it you mean the Red Marked parts, sorry is German :wink:

The marked Checkbox was not aktivated now it is !

I used 48kHz for Measurements

With 48000kHz it seems right :wink:

  1. Δf = 48000 / 65 536 = 0,732421875Hz
  2. bin = 1000 · 65 536 / 48000 = 1365,33333333 so bin = 1365
  3. f_bin = 1365 * 0,732421875Hz = 999.7558 Hz (999.76Hz)

I like learning new Stuff :wink:

My main Hobby is Speaker designing / building so FFT Measurment i was not using offten for now.

Most Time Frequencyresponse and Impedance, Stepreponses, Phase and such things.

But for my actual Project i need to know how good i can reduce Jitterartifacts from my DYI HDMI to AES Extractor or how much they affect my digital to Analogue Chain.

Yes. 64k is actually 2^16=65536

Ich bin Niederländer, also ist Deutsch für mich kein Problem. Zumindest beim Lesen. :wink:

1 Like

Here an short comparence off Noise Level with shorted Inputs, 50Ohm BNC, REW Used.

QA403 Left Channel:

COSMOS ADC DM (batterie powered) Dual Mono mode with SCALER in Front of it, Lowest Amplification (0dB), no Level Autotune:

Both together, Red QA403,Yellow COSMOS mono Mode with SCALER:

ADC DM uses 2 ES9822Pro-ADC Chips each in Mono mode and with Scaler you could get them both in to one Balanced Monomode using REW Virtual Balanced Mode L and R Channel together.

Here with Victor’s Oszilator (For now no Metall Box for Chielding aplied)

QA403 with VO:

COSMOS ADC DM with VO:

COSMOS APU (NOTCH) SCALER ADC DM with VO:

The 50Hz on the left side comes probably from PSU and no Chielding (Enclousure) on VO, also Unbalanced connection, RCA Out from VO.

16 Avarge Setting used.

Powersupply is an older Voltcraft VLP 2403, this had 0-40 V my newer have all 30V or less :frowning:

But i could test them in Series configuration.

Victor says an Powersuply build with an LM317HV would do the Job 25mA 35V +/-0,5V

1 Like

I need to say respect for youre Work :wink: Looks very good already!

If i think about that Audioprecision wan’t 3000€ for his Software APx500 to work with ASIO Soundcards, without any Hardware, doing neare the same or at leased comperable i gues (I have never used it).

I am a bit stunned :wink:

That how my QA403 Measured Left chanel Out Straight connected to In, right input shorted with 50Ohm:

Was realy intutive to make that Measuring, for an Hobbyist :wink: !

Also a lot easier than preparing REW and make the same Measuring.

If you are new to REW.

Now i trying to use Flexasio Driver with my MOTU UL mk5 and COSMOS ADC DM.

I can select it but if i hit “Control Panel” Button, an link to Flexasio Gihub page opend but not the Control Panel, like on REW Settings Page.

This way i need to configure an flexasio.toml File by my own instead of using the Flexasio Control Panel.

BTW i realy like that Advanced (+18) Checkbox :wink:

After Calibration i got this Measuring COSMOS SCALER and ADC DM used , no Notch:

The Problem is: i get from SCALER +5,9dB Amplification add (last Amplification Step before clipping), is there an option to substract an external Amlification used to the Result, to get the level on screen back to 0dB for the overall Result.

So for now i need to count -5,9db to the Result THD+N? -113,05dB + -5,9dB = -118,95dB, right?

Next question is, how i can add an calibration file for Notch Measuring’s?

On REW i measure the overal Frequency response with notch and add this Result as an calibration File for COSMOS ADC Device (substraction) so the Frequenceresponse looks clean again with notch and calibration aplied.

How i could do it on youre Software?

Next question :wink:

If i use Single shot with this Combination (Motu SPDIF to SU-2 to COSMOS SCALER + ADC DM)

I get this:

So it looks like there is an Timingproblem with Motu or COSMOS ADC and youre Software, not sure?

May be it is because i don’t use an reference channel for Dual Mono use (SCALER with ADC DM, need to test it in Stereo mode than)

Is there an Setting to get it aligned with other than QA403 Hardware used?

If i hit Run, the Process ends looking good, but in between the screen looks the same like single shot screen. Probably normal?

On REW i had such kind of screen only if the Clocksync from Hardware won’t work or wrong configured like on RME HDSPe Card possible, while feeding Signal thrue it.

For Frequencyresponse Measurings i would also like to add an calibration File, let say, if you are using an DAC as Source for an DUT, probably good to add an Calibrationfile to that DAC before DUT, so you measure only the DUT’s Linearity.

QA403 is Linear and don’t need it probably, but other Soundcard’s do i guess.

Or Measurings with Microphone and Mic.-preamp for Frequencyresponse, Speaker Measuring.

I would like to add an Mikrophone calibrationfile :wink:

May be not the typical aplication for this Softwarepackage?.

I reed in youre Dokumention:

“so the source, the cabling and the analyzer’s own output stage divide out.” If second Channel is used as Reference.

So no Calibration File need for Source Soundcard / DAC than.

  • What is shown when clicking the control panel button is determined by the selected ASIO driver implementation. So I cannot change that.

  • Use the External gain in the bottom right corner to specify the gain of your external equipment.

  • You might be able to use the Weigting function of the fft measurment to specify calibration data. See the FFT analysis page in the manual about how the data format. It should be the same format as the original QA403 application uses. If that does not work I might be able to add some other functionality. But I need to know what kind of calibration file/format you use. Can you upload an example file? I like to have a look at the data format. Also tell me how do you create that file.

  • Please use the bug-report function when that timing problem occurs againg. Please tick the boxes in the Configuration → Diagnostics tab first. When that or another problem occurs use the red bug-icon and fill in the form.
    image
    When the Build Report button is pressed a zip-file will be created with the log file a screenshot and the raw data. Be sure to include all the data mentioned in that form. E-amil that file to joost.breed.quicknet@gmail.com. Maybe I can solve it.


    I do not own the hardware you have so I cannot reproduce or test it. I did intensively test with a MOTU-M4 and a QA403.
    For now just use the RUN function stop after you have a good capture. Or retry the SINGLE measurement until you have a correct measurment.

  • The reference function is used to measure relative to the generator signal and/or some other equipment you might use between the generator and the DUT. It is also used for determining the gain or phase. So connect the output of your generator to the right channel and select the Right channel is reference checkbox. The measurements done will be relative to that signal. That is the same as using a calibration file, but now it is done realtime, every time. The downside of using a calibration file can be that when your setup changes without you noticing, your measurements are all wrong without you knowing. Even temperature dirft or moving a cable can change the result. BNC connectors are notourious when it comes to bad connections. Especially with the cheap cables. So use the reference function when the measurement offers it. It will improve your measurment accuracy.

I made this software mainly for tube amplifier measurements. I used to use ARTA for that. I never used REW, but I will have a look at it. ToneBench might lack some funcationality which is used for microphone or speaker measurements simply because I was not interrested in those measurements. But I can add some of these specific functions in the future, also because I am planning to build speakers next year.

1 Like

Hi Barry,

The guy I know has a QA401, not a QA402. But the interface of the QA402 should be the same as the QA403. Are you willing to test a new version of my software against your QA402?

Thank you man!

I will send you my Microphone calibration i use on REW made by Byerdynamic for MM1:

https://www.beyerdynamic.de/p/mm-1

But that i need to find on my NAS, probably next day :wink:

Hmm, i am not able to upload Files here only Pictures.

My Notch Calibration File i build up on REW.

Measuring Frequencyresponse with Notch aplied and save it as Text File, name it *.cal, thats it.

Than you could load it on Settings, second Page.

I probably need youre E-Mail to send you Files.

The Speaker thing is not an big Deal i can wait for that, i can still use REW, it is made for :wink:

I hope i can do more Test’s with youre Software next day, after 18:00 i guess.

I guess this Software would also work with QA404 any Day ?

Matt (QA) is also already cooking an new Software so may be you need to Join for cooking together :wink:

Can’t wait to get an QA404 after release.

I don’t know anything about a QA404 being released soon. But I don’t think it will be a problem adding support for it to the software.

1 Like