Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
The following is from the Daqarta Help system:



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!

Sample Rate Adjust

Controls: X-Axis Dialog >> Rate Adjust
Macro: SmplRate

This control allows direct entry of sample rate. This is to allow operation with sound cards that support higher or lower sample rates than provided in the above button selections, or to allow other arbitrary rates that the card may support.

Some sound cards appear to support different sample rates, but actually have a fixed hardware rate, typically 48000 hertz. (See Sample Rate Select for a discussion of how to enable higher rates if your card supports them.) Fixed-rate cards achieve the effect of higher or lower rates by means of sample rate conversion (SRC).

Such conversion can't be monitored or disabled by software. However, sample rate conversion may introduce certain low-level distortions to the signal. If you know that your card uses a certain hardware rate, you may wish to set that as the sample rate; the assumption is that this will avoid conversion. Or, even if conversion is used anyway, there should be no or minimal distortion at unity conversion factor.

A much bigger issue with these single-rate cards is full-duplex operation. Cards that use this approach may have slight differences in their actual input and output sample rates except at specific values like 48000 Hz. If you are creating a stimulus signal with the Generator, the Input response to that signal will appear to drift over time. This makes the Trigger Gen Sync option useless. It also means that the input and output sample alignment for long DDisk recordings will drift as well.

To determine which rates to avoid, the Auto-Calibrate procedure has a Duplex Delay function that tests the drift at the current rate (default 48000). If your card doesn't give zero drift at 48000, try 44100. If you have reason to believe that some other rate may be better, set that rate before the calibration.

You can check the results of a prior Duplex Delay calibration with CTRL+SHIFT+D.

Wherever possible, you should select rates with zero drift when running with both Generator and Input active. (There is no problem with non-duplex operation.) If you can't avoid drift, you must avoid Gen Sync... see Full-Duplex Techniques for notes on connecting an output to an input to get reliable triggering. There is no easy work-around for DDisk recordings when sample rates drift.

Another issue with cards that use sample rate conversion is that they may appear to accept a specified rate, when in fact they actually set a somewhat different rate which is not reported to Daqarta (and can't be determined by software alone). So the X-axis calibration for time and frequency may be in error by an unknown amount. This may be particularly noticeable at very low sample rates (under 11025).

At very low rates, it appears that many of these cards may only allow 48000 / N, where N is an integer. Unless you can verify the actual sample rate (see below), you should stick to these integer sub-multiple low frequencies. For example, instead of setting 2500 Hz, set 2400 (which is 48000/20).

Even cards that don't use sample rate conversion may set rates somewhat different than specified, since cards typically generate rates only as multiples of some base frequency. This base is usually a submultiple of 44100 or 48000 Hz, depending on the card. For example, most old ISA-bus Sound Blasters used 44100 / 248 as a base, with the result that actual sample rates were multiples of 177.82 Hz. Unfortunately, Windows assumes all rates are exact integers, and provides no method to set a fractional rate or to read the actual rate from the sound card.

If you want to check the accuracy of an arbitrary sample rate, you can use the Frequency Counter option to measure the frequency of a known-accurate external source. The ratio of the measured frequency to the known frequency gives the correction factor that must be applied to the indicated sample rate. For example, if a 1000 Hz reference frequency is measured as 1010 Hz by Daqarta, then the sample rate is actually slower than indicated. Multiply the indicated sample rate by 1010/1000 to get the true rate.

If a calibrated frequency source is not available, but you have access to an external frequency counter, you can do the reverse: Set the Daqarta Generator to produce a signal that you can measure with the external counter. For example, if Daqarta produces a signal specified as 1000 Hz, but the external counter measures it at 1010 Hz, then the sample rate is faster than indicated and must be multiplied by 1000/1010 to get the true rate.

Note that you may want to use square wave signals for optimum triggering of the frequency counter. If the counter has a Period mode, you can use that to get higher resolution in a reasonable time than with standard Frequency mode, which requires 10 seconds to resolve to 0.1 Hz. Just take the reciprocal of the period to find frequency.

This only calibrates the card's output sample rate. Usually the input rate will be nearly (if not exactly) the same, but once the output rate is calibrated you can use the Generator as the signal source to calibrate the input.

Note that if you attempt to set a sample rate that the card rejects, Daqarta will revert to the previous setting. This means that if you are trying to find the lowest or highest sample rate that the card supports, you can't just specify a very low or high value and expect that Daqarta will set the desired limit frequency. (The Windows interface to the sound card does not make these limit values available to Daqarta; it only reports whether a given value is accepted.)

Sample rate controls are disabled during averages and when data files are open.

Caution: Changing Sample Rate causes all Generator frequencies (including modulation rates) to be updated using the current Frequency Entry Step Mode. For Step Modes that use quantization (those other than Direct), this may cause unexpected results. Always set Sample Rate before setting Generator frequencies.

Macro Notes:

SmplRate=48000 sets the Sample Rate to 48000 samples per second.

SmplRate#M=24000 sets the Sample Rate to 24000, but only for Pitch-to-MIDI operation. This forces eXpand Min an octave lower to allow display of lower MIDI notes. The prior sample rate is automatically restored when Pitch-to-MIDI is toggled off. See the Music_from_Anything macro mini-app for an example, in its _Music_Proc subroutine.

S=SmplRate sets User Variable S to the Sample Rate.

S=SmplRate?X sets S to the effective sample rate, which is the actual rate divided by the Decimate Factor if Decimate is active.

See also X-Axis Control Dialog


Questions? Comments? Contact us!

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