Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!

Sound Card Spectrum Analyzer Features

[Daqarta Spectrum (46K image)]

The above image shows four versions of the spectrum obtained when the Generator output was used to drive a sound card input with a 4000 Hz sine wave via a simple "loopback" connection. This is a measure of the overall performance of the card, since it includes both input and output operation.

The four traces used different windowing and averaging options. They were saved to Juxt Array memory and displayed with no added offset or spacing, to allow direct comparison. The selected trace in the array is shown with full brightness, to indicate that the cursor readouts and labeled Fields refer to this trace only. The other traces have been dimmed with the highlight control. The Juxt Trace Label Field has been set to show the contents of the Field labeled "Average", which is "32TC" for the selected trace.

The selected trace used a Hann window function to reduce spectral leakage, allowing easy resolution of the second harmonic distortion peak at 8000 Hz, though the third harmonic at 12000 is poorly resolved. The spectrum display was smoothed using spectral averaging in Exponential mode with a time constant of 32 frames. This time constant provides comfortable viewing of noisy real-time signals, with only a slightly slowed reponse when the signal changes.

The cursor readouts for the selected trace show second-harmonic distortion 66.8 dB below the fundamental (0.046%). The third harmonic is more than 80 dB down (0.01%), and the background noise is about 100 dB down at most frequencies. The downward tilt of the noise floor above 20 kHz results from the card's anti-aliasing filters.

The "32TC" trace overlays the dimmer, noisy trace labeled "Inst", which used the same Hann window function, but is an instantaneous spectrum with no averaging. It is essentially what each of the traces looked like that were averaged together to get the "32TC" trace.

The upper trace labeled "Raw" used no window function, although it did use the same exponential spectral averaging as the selected trace. Note that the spectral leakage "skirts" have obscured not only the noise floor, but the harmonic distortion peaks as well.

The lowest trace labeled "Wave 512" was obtained using a synchronous waveform average of 512 frames to reduce noise, which took a little over 8 seconds to acquire. The Hann window function was applied to the wave average when displaying its spectrum. Waveform averaging yields a 3 dB noise reduction for every doubling of the number of frames; 512 frames has thus lowered the noise floor by 27 dB, allowing good resolution of harmonic peaks at 8000, 12000, 16000, and 20000 Hz.

The Spectrum button in the toolbar is shown depressed for spectrum display mode. The button is also shown disabled here because there is no corresponding waveform to be shown if it were to be toggled off. That's because the "32TC" selected trace is a spectrum average, indicated by the (also greyed out) Avg Spect at the left end of the main toolbar: Multiple waveforms were used to compute individual spectra that were then combined by averaging, so the waveforms are no longer available. (The Spectrum button would be enabled if the "Inst" or "Wave 512" traces were selected instead.)

The thin button beneath Spectrum toggles the Spectrum Control dialog, shown here at the right of the trace area.

Like the Spectrum button, the Window controls are greyed out because the selected trace is a spectral average. (Windowing is applied to the raw waveform before its spectrum is entered into the average, so it can't be undone after the average.)

The Y-log (power spectrum) button in the Spectrum Control dialog has been activated so the Y axis and readouts are in dB. Range selection is accomplished via PgUp/PgDn keys, or by dragging the Y axis, or via the up/down buttons at the top of the axis.

The FFT spectrum for each channel is computed from 1024 data samples, giving 512 equally-spaced spectrum points over the range from 0 to just under half the sample rate ( Nyquist range). With a 48000 Hz (default) sample rate, the spectrum points are 48000 / 1024 = 46.875 Hz apart, and the spectrum extends from 0 to 511 * 46.875 = 23953 Hz, as shown on the X axis in the above image.

Besides the sample rate, the X axis is also determined by the horizontal expansion ( eXpand), both of which are set in the X-axis Control dialog. You can also change expansion by dragging the X axis, or using the left/right arrow buttons at either end. Alternatively, hitting CTRL+ALT+X will cause the display to expand to the limits set by the solid and dotted cursors. The X-axis toolbar button (or ALT+X ) toggles eXpand off and on.

The Peak button in the Spectrum Control dialog is active, allowing Daqarta to interpolate peaks at the cursor positions to provide much higher resolution (typically 50x or better) than otherwise available from the raw FFT. Here the raw resolution is 46.875 Hz, and the 4000 Hz fundamental falls between the FFT frequencies of 3984.375 and 4031.250 Hz, which would have otherwise resulted in frequency measurement errors of 15.625 or 31.250 Hz.

But the Peak interpolated value (indicated by a leading ^ symbol) is 3999.98695 Hz, an error of only 0.013 Hz... a resolution improvement of 15.625 / 0.013 or 1200 times over the raw FFT. The second harmonic is shown at 8000.30964 Hz instead of 8000, so the 0.31 Hz error means the resolution improvement is still over 50 times.

The Ratio button is also active, which means that the right-most cursor readout which would normally show the difference between cursor frequencies instead shows their ratio... here 2.00007 because the dotted cursor is at 8000 Hz, the second harmonic of the fundamental.

Had the input signal been a variable frequency, such as from an external source, the Track dialog button could have been used to automatically keep the solid cursor over the strongest peak. The dialog includes a Track Threshold control to prevent cursor motion when the signal drops below the noise floor. Track Max and Min Frequencies allow you to restrict the tracking action to a given range. A Fundamental option puts the cursor over the fundamental, even if that is not the largest peak. When Fundamental is active, a Harmonic control allows you to keep the dotted cursor positioned over a selected harmonic of the fundamental.

For continuous spectra like noise sources, the PSD button can be used to provide Power Spectral Density.

The Curves button opens a dialog that allows you to load weighting curves that can be applied to the Y-log spectrum of any channel. Daqarta comes with several standard curves for acoustical measurements, and also allows you to easily create your own custom Mirror curves to compensate for non-flat stimulus signals. This is especially useful for frequency response measurements, so that a flat line will indicate a flat response, even if the driving stimulus is not flat.

The X-log button is not active in the example shown, so that harmonic distortion peaks would be equally spaced. (They are linear multiples of the fundamental.) In X-log mode, octave-type relationships are more apparent. For instance, a noise band from 1000 to 2000 Hz would have the same screen width as one from 4000 to 8000 Hz.

For linear magnitude spectra ( Y-log off) the RMS button can be used to show equivalent energy instead of amplitude.

The Limits button opens a dialog that allows Pro-license or trial users to apply limit curves to the spectrum data displayed in Y-log mode, to allow Pass/Fail testing of transducers or other frequency-sensitive devices or circuits.



Spectrum Analyzer

Signal Generator

(Absolutely FREE!)


Pitch Tracker


DaqMusiq Generator
(Free Music... Forever!)

Engine Simulator

LCR Meter

Remote Operation

DC Measurements

True RMS Voltmeter

Sound Level Meter

Frequency Counter
    Spectral Event

    MHz Frequencies

Data Logger

Waveform Averager


Post-Stimulus Time
Histogram (PSTH)

THD Meter

IMD Meter

Precision Phase Meter

Pulse Meter

Macro System

Multi-Trace Arrays

Trigger Controls


Spectral Peak Track

Spectrum Limit Testing

Direct-to-Disk Recording



Frequency response

Distortion measurement

Speech and music

Microphone calibration

Loudspeaker test

Auditory phenomena

Musical instrument tuning

Animal sound

Evoked potentials

Rotating machinery


Product test

Contact us about
your application!

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
Over 30 Years of Innovative Instrumentation
© Copyright 2007 - 2017 by Interstellar Research
All rights reserved