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!

Input Line Levels

Macros: InVolL, InVolR, Atten_dB?, Atten_G?

When an input line is selected, the text above this control changes to the line name (as shown on the corresponding Input Line Select button above it), and the value changes to the current Level setting for that line. All other lines are automatically deselected and muted to prevent spurious input signals. Their Level settings are stored, though, so if you change selections the prior level is restored.

The default Level units are 'steps'. The sound card has built-in hardware attenuators that adjust the input sensitivity prior to any analog-to-digital conversion. A typical card may have 16 different attenuation steps, but Windows reports a much larger number, typically 192 on XP. Most of those steps don't result in any actual change in sensitivity, but give mixer slider controls more apparent resolution.

Daqarta calls the most sensitive step 0 and assigns increasingly-negative integers to lower steps. If there are 192 steps, for example, Daqarta will number them 0 to -191. You don't need to enter the negative sign, since Daqarta treats all non-zero step entries as negative.

If the line has been calibrated and the dB button is active, then the control will read directly in dB. If you enter a dB value, it will select the closest setting that the attenuator can provide. All Input attenuations are in dB relative to maximum sensitivity, so all values are negative except 0. Again, there is no need to enter a sign.

Also, scrolling the calibrated control (with dB active) results in selection of only real attenuator steps, so the dB changes on every scroll step... all the dummy steps are bypassed.

There is a fundamental change in the behavior of the Level settings on a calibrated system, compared to an uncalibrated system. Before calibration, Daqarta has no information about input sensitivity at any setting, so Level changes have no effect on Y-axis or cursor readout values.

But after calibration, Daqarta knows how much attenuation is provided by each Level step. Suppose when a given line is set to the 0 step, that a +/-1 volt input signal just reaches full-scale on the ADC. With no display magnification, it will fill the display area vertically. The Y-axis labels will be set to show +1 volt at the top and -1 volt at the bottom.

Now suppose when we move the Level to the next-lower (real) step, the input signal is attenuated by 3 dB. The signal now only reaches 70.7% of the former range, both on the ADC and the display. But it's still the same signal at the input, so Daqarta changes the Y-axis labels to +/-1.4 volts. The signal is still shown as +/-1 volt, but it no longer fills the range.

As the Level is set to more negative ranges, the signal is attenuated more and so appears smaller and smaller. The Y-axis labels correspondingly extend to larger and larger full-scale values to keep the proper scaling. For example, an attenuation of 60 dB represents a reduction of the signal by a factor of 1000, so the original +/-1 volt full-scale range becomes +/-1000 volts.

Daqarta labels the Y axis with the full-scale voltage, no matter how large, but that doesn't mean you can actually apply such voltages to the inputs. Sound cards can typically tolerate 12 or 15 volts or so without damage, but this value is not always known for each card. It's best to play it safe and limit inputs to the several-volt range at maximum.

On many attenuators, the lowest step is essentially "off" and Daqarta will report that as 'Off' when the dB button is active. If you want to set the control to Off, just enter a large value. It must be greater than the attenuation of the next-higher step. '1k' (1000) is the quickest to enter.

In the Off state, the attenuation is supposed to be "infinite". Daqarta assumes it is 120 dB, which is a reasonable value for a decent sound card. That represents a factor of one million, so the Y axis will show +/-1 MV. (That's one Mega volt!)

Macro Notes:

InVolL=3 sets the Left Input Line Level to step -3 if the Input dB button is off, or to the setting that gives the attenuation nearest to -3 dB if it is on. InVolR operates similarly for the Right Input.

Use an In_dB command before InVolL or InVolR to be sure the dB button is in the desired state.

Atten_dB?0 is a read-only variable that returns the total attenuation, in dB, for channel 0. You may use channels 0-3 here, given as a single digit; variables are not allowed:

    0 = Left In
    1 = Right In
    2 = Left Out
    3 = Right Out

The return value is always given in dB, regardless of the state of the dB button.

For input channels 0 or 1 the return value takes into account whether your sound card has separate input lines and if so which one is selected, as well as whether you have separate attenuation or gain due to Input Line or Master levels.

(The return value for output channels 2 or 3 takes both Master and Wave volume settings into account, if these controls are available on your system.)

If you have not yet performed an auto-calibration, the return value will always be 0 dB.

Atten_G?0 is similar to the above but instead of dB it returns the attenuation as a linear gain factor. For example, Atten_G?0 would return 0.5000 where Atten_dB?0 returns 6.02 dB, or 1.000 instead of 0.00 dB.

See Macro Data Unit Conversions for a discussion of how to use Atten_G? to obtain actual volts or User Units from ADC or DAC values returned by certain macro math and macro array functions.

See also Input 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