### The QA40xPlot application consists of 9 different audio tests that use a QA402 or QA403 audio analyzer from QuantAsylum.

What's New See the latest version changes

External Audio How to use external signal generators and what to expect.

The Mathematics Click here for (early) math summary.

The Video Tutorial Click here for the Tutorial

The Changelog Click here for the Changelog

# Tests Summary

Test | Description
--- | ---
Spectrum | Capture the spectrum (V vs F) created by a sine wave. Analyze noise and harmonic distortion.
Intermodulation | Capture the spectrum (V vs F) created by two sine waves. Analyze noise and intermodulation distortion.
Scope | Capture the time signal (V vs mS) created by one or two sine waves. Much like an oscilloscope without the triggering.
THD vs Frequency | Plot distortion components vs frequency. Capture the spectrum created by a sine wave swept at multiple frequencies.
THD vs Amplitude | Plot distortion components vs amplitude. Capture the spectrums created by a sine wave at the test frequency swept at multiple amplitudes.
Response | Plot output level vs frequency. Capture the spectrums created by a sine wave swept at multiple frequencies.
Impedance | Plot the complex impedance of the DUT vs frequency. See below for more information on how to connect the dut.
Gain | Plot the gain and phase of the DUT vs frequency. See below for connection info.
Crosstalk | Measure and plot the interchannel crosstalk by turning left/right signal on/off during the test. See below for connection info.

Later in this help, tests and options are described in more detail.

# Commands

# Configuration at Startup

By default, when you start QA40xPlot, it will look for a file named QADefault.cfg in your Documents folder. If this configuration file is found, it is then loaded at startup. You may also run QA40xPlot with a single argument of the name of the configuration to load at startup. This can be a short name, in which case the app will look in Documents or you may use a full path name.

If there is no QADefault.cfg in Documents and you don't provide an argument with a filename path the program will use internal default values.

If you enable Save on Exit for the session configuration, the current settings will always be saved to QADefault.cfg in Documents and thus loaded at startup.

# Loading and Saving

There are two kinds of load/save within QA40xPlot.

A) At the upper right are a load and a save button that load and save the configuration - all of the QA40xPlot settings.

B) At the lower left are buttons with Get, Load, and Save. These load and save the current test (tab) data and options. See below for more.

# Tab - Get, Load, and Save

Each tab has a Get, a Load and a Save button in the left hand column at the bottom. When saved, the tab settings and plot data are saved to a compressed .plt file (by default named something.plt.zip). This file can be manually opened in Windows and the contents are a JSON text file. It can also, of course, be loaded.

When a saved tab is loaded two things happen. First, the plot data is displayed. Second, the original sweep settings are entered back into the user interface. So, the screen will look exactly as it did when the sweep/test was run. This lets you know exactly what settings you used for the test. It also allows for limited examination of the plot data.

When a saved tab is gotten (Get) the name will show up under the button with an L and R checkbox. By default L is usually clicked on when gotten. Click the L and R to show/hide each channel. Click the color boxes next to the L and R to change the plot line colors. Add more saved tests by clicking the Get button again. Click the garbage can icon to remove a 'gotten' tab. This will not delete the file on-disk.

# Command Buttons

Along the top right of the screen are a few command buttons. If this becomes too many it will turn into a menu.

Button | Description
--- | ---
Help | Pop up this help page.
Photo | Save a screen capture of the entire application (so all options are visible) in a .PNG file. Stop data capture first to ensure the image title bar shows the capture time and date.
Export | When data is available this allows export in FRD or ZMA (text) format. FRD is SPL data while ZMA is impedance data per convention.
Save | Save the current configuration (all options) to a .CFG file. Save the configuration to QADefault.cfg in your computer's Documents folder to have that configuration loaded at startup. In Settings use "Save on Exit" = True to always save the session settings for the next run. This is in JSON format.
Load | Load all options from a JSON-format .CFG file. You may create your own subset CFG to only load a subset of properties.

# Common Options

# Keyboard Accelerators

The left hand user interface entries on every tab are accessible by Alt-key combinations. Press and release the Alt key to see underlines appear on the prompts. Each underlined letter is a keyboard accelerator. So Alt-V, for example, usually lets you edit the voltage entry. Alt-R turns auto-ranging on and off, etc.

# Graph Manipulation

Common to all tests are plots of values. You can change them easily by

- Click a plot and drag the mouse to move the plot center point around.
- Right-click a plot and drag the mouse to zoom in or out in the mouse direction.
- Scroll the mouse wheel in a plot to zoom in or out
- Click a plot axis and drag the mouse to reposition that axis.
- Right-click a plot axis and drag the mouse to zoom in or out that axis.
- Scroll the mouse wheel over a plot axis to zoom that axis in or out
- --
- Click inside the plot to freeze a cursor. Click again to unfreeze.

# Amplitude Definitions

All tests have a choice as to how the QA40x generator voltage is determined.

Setting | Description
--- | ---
Input Voltage | The desired DUT input voltage. This is the QA40x generator output voltage.
Output Voltage | The desired DUT output voltage / QA40x input voltage. This does a low-voltage gain calculation (exactly the same as the autoranging math) first to determine the generator voltage.
Output Power | Use the amplifier load setting (see Settings) to determine output voltage from power and then use gain to calculate the input/generator voltage

# Attenuation Settings

QA40x attenuation is important for test device integrity. QA40xPlot tries very hard to use just enough attenuation for each test. Attenuation is always calculated based on both input channels (left and right) of the QA40x. If you only plan to test one channel we recommend you short the other QA40x input channel, which will guarantee that attenuation math ignores the shorted channel.

The free-running tests: Spectrum, Intermodulation and Scope, have manual or automatic attenuation. The other tests all automatically check gain then automatically determine attenuation to avoid QA40x overload in either channel.

The THD vs Frequency sweep calculates/uses one generator voltage that it then sweeps with. If you select an output amplitude that voltage ensures the maximum output of the sweep is that setting. The Input Voltage setting uses that voltage for the sweep.

The THD vs Amplitude test calculates distortion at each swept amplitude and varies generator voltage accordingly. Attenuation may increase as output voltage increases.

All 3 response tests (Response, Gain, Impedance) use a single generator voltage just like the THD vs Frequency test.

For tests that are sinusoidal (spectrum, thd vs frequency/amplitude) the gain is calculated at the fundamental frequency. For tests over a frequency range the gain is calculated using two frequencies or a chirp range.

# Cursor

All of the tests support a cursor. As you move your mouse in the plot a small box in the lower right shows the nearest data values. Some charts have a visual on-screen point, some don't.

# Settings

# The global Settings tab

There is one tab named "Settings" that shows the various global settings. These include colors, color themes, amplifier load, external gain block, and others. Some of these settings, particularly Theme, may require a restart to show best results.

# Test Descriptions

# Spectrum Test

This test sends a single waveform out from the generator and plots the received frequency spectral data (value vs frequency). For a Sine wave this produces a skinny spike at the sine frequency surrounded by background noise and (usually harmonic) distortion spikes.

## Options

option | description
--- | ---
Use Generator | This lets you easily turn the sine wave on or off.
Attenuation | Manually select the attenuation value or autorange.
| When you click start, autorange will first test at 42 attenuation then adjust to the (almost) least possible
Generator 1 | Select the frequency, signal voltage, and waveform.
| The Set DUT option lets you program an output value rather than just the generator setting The RiaaChirp waveform is a chirp using RIAA preemphasis for testing phono preamps The WaveFile generator option lets you use any .WAV file as the source wave This file is resampled to match your FFT settings and scaled to match the amplitude setting.
Sampling | We recommend 48K or 96K Rate and 64K or 128K Size. 3 or 4 Averages. The larger the FFT size the more accurate low frequency results will be. Faster rates increase the maximum frequency that can be measured (=rate/2).

## Plot Options

option | description
--- | ---
Axis Settings | You may restrict the axis bounds but still can zoom the axis in/out with the mouse
| On selection or typing of a value the window will refit. Selecting dBR adds options for determining the reference value. Click the Pin button to copy the current axis values to the settings.
Summary Data | Select this to show the Summary box in the upper left.
Test Info | This hides/shows a box in the graph upper right with the test options, such as name and plot colors. The name and heading both show up on the plot.
Harmonic Markers | This will automatically mark the harmonics (and fundamental)
Power Markers | This will mark 50Hz or 60Hz power line (and harmonics) peaks. Power line frequency is set in Settings.
% - Data Summary | Swap between percents and uV/dBV on the summary box(es)

# Intermodulation Test

This test performs one of 6 standard intermodulation tests or it allows manual frequency/amplitude selection per generator.

## Options

option | description
--- | ---
Use Generator 1/2 | Lets you quickly turn each frequency on or off.
Attenuation | See the description under spectrum.
Intermod Test | Pick a test and an amplitude (voltage or power).
| For custom, select the two frequencies and amplitudes manually.
Generator | When you have a stock test selected the only option available will be Voltage (or power).
Sampling | See the description under spectrum

## Plot Options

option | description
--- | ---
Axis Settings | You may restrict the axis bounds but still can zoom the axis in/out with the mouse
| On selection or typing of a value the window will refit.
Summary Data | Select this to show the Summary box in the upper left.
Test Info | This hides/shows a box in the graph upper right with the test options, such as name and plot colors. The name and heading both show up on the plot.
Intermod Markers | This will mark the standard intermodulation peaks.
Power Markers | This will check 50Hz and 60Hz peaks, then mark the ones that seem like your power peaks.
% - Data Summary | Swap between percents and uV/dBV

# Scope Test

This test acts like an Oscilloscope and controls 1 or 2 sine generators.

## Options

option | description
--- | ---
Use Generator 1/2 | Lets you quickly turn each frequency on or off.
Attenuation | See the description under spectrum.
Generator | Select each generator frequency and voltage.
Sampling | See the description under spectrum. Much of this sampling is only for the summary THD display.

## Plot Options

option | description
--- | ---
Axis Settings | You may restrict the axis bounds but still can zoom the axis in/out with the mouse
| On selection or typing of a value the window will refit.
Summary Data | Select this to show the Summary box in the upper left.
Test Info | This hides/shows a box in the graph upper right with the test options, such as name and plot colors. The name and heading both show up on the plot.

# THD vs Frequency Test

This test does a sweep from start to end frequency. At each frequency of the sweep it tests the harmonic distortion products and plots the resultant set of 5-8 line segments.

## Options

option | description
--- | ---
Generator | See Spectrum
Sweep | Define the frequencies to be swept. The end frequency should be less than SampleRate/2.
Sampling | See Spectrum

## Plot Options

option | description
--- | ---
Axis Settings | You may restrict the axis bounds but still can zoom the axis in/out with the mouse
Graph Data | Individually turn on/off any of the harmonics
| High order harmonics may be nonsense at high frequencies
Test Info | This hides/shows a box in the graph upper right with the test options, such as name and plot colors. The name and heading both show up on the plot.

# THD vs Amplitude Test

This test does a sweep from start to end voltage or power. At each amplitude it tests the harmonic distortion products and plots the resultant set of 5-8 line segments.

## Options

option | description
--- | ---
Generator | See Spectrum
Sweep | Define the amplitude range to be swept. At each test point (amplitude level) the attenuation is adjusted to as low as possible.
Sampling | See Spectrum

## Plot Options

option | description
--- | ---
Axis Settings | You may restrict the axis bounds but still can zoom the axis in/out with the mouse
Graph Data | Individually turn on/off any of the harmonics
| High order harmonics may be nonsense at high frequencies
Test Info | This hides/shows a box in the graph upper right with the test options, such as name and plot colors. The name and heading both show up on the plot.

# Response Test

This is a conventional frequency response test. The output is in dBV and can cover both channels or just one.

## Options

- Use Chirp - turn this on to use a chirp signal for the sweep. This is a more efficient way to sweep a frequency range. It suffers from reduced accuracy but gains almost continuous frequency coverage in a single packet.
- RIAA Premphasis - both channels of output have RIAA preemphasis applied, for use as an input signal to phono preamps during testing. The (max) signal level at highest frequency is approximately the selected voltage. The signal level is about 40-45 dB less at low frequencies.

# Impedance Test

This does a frequency sweep and at each point calculates the effective impedance of the DUT. Data is stored as a complex value. The impedance is calculated by using a known resistor in a simple series circuit with the DUT. The reference signal goes to the right channel and the split signal goes to the left channel.

## Options

- Use Chirp - turn this on to use a chirp signal for the sweep. This is a more efficient way to sweep a frequency range. It suffers from slightly reduced accuracy but gains almost continuous frequency coverage in a single packet.

### Connections are:

Assume the dut is two terminals, like a speaker connection. Black and Red.

- QA40x Left output to reference resistor terminal B and QA40x Right Input
- DUT Red/Out terminal to reference resistor terminal A and QA40x Left Input
- DUT Black/Gnd terminal to ground

# Gain Test

This does a traditional Bode Plot of Gain and Phase vs frequency. Here the right channel is used as a reference channel.

## Options

- Use Chirp - see above.
- RIAA Premphasis - the left channel output (only) has RIAA preemphasis applied, for use as an input signal to phono preamps during testing. The (max) signal level at 40KHz is approximately the selected voltage. The signal level is approximately 40-45 dB less at low frequencies.

### Connections are:

- the QA40x left or right channel output to the QA40x right channel input - left is mildly preferred
- the QA40x left channel output to the DUT input
- the DUT output to the QA40x left channel input

# Crosstalk Test

This does a traditional crosstalk analysis of the two input channels vs frequency. Connect the left and right channels through the stereo device under test.

QA40xPlot turns the left and right channels on/off during the test.

## Options

- Use Chirp - this will do the crosstalk via chirp. Chirp accuracy at low levels of crosstalk (below 80dB) is iffy.

### Connections are:

- the QA40x left channel output to the DUT left input.
- the QA40x right channel output to the DUT right input
- the DUT left output to the QA40x left channel input.
- the DUT right output to the QA40x right channel input.

Cables may be balanced or unbalanced but it's best if left and right are the same type.