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!

Frequency Sweep Stairs

Macros: SweepStairs, SweepAutoStep

There are two parts to this control: The value entry window plus a small button labeled 'Stairs' to the left of it.

If the value is set to anything other than zero, the basic Sweep operation is changed. Instead of smoothly sweeping from Sweep Start to Sweep End during a time interval set by Sweep Length, the frequency moves in the specified number of Stair steps over the same frequency range. At each step, the frequency stays constant for a duration set by Sweep Length, then moves to the next step.

Note that the number of frequencies is one more than the number of Stairs. For example, if you set Stairs to 1, the output goes from Start to End in one step, so there are only those two frequencies. The total duration of the staircase is thus always (Stairs + 1) times Length.

Given specified Start and End frequencies, you find the Stairs value by subtracting End - Start and dividing by the desired step size. For example, if you want to step from 1 kHz to 20 kHz in steps of 500 Hz, you'd set Stairs to:

(20000 - 1000) / 500 = 19000 / 500 = 38.

When you are using Stairs mode, the Sweep Sync button syncs the display to the start of each step, instead of to the start of the overall sweep.

One very useful application for Sweep Stairs is precision frequency response measurements. With a normal frequency sweep you need to use a Flat-Top Spectrum Window function to avoid erroneous response irregularities due to spectral leakage alone.

But with Sweep Stairs you can arrange to step through all the frequencies in the displayed spectrum, generating only those that fall on exact spectral lines. In that case, there is no spectral leakage so no window function is needed.

To do this, set the Sweep Start and End frequencies using the Step Lines option for frequency entry mode. Since these will both fall on exact spectral lines, there will also be an exact integer number of spectral-line-width steps between them. The spectral line width is the sample rate divided by 1024, so you could determine the number of Stairs by dividing that into the End - Start frequency difference.

But there is a much simpler way: Click the Stairs button to the left of the value entry control. This does all the math for you and enters the exact number of steps. For this trick to work properly, the Step Lines option must be in effect and set to 1.00 line, and must have been used to set the Start and End frequencies.

For stepped frequency response measurements, Sweep Sync should be set. This will start each display on a frequency step instead of only at the Start frequency. Sweep Length should be set to 4096 or 8192 samples or so, to insure that the step is long enough to get the 1024 samples needed for the spectrum, plus some extra to allow for display updates so the next sync falls on the next step. (Faster CPUs can use values closer to 1024.)

Use the Spectrum Averager set to Peak mode, and set the averager Frames Request to 1 for continuous operation. When you click on Average (or use ALT+A) the stepped sweep will run continuously and build up a complete frequency response. Note that if you set Sweep Length too short, some spectral lines might be skipped if your CPU is not fast enough. In that case you can wait to see if they are picked up on the next overall frequency sweep, or set Length higher and start again.

When the response is complete to your satisfaction, hit Pause (ALT+P) to freeze the display for further measurement or saving to a file. Don't toggle Average off until you are ready to discard the displayed data.

In Linear sweep mode, the Stairs button divides the End - Start frequency difference by the current frequency step setting. So, if for some reason you wanted the sweep to skip every other spectral line, you could set the Lines frequency entry step to 2.00 lines. Or, if you wanted a fixed number of hertz between steps, use the Step Hz or Step Direct entry mode and set their step sizes as needed. (Be sure to set Start and End using the same mode, so the result of the division will be an integer.)

In Exponential sweep mode, the Stairs button sets a value such that the total sweep range will be traversed in exponential steps according to the current Octaves or Cents setting. The Octaves setting can be made a fraction of an octave, such as 1/3 (0.3333) or 1/12 (0.0833) to test at standard spacings. With Cents set to 100.00, the stepped sweep can be traversed in standard musical semitones.

Caution: If the current sweep mode is Linear but the frequency step mode is not Direct, Hertz, or Lines, the Stairs button will default to using Lines steps. If the sweep mode is Exponential and the frequency step mode is not Octave or Cents, the Stairs control will default to using Octave steps.

For example, with Octave mode set to 1.00 and with Start at 1000 and End at 8000 Hz, the Stairs button will set a value of 3. The resulting steps will be 1000, 2000, 4000, and 8000, which is an octave (doubling) per step, as specified. If End is set to 16000, hitting Stairs will give 4.

However, if End is set anywhere between 8000 and 16000, there will still be only 3 steps, stretched as needed (relative to 1.00 octave) to exactly hit the Start and End frequencies. Likewise, with End between 16000 and 32000 the Stairs button will give 4 steps, stretched to fit.

Macro Notes:

L.1.SweepStairs=10 directly sets Left Stream 1 Sweep Stairs to 10. Alternatively, L.1.SweepStairs=>1 increments the current value, and L.1.SweepStairs=-1 decrements it.

L.1.SweepAutoStep= (no value needed; ignored if given) is the same as clicking the Stairs button. It sets the Stairs value to traverse the Sweep frequency range in steps determined by the frequency entry mode.

See also Frequency Sweep, Waveform Stream Controls


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