WaveLens Docs
User Guide

wavgen

A command-line tool for generating synthetic WAV test signals — tones, sweeps, amplitude staircases, and silence — for audio codec Audio QA and audio post-processing algorithm testing.

wavgen 0.9.0-dev · single self-contained executable · no external runtime dependencies

Overview

wavgen produces the reference/input WAV files used to test audio codecs and audio post-processing algorithms (equalizers, virtualizers, dynamics processors, and similar signal chains). It generates precise, repeatable synthetic signals — pure tones, multi-tone stacks, frequency sweeps, amplitude staircases, broadband noise, and band-limited non-sinusoidal waveforms — at a specified sample rate, bit depth, and duration, optionally riding on a DC offset (see DC offset), and can optionally wrap that content with a sync tone (see Sync tone wrapping) to produce a complete, ready-to-run test file in one step.

It writes standard, uncompressed PCM WAV files. It does not analyze, compare, or score audio — for that, see the main wavelens analysis tool.

Requirements

  • A valid, active WaveLens license file (see License below)
  • Output sample rate between 32,000 Hz and 96,000 Hz (inclusive)
  • Output bit depth of 16-bit or 24-bit PCM

License

wavgen requires an active WaveLens license to run. There are three ways to point it at your license file, checked in this order — the first one that's set wins.

1. Explicit path with --license

Always takes priority over everything else — useful for testing a different license, or when the license lives somewhere else entirely:

# explicit --license overrides both the env var and the next-to-executable default
wavgen --license /path/to/wavelens.lic --mode tone --tone 1000:-20 \
    --samplerate 48000 --bitdepth 24 --duration 5 -o calibration_1khz.wav

2. WAVELENS_LICENSE_FILE environment variable

Set it once and every wavgen invocation picks it up — no flag needed on each command. Useful for scripts, CI pipelines, or any workflow where you don't want to repeat --license everywhere:

# bash / zsh
export WAVELENS_LICENSE_FILE=/path/to/wavelens.lic
wavgen --mode tone --tone 1000:-20 \
    --samplerate 48000 --bitdepth 24 --duration 5 -o calibration_1khz.wav

3. Zero configuration — no flag, no env var

Place a file named exactly wavelens.lic in the same folder as the wavgen executable. If neither of the above is set, every invocation picks this up automatically:

# wavelens.lic sits next to wavgen(.exe) — no flag or env var needed
wavgen --mode tone --tone 1000:-20 \
    --samplerate 48000 --bitdepth 24 --duration 5 -o calibration_1khz.wav

If none of the three resolve to a valid license, or the license is invalid or expired, wavgen refuses to generate output and prints the reason to the terminal. If your license is nearing its expiry date, wavgen still runs normally but prints a reminder.

i

Don't have a license file, or need a renewal? Contact your WaveLens distributor or administrator.

Quick start

Generate a 5-second, 1kHz calibration tone at −20dBFS, 48kHz, 24-bit. This assumes a wavelens.lic is already sitting next to the wavgen executable, so no --license flag is needed:

wavgen --mode tone --tone 1000:-20 \
    --samplerate 48000 --bitdepth 24 --duration 5 -o calibration_1khz.wav
# output:
wrote calibration_1khz.wav (48000 Hz, 24-bit, 1 ch, 5.000s, 240000 frames)

Command syntax

Every invocation follows the same general shape: an optional license path, a mode, that mode's own parameters, and a set of options shared by every mode.

wavgen [--license <file.lic>] --mode <mode> [mode-specific options]
       --samplerate <Hz> --bitdepth <16|24> --duration <seconds>
       [--channels <1|2>] [--synctone] -o <output.wav>

Options can appear in any order. Every option takes exactly one value, except --synctone, which is a standalone on/off switch. --license is bracketed above because it's optional — see License.

Global options

These apply to every mode.

OptionRequiredDescription
--license <file>optionalPath to your WaveLens license file. If omitted, wavgen checks the WAVELENS_LICENSE_FILE environment variable, then falls back to wavelens.lic next to its own executable. See License.
--mode <mode>requiredOne of tone, linear-sweep, log-sweep, step-sweep, step-seq, silence, noise, square, sawtooth.
--samplerate <Hz>requiredOutput sample rate. Must be between 32,000 and 96,000 Hz.
--bitdepth <16|24>requiredOutput bit depth, in bits per sample.
--duration <sec>requiredOutput length in seconds. Must be greater than 0. Fractional values are allowed (e.g. 2.5).
--channels <1|2>optional1 (mono, default) or 2 (stereo). Stereo output duplicates the generated signal identically onto both channels — it does not generate independent left/right content. See Stereo output.
-o <file>requiredOutput WAV file path. Any existing file at that path is overwritten.
--synctoneoptionalNo value. Wraps the generated content with a sync tone and silence guards. See Sync tone wrapping.
--invertoptionalNo value. Flips the sign of every generated sample (phase inversion), before --dc-offset and before any --synctone wrapping. Works with any mode. See Phase inversion.
--dc-offset <fraction>optionalAdds a constant DC bias to the generated content, after --invert and before any --synctone wrapping. Linear fraction of full scale in [-1.0, 1.0] (e.g. 0.1 = 10%FS) — not dBFS. Works with any mode. See DC offset.

Generation modes

Nine modes are available. Each is described below with its own required options and a worked example.

--mode tonesingle tone, or multiple simultaneous tones summed together

Generates one or more sine tones and sums them into a single signal. Pass --tone once per tone.

OptionDescription
--tone FREQ:AMPDB[:inv]Adds one tone. FREQ in Hz, AMPDB in dBFS. Append :inv to invert the tone's polarity. Repeatable — pass multiple --tone options for multi-tone content.

Single tone example — 1kHz at −6dBFS. This one passes --license explicitly:

wavgen --license /path/to/wavelens.lic --mode tone --tone 1000:-6 \
    --samplerate 48000 --bitdepth 24 --duration 10 -o tone_1k.wav

Multi-tone example — three simultaneous tones for a spectral-response test. This one omits --license, relying on a wavelens.lic placed next to the executable (see License):

wavgen --mode tone \
    --tone 500:-12 --tone 2000:-12 --tone 8000:-18 \
    --samplerate 48000 --bitdepth 24 --duration 10 -o multitone.wav
!

If the combined peak of a multi-tone stack could exceed 0dBFS, wavgen prints a warning but still writes the file. Check the output for clipping and lower individual tone amplitudes if needed.

--mode linear-sweepfrequency sweep, constant Hz/second

Sweeps from a start frequency/amplitude to an end frequency/amplitude at a constant rate of change in Hz. Frequency and amplitude are phase-continuous and click-free throughout.

OptionDescription
--start FREQ:AMPDBStarting frequency (Hz) and amplitude (dBFS).
--end FREQ:AMPDBEnding frequency (Hz) and amplitude (dBFS).

Example — full-range linear sweep, 20Hz to 20kHz over 5 seconds, with an explicit --license path:

wavgen --license /path/to/wavelens.lic --mode linear-sweep \
    --start 20:-6 --end 20000:-6 \
    --samplerate 48000 --bitdepth 24 --duration 5 -o sweep_linear.wav
--mode log-sweepfrequency sweep, constant octaves/second (logarithmic)

Same shape as linear-sweep, but the frequency progresses exponentially rather than linearly — it spends proportionally more time in lower frequencies, matching how frequency response is usually plotted and measured. Both start and end frequency must be greater than 0Hz.

OptionDescription
--start FREQ:AMPDBStarting frequency (Hz, > 0) and amplitude (dBFS).
--end FREQ:AMPDBEnding frequency (Hz, > 0) and amplitude (dBFS).

Example — full-range log sweep, 20Hz to 20kHz over 5 seconds. No --license here either — same next-to-executable lookup as the multi-tone example above:

wavgen --mode log-sweep \
    --start 20:-6 --end 20000:-6 \
    --samplerate 48000 --bitdepth 24 --duration 5 -o sweep_log.wav
--mode step-sweepone fixed frequency, amplitude stepped through discrete levels

Holds a single frequency for the whole file, but steps its amplitude down (or up) by a fixed dB amount at a fixed time interval — a staircase, not a smooth ramp. Useful for amplitude-linearity testing.

OptionDescription
--freq HZThe fixed tone frequency.
--start-amp AMPDBStarting amplitude, in dBFS.
--step STEPDBAmount to change the amplitude by at each step, in dB. Use a negative value to step down.
--step-duration SECHow long each step is held before moving to the next.

Example — 1kHz tone starting at 0dBFS, stepping down 6dB every second, for 5 steps, with an explicit --license path:

wavgen --license /path/to/wavelens.lic --mode step-sweep \
    --freq 1000 --start-amp 0 --step -6 --step-duration 1 \
    --samplerate 48000 --bitdepth 24 --duration 5 -o amplitude_steps.wav

This produces five 1-second segments at 0, −6, −12, −18, and −24 dBFS.

--mode step-seqone fixed frequency, amplitude jumping between arbitrary segments

Like step-sweep, but not constrained to a uniform step size or step duration — each segment is an independent AMPDB:DURATION pair, and the amplitude jumps instantly (not ramped) between them. Phase stays continuous across the whole file, so only the level changes at each boundary. This is the mode to reach for when you need a sudden, single level change — e.g. measuring a compressor's attack or release time — rather than a repeating staircase.

OptionDescription
--freq HZThe fixed tone frequency.
--segment AMPDB:DURSECOne segment: amplitude in dBFS, then duration in seconds. Repeat for each segment, in order.

No --duration flag — the file's total length is the sum of the segment durations, so it can't drift out of sync with what you actually asked for.

Example — a compressor attack-time probe: 0.5s at −40dBFS (below threshold), then an instant jump to 1.0s at 0dBFS (well above it):

wavgen --mode step-seq --freq 1000 \
    --segment -40:0.5 --segment 0:1.0 \
    --samplerate 48000 --bitdepth 24 --channels 2 -o attack_burst.wav
--mode silencedigital silence

Generates a file of pure digital zero. Takes no mode-specific options — only the global ones. This example uses the next-to-executable license lookup (no --license flag):

wavgen --mode silence \
    --samplerate 48000 --bitdepth 16 --duration 2 -o silence.wav
--mode noisebroadband noise, white or pink

Generates white (flat-spectrum) or pink (1/f, roughly −3dB/octave) broadband noise. Level is specified in RMS dBFS, not peak — the standard convention for describing noise level, and the same convention Audio Precision's own generator uses for non-sine waveforms, since noise has no fixed peak-to-RMS ratio the way a tone does. White noise uses a Gaussian (not uniform) distribution for a realistic crest factor; pink noise is white noise passed through a standard 1/f filter.

OptionDescription
--color white|pinkNoise color.
--level RMSDBFSTarget level in RMS dBFS. Not peak — see above.
--seed NOptional, defaults to 1. Same seed and parameters always produce byte-identical output — useful for a stable, repeatable test fixture rather than a fresh random file every run.

Example — pink noise at −20dBFS RMS, a typical noise-floor calibration level:

wavgen --mode noise --color pink --level -20 --seed 42 \
    --samplerate 48000 --bitdepth 24 --duration 10 -o pink_noise.wav
i

White noise's higher crest factor (peak well above its RMS level) is expected and correct — it's a property of Gaussian-distributed noise, not a bug. Don't compare its peak against a tone's peak-dBFS convention; compare RMS to RMS.

--mode squareband-limited square wave (odd harmonics only)

Generates a square wave via additive harmonic synthesis, summing only the harmonics that fit below Nyquist — not a naive sign(sin(...)) generator, which would alias at any real sample rate. This matters specifically because square/sawtooth content exists to stress-test a device's aliasing and anti-aliasing behavior; a self-aliasing generator would make that test ambiguous. Odd harmonics only (1st, 3rd, 5th, ...), each at 1/k amplitude of the fundamental.

OptionDescription
--freq HZFundamental frequency.
--amp AMPDBTarget peak level in dBFS — same convention as tone, unlike noise's RMS convention above.

Example — 1kHz band-limited square wave at −6dBFS peak:

wavgen --mode square --freq 1000 --amp -6 \
    --samplerate 48000 --bitdepth 24 --duration 5 -o square_1khz.wav
--mode sawtoothband-limited sawtooth wave (all harmonics)

Same band-limited additive-synthesis approach as square, but with every harmonic (odd and even), each at 1/k amplitude — the richest harmonic content of any mode wavgen offers, and the strongest available aliasing/high-frequency-response stress test.

OptionDescription
--freq HZFundamental frequency.
--amp AMPDBTarget peak level in dBFS.

Example — 1kHz band-limited sawtooth wave at −6dBFS peak:

wavgen --mode sawtooth --freq 1000 --amp -6 \
    --samplerate 48000 --bitdepth 24 --duration 5 -o sawtooth_1khz.wav

Stereo output

Every mode above defaults to mono. Pass --channels 2 to get a stereo file instead — the generated signal is duplicated identically onto both the left and right channels (dual-mono), not two independently-generated channels.

Works with any mode — tones, both sweep types, step-sweep, and silence:

# same dual-tone as the multi-tone example, now in stereo
wavgen --license /path/to/wavelens.lic --mode tone \
    --tone 500:-12 --tone 2000:-12 --channels 2 \
    --samplerate 48000 --bitdepth 24 --duration 5 -o dual_tone_stereo.wav
# output:
wrote dual_tone_stereo.wav (48000 Hz, 24-bit, 2 ch, 5.000s, 240000 frames)
i

If you need genuinely independent left/right content (a different signal per channel, not a duplicate), that's not something wavgen does in one step today — generate two separate mono files and combine them with wavchan pack. See the FAQ below. If the two channels only need to be phase-inverted copies of each other (a standard out-of-phase stereo test), see Phase inversion — one flag, no need for a third-party tool.

Phase inversion

Pass --invert alongside any mode to flip the sign of every generated sample — a standard construct for testing phase-cancellation, mid/side processing, and multiband crossover artifacts. It's boolean, no value needed, and works with every mode (tones, both sweep types, step-sweep, step-seq, noise, square, sawtooth).

Since --channels 2 duplicates one signal onto both channels (see Stereo output above), --invert can't give you a plain left channel and an inverted right channel in a single call — --channels 2 --invert inverts both channels identically. To build a genuine out-of-phase stereo pair, generate the same content twice (mono), inverting only the second call, then combine with wavchan pack:

# a 20Hz-20kHz sweep, in-phase on L and phase-inverted on R
wavgen --mode log-sweep --start 20:0 --end 20000:0 \
    --samplerate 48000 --bitdepth 24 --duration 30 -o left.wav

wavgen --mode log-sweep --start 20:0 --end 20000:0 \
    --samplerate 48000 --bitdepth 24 --duration 30 --invert -o right.wav

wavchan pack --segment L:left.wav --segment R:right.wav -o out_of_phase_sweep.wav
i

--invert is not the same as a per-tone --tone FREQ:AMPDB:inv — that flips one tone relative to the others within a single --mode tone call (see tone), useful for cancellation testing inside one channel's own spectrum. --invert flips the entire generated file, any mode, and the two flags aren't mutually exclusive — you can pass both in the same call if you need both effects at once.

i

--invert always runs before --dc-offset, so a DC bias you specify keeps its literal sign regardless of whether --invert is also present.

DC offset

Pass --dc-offset <fraction> alongside any mode to add a constant DC bias to the generated content — useful for testing DC-blocking/leakage behavior in filters, compressors, and other non-linear post-processing chains. It's a linear fraction of full scale in [-1.0, 1.0] (e.g. 0.1 = 10%FS), not dBFS — a fixed, non-oscillating offset doesn't fit dB's ratio framing the way every mode's own amplitude does.

Combine it with --mode silence for a pure DC stimulus, or with any other mode for "a signal riding on a bias":

# pure DC at 10% of full scale
wavgen --mode silence --dc-offset 0.1 \
    --samplerate 48000 --bitdepth 24 --duration 5 -o dc_pure.wav

# a 1kHz tone riding on the same 10%FS DC bias
wavgen --mode tone --tone 1000:-20 --dc-offset 0.1 \
    --samplerate 48000 --bitdepth 24 --duration 5 -o dc_tone.wav
i

The offset applies to your content only — it never shifts a --synctone burst or its silence guards, so sync-tone detection on the resulting file isn't affected by whatever --dc-offset you chose.

Sync tone wrapping

Every generation mode above produces bare content by default. Pass --synctone to additionally wrap that content with a sync tone and silence guards on both sides — the structure a full Audio QA test file needs so it can be located and trimmed automatically later.

With --synctone, the output file becomes:

[1.0s silence] [leading tone] [1.0s silence] [your content] [1.0s silence] [trailing tone] [1.0s silence]

The sync tone itself is a short, distinctive swept "boing" — four brief frequency sweeps in a row, each covering a slightly different range, separated by tiny silences. It's designed to be easy to detect reliably and to survive typical audio processing without needing you to configure anything.

Usage

--synctone takes no value — just add it to any command. Everything else about the command (mode, samplerate, bitdepth, duration, channels) works exactly the same; --duration still refers to the length of your content, not the total file length (which will be longer once the sync tone and silence are added).

# same 1kHz tone as the Quick Start example, now sync-tone wrapped
wavgen --mode tone --tone 1000:-20 --synctone \
    --samplerate 48000 --bitdepth 24 --duration 5 -o calibration_1khz_synctone.wav
# output — note the total length (10.5s) is longer than the 5s of requested content:
wrote calibration_1khz_synctone.wav (48000 Hz, 24-bit, 1 ch, 10.500s, 504000 frames, sync-tone wrapped)
i

The sync tone's own parameters (frequency ranges, repeat count, amplitude, guard length) use fixed, tested defaults and aren't currently adjustable from the command line — --synctone is an on/off switch, not a configuration surface.

Output format

  • Standard, uncompressed PCM WAV (RIFF/WAVE), 16-bit or 24-bit signed integer samples
  • Sample rate: any value from 32,000 Hz to 96,000 Hz
  • Mono (1 channel) or stereo (2 channels, dual-mono duplicated)
  • Amplitudes are specified in dBFS (decibels relative to full scale) and converted internally; a tone at 0 dBFS reaches exactly full scale

Common recipes

Calibration reference tone

A standard −20dBFS 1kHz tone, commonly used as a level reference. Explicit --license path:

wavgen --license /path/to/wavelens.lic --mode tone --tone 1000:-20 \
    --samplerate 48000 --bitdepth 24 --duration 10 -o ref_1khz_-20dbfs.wav

Frequency response measurement stimulus

A log sweep is the standard stimulus for measuring how a codec or post-processing algorithm affects frequency response across the audible range. Relying on the next-to-executable wavelens.lic default here:

wavgen --mode log-sweep \
    --start 20:-12 --end 20000:-12 \
    --samplerate 48000 --bitdepth 24 --duration 10 -o freq_response_stimulus.wav

Multi-tone spectral test content

A stack of tones spanning the audible range, useful for checking multiple frequency bands in a single pass. Explicit --license path:

wavgen --license /path/to/wavelens.lic --mode tone \
    --tone 100:-14 --tone 500:-12 --tone 1000:-10 \
    --tone 4000:-13 --tone 10000:-16 \
    --samplerate 48000 --bitdepth 24 --duration 15 -o spectral_test.wav

Amplitude-linearity staircase

Steps a tone down through a wide dynamic range to check how consistently level is preserved at each step. Relying on the next-to-executable wavelens.lic default here:

wavgen --mode step-sweep \
    --freq 1000 --start-amp 0 --step -10 --step-duration 2 \
    --samplerate 48000 --bitdepth 24 --duration 20 -o linearity_steps.wav

Full example reference

Every distinct command variation wavgen supports, grouped by mode — the same set as the wavgen_command_reference.bat script that ships alongside the tool, for whenever you want to see the full range in one place rather than hunting through the sections above. --license is omitted throughout for readability — add it, or set WAVELENS_LICENSE_FILE, per License if you're not relying on the next-to-executable default.

Tone — single tone

# baseline: 1kHz at -6dBFS, mono, 48kHz/24-bit
wavgen --mode tone --tone 1000:-6 --samplerate 48000 --bitdepth 24 --duration 5 -o tone_1khz.wav

# standard -20dBFS 1kHz calibration/reference tone
wavgen --mode tone --tone 1000:-20 --samplerate 48000 --bitdepth 24 --duration 10 -o tone_calibration.wav

# low-frequency tone (40Hz) -- probes bass/rumble handling
wavgen --mode tone --tone 40:-12 --samplerate 48000 --bitdepth 24 --duration 5 -o tone_40hz_low.wav

# high-frequency tone (18kHz) -- probes near-Nyquist handling at 48kHz
wavgen --mode tone --tone 18000:-12 --samplerate 48000 --bitdepth 24 --duration 5 -o tone_18khz_high.wav

# polarity inverted (":inv" suffix) -- for phase/polarity-sensitive DUT testing
wavgen --mode tone --tone 1000:-6:inv --samplerate 48000 --bitdepth 24 --duration 5 -o tone_inverted.wav

# 16-bit instead of 24-bit
wavgen --mode tone --tone 1000:-6 --samplerate 48000 --bitdepth 16 --duration 5 -o tone_16bit.wav

# minimum supported sample rate (32,000 Hz)
wavgen --mode tone --tone 1000:-6 --samplerate 32000 --bitdepth 24 --duration 5 -o tone_32khz_min.wav

# maximum supported sample rate (96,000 Hz)
wavgen --mode tone --tone 1000:-6 --samplerate 96000 --bitdepth 24 --duration 5 -o tone_96khz_max.wav

# stereo (dual-mono)
wavgen --mode tone --tone 1000:-6 --samplerate 48000 --bitdepth 24 --duration 5 --channels 2 -o tone_stereo.wav

Tone — multi-tone

# dual-tone
wavgen --mode tone --tone 500:-12 --tone 2000:-12 --samplerate 48000 --bitdepth 24 --duration 10 -o multitone_dual.wav

# three-tone stack
wavgen --mode tone --tone 500:-12 --tone 2000:-12 --tone 8000:-18 --samplerate 48000 --bitdepth 24 --duration 10 -o multitone_3tone.wav

# four-tone stack
wavgen --mode tone --tone 200:-12 --tone 1000:-12 --tone 5000:-12 --tone 12000:-16 --samplerate 48000 --bitdepth 24 --duration 10 -o multitone_quad.wav

# twelve-tone stack, real production frequency list, -22dBFS each
wavgen --mode tone --tone 30:-22 --tone 200:-22 --tone 325:-22 --tone 500:-22 --tone 700:-22 --tone 1000:-22 --tone 1400:-22 --tone 2000:-22 --tone 2800:-22 --tone 4000:-22 --tone 8000:-22 --tone 16000:-22 --samplerate 48000 --bitdepth 24 --duration 15 -o multitone_12tone.wav

# fourteen-tone stack, second real wide-band frequency list, -23dBFS each
wavgen --mode tone --tone 22:-23 --tone 30:-23 --tone 42:-23 --tone 52:-23 --tone 70:-23 --tone 80:-23 --tone 135:-23 --tone 155:-23 --tone 460:-23 --tone 910:-23 --tone 1740:-23 --tone 3410:-23 --tone 10265:-23 --tone 20000:-23 --samplerate 48000 --bitdepth 24 --duration 15 -o multitone_14tone.wav

# deliberately near-0dBFS -- triggers the clip-safety warning, still writes the file
wavgen --mode tone --tone 1000:-1 --tone 2000:-1 --samplerate 48000 --bitdepth 16 --duration 5 -o multitone_clip_warning_demo.wav

# dual-tone, stereo
wavgen --mode tone --tone 500:-12 --tone 2000:-12 --samplerate 48000 --bitdepth 24 --duration 5 --channels 2 -o multitone_dual_stereo.wav

Linear sweep

# full-range, 20Hz to 20kHz, -6dBFS
wavgen --mode linear-sweep --start 20:-6 --end 20000:-6 --samplerate 48000 --bitdepth 24 --duration 5 -o linsweep_up.wav

# reverse direction: 20kHz down to 20Hz
wavgen --mode linear-sweep --start 20000:-6 --end 20:-6 --samplerate 48000 --bitdepth 24 --duration 5 -o linsweep_down.wav

# amplitude fade-in: quiet at the start, full level by the end
wavgen --mode linear-sweep --start 20:-30 --end 20000:-6 --samplerate 48000 --bitdepth 24 --duration 5 -o linsweep_fade_in.wav

# narrow-band (500Hz-2000Hz) -- a band-limited stimulus for a specific filter/EQ band
wavgen --mode linear-sweep --start 500:-6 --end 2000:-6 --samplerate 48000 --bitdepth 24 --duration 3 -o linsweep_narrowband.wav

# 16-bit / 44100Hz
wavgen --mode linear-sweep --start 20:-6 --end 20000:-6 --samplerate 44100 --bitdepth 16 --duration 5 -o linsweep_44100hz_16bit.wav

# stereo
wavgen --mode linear-sweep --start 20:-6 --end 20000:-6 --samplerate 48000 --bitdepth 24 --duration 5 --channels 2 -o linsweep_stereo.wav

Log sweep

# full-range, 20Hz to 20kHz -- the standard frequency-response measurement stimulus
wavgen --mode log-sweep --start 20:-6 --end 20000:-6 --samplerate 48000 --bitdepth 24 --duration 5 -o logsweep_up.wav

# reverse direction: 20kHz down to 20Hz
wavgen --mode log-sweep --start 20000:-6 --end 20:-6 --samplerate 48000 --bitdepth 24 --duration 5 -o logsweep_down.wav

# amplitude fade-out: full level at the start, quiet by the end
wavgen --mode log-sweep --start 20:-6 --end 20000:-30 --samplerate 48000 --bitdepth 24 --duration 5 -o logsweep_fade_out.wav

# narrow-band (100Hz-4000Hz)
wavgen --mode log-sweep --start 100:-6 --end 4000:-6 --samplerate 48000 --bitdepth 24 --duration 3 -o logsweep_narrowband.wav

# minimum sample rate boundary (32,000 Hz)
wavgen --mode log-sweep --start 20:-6 --end 15000:-6 --samplerate 32000 --bitdepth 24 --duration 5 -o logsweep_32khz_min.wav

# stereo
wavgen --mode log-sweep --start 20:-6 --end 20000:-6 --samplerate 48000 --bitdepth 24 --duration 5 --channels 2 -o logsweep_stereo.wav

Step-sweep

# 1kHz, 0dBFS stepping DOWN 6dB every second, 10 steps
wavgen --mode step-sweep --freq 1000 --start-amp 0 --step -6 --step-duration 1 --samplerate 48000 --bitdepth 24 --duration 10 -o stepsweep_down.wav

# same idea, stepping UP instead (positive --step)
wavgen --mode step-sweep --freq 1000 --start-amp -30 --step 6 --step-duration 1 --samplerate 48000 --bitdepth 24 --duration 10 -o stepsweep_up.wav

# different frequency, larger step, longer hold -- a coarser linearity sweep at 4kHz
wavgen --mode step-sweep --freq 4000 --start-amp 0 --step -10 --step-duration 2 --samplerate 48000 --bitdepth 24 --duration 20 -o stepsweep_4khz_coarse.wav

# 16-bit instead of 24-bit
wavgen --mode step-sweep --freq 1000 --start-amp 0 --step -6 --step-duration 1 --samplerate 48000 --bitdepth 16 --duration 10 -o stepsweep_16bit.wav

# stereo
wavgen --mode step-sweep --freq 1000 --start-amp 0 --step -6 --step-duration 1 --samplerate 48000 --bitdepth 24 --duration 10 --channels 2 -o stepsweep_stereo.wav

Step sequence

# compressor attack probe: -40dBFS for 0.5s, then instant jump to 0dBFS for 1.0s
wavgen --mode step-seq --freq 1000 --segment -40:0.5 --segment 0:1.0 --samplerate 48000 --bitdepth 24 --channels 2 -o attack_burst.wav

# compressor release probe: 0dBFS for 1.0s, then instant drop to -40dBFS for 0.5s
wavgen --mode step-seq --freq 1000 --segment 0:1.0 --segment -40:0.5 --samplerate 48000 --bitdepth 24 --channels 2 -o release_burst.wav

# three-segment sequence -- e.g. quiet, loud, quiet again
wavgen --mode step-seq --freq 1000 --segment -30:0.5 --segment 0:0.5 --segment -30:0.5 --samplerate 48000 --bitdepth 24 -o three_segment.wav

# note: no --duration -- total length is the sum of the --segment durations

Silence

# short mono silence -- typical guard/padding duration
wavgen --mode silence --samplerate 48000 --bitdepth 24 --duration 1 -o silence_mono.wav

# stereo
wavgen --mode silence --samplerate 48000 --bitdepth 24 --duration 1 --channels 2 -o silence_stereo.wav

# longer, at 16-bit
wavgen --mode silence --samplerate 48000 --bitdepth 16 --duration 5 -o silence_16bit.wav

# minimum sample rate boundary
wavgen --mode silence --samplerate 32000 --bitdepth 24 --duration 1 -o silence_32khz_min.wav

# maximum sample rate boundary
wavgen --mode silence --samplerate 96000 --bitdepth 24 --duration 1 -o silence_96khz_max.wav

Noise

# white noise, -20dBFS RMS -- a typical general-purpose level
wavgen --mode noise --color white --level -20 --seed 1 --samplerate 48000 --bitdepth 24 --duration 10 -o noise_white.wav

# pink noise, -20dBFS RMS -- the standard frequency-response/EQ measurement stimulus
wavgen --mode noise --color pink --level -20 --seed 1 --samplerate 48000 --bitdepth 24 --duration 10 -o noise_pink.wav

# quiet pink noise -- noise-floor calibration content
wavgen --mode noise --color pink --level -60 --seed 1 --samplerate 48000 --bitdepth 24 --duration 5 -o noise_pink_floor.wav

# explicit seed for a reproducible fixture -- same seed always reproduces the same file
wavgen --mode noise --color white --level -20 --seed 12345 --samplerate 48000 --bitdepth 24 --duration 5 -o noise_white_seeded.wav

# stereo
wavgen --mode noise --color pink --level -20 --seed 1 --samplerate 48000 --bitdepth 24 --duration 10 --channels 2 -o noise_pink_stereo.wav

Square

# 1kHz, -6dBFS peak -- odd-harmonics-only aliasing/transient stress test
wavgen --mode square --freq 1000 --amp -6 --samplerate 48000 --bitdepth 24 --duration 5 -o square_1khz.wav

# lower frequency -- more harmonics fit below Nyquist, richer content
wavgen --mode square --freq 200 --amp -6 --samplerate 48000 --bitdepth 24 --duration 5 -o square_200hz.wav

# stereo
wavgen --mode square --freq 1000 --amp -6 --samplerate 48000 --bitdepth 24 --duration 5 --channels 2 -o square_1khz_stereo.wav

Sawtooth

# 1kHz, -6dBFS peak -- richest available harmonic content (odd + even)
wavgen --mode sawtooth --freq 1000 --amp -6 --samplerate 48000 --bitdepth 24 --duration 5 -o sawtooth_1khz.wav

# lower frequency -- more harmonics fit below Nyquist
wavgen --mode sawtooth --freq 200 --amp -6 --samplerate 48000 --bitdepth 24 --duration 5 -o sawtooth_200hz.wav

# stereo
wavgen --mode sawtooth --freq 1000 --amp -6 --samplerate 48000 --bitdepth 24 --duration 5 --channels 2 -o sawtooth_1khz_stereo.wav

DC offset combined with each mode

# pure DC at 10%FS -- for DC-blocking/leakage testing
wavgen --mode silence --dc-offset 0.1 --samplerate 48000 --bitdepth 24 --duration 5 -o dc_pure.wav

# tone riding on a DC bias
wavgen --mode tone --tone 1000:-20 --dc-offset 0.1 --samplerate 48000 --bitdepth 24 --duration 5 -o dc_tone.wav

# negative bias
wavgen --mode silence --dc-offset -0.15 --samplerate 48000 --bitdepth 24 --duration 5 -o dc_negative.wav

Sync tone wrapping combined with each mode

# calibration tone, sync-tone wrapped -- 10.5s total (5s content + ~5.5s overhead)
wavgen --mode tone --tone 1000:-6 --synctone --samplerate 48000 --bitdepth 24 --duration 5 -o synctone_tone.wav

# log sweep, sync-tone wrapped -- a complete frequency-response measurement file
wavgen --mode log-sweep --start 20:-6 --end 20000:-6 --synctone --samplerate 48000 --bitdepth 24 --duration 5 -o synctone_logsweep.wav

# sync-tone wrapping + stereo together -- the whole wrapped file is duplicated onto both channels
wavgen --mode tone --tone 1000:-6 --synctone --channels 2 --samplerate 48000 --bitdepth 24 --duration 5 -o synctone_tone_stereo.wav

Errors & troubleshooting

MessageMeaning & fix
error: license INVALID -- no license found at '...'The path shown is whichever of the three lookups actually resolved: the path passed to --license, the path in WAVELENS_LICENSE_FILE, or wavelens.lic next to the executable — check that one doesn't exist or is misspelled.
error: no --license given, WAVELENS_LICENSE_FILE is not set, and this executable's own directory could not be resolvedRare — the OS-level lookup for the executable's own location failed. Pass --license <file.lic> explicitly to work around it.
error: license INVALID -- signature invalidThe license file has been altered or corrupted. Obtain a fresh copy from your distributor.
error: license EXPIRED -- license expired on ...Your license's expiry date has passed. Contact your administrator for a renewal.
warning: license expires in N daysInformational only — the run still completes. Renew before this reaches 0.
error: --samplerate must be in [32000, 96000] HzThe requested sample rate is outside the supported range. Choose a value in range (e.g. 44100, 48000, 96000).
error: --bitdepth must be 16 or 24Only 16-bit and 24-bit PCM output are supported.
error: --duration must be > 0Duration must be a positive number of seconds.
error: malformed --tone '...', expected FREQ:AMPDB[:inv]Check the --tone value uses a colon between frequency and amplitude, e.g. 1000:-6.
error: --mode log-sweep requires start/end frequency > 0A log sweep can't start or end at 0Hz. Use linear-sweep if you need to sweep through 0Hz, or pick a small positive starting frequency.
error: --mode noise requires --color white|pink and --level RMSDBFSBoth are required for --mode noise — there's no default color or level.
error: --color must be 'white' or 'pink', got '...'Only those two values are recognized. Check spelling.
error: --mode square|sawtooth requires --freq > 0 and --amp AMPDBBoth are required — there's no default frequency or amplitude.
error: --dc-offset must be in [-1.0, 1.0] (linear fraction of full scale), got ...The value is out of range. Remember this is a linear fraction, not dBFS — 0.1 means 10%FS, not −0.1dB.

FAQ

Do I have to pass --license every time?

No. Set WAVELENS_LICENSE_FILE once in your environment, or keep a wavelens.lic file in the same folder as the wavgen executable, and either is picked up automatically — you can leave --license off entirely. Pass --license <file> only when you want to point at a different license than whichever of those two would otherwise apply.

Can I generate true stereo content with different signals on each channel?

Not with wavgen alone, and deliberately so — --channels 2 only duplicates one signal onto both channels (dual-mono); every mode stays a single-signal generator rather than growing L/R-specific flags for what's really a channel-assembly job. Generate each channel's content as a separate mono wavgen call, then combine them with wavchan pack (see the wavchan user guide), e.g. wavchan pack --segment L:left.wav --segment R:right.wav -o stereo.wav. If the two channels only need to be phase-inverted copies of each other rather than fully independent content, add --invert to the second call instead of generating genuinely different content — see Phase inversion.

Can wavgen add noise, or simulate dropouts and clicks?

wavgen can generate broadband white/pink noise (--mode noise) as its own standalone content. It doesn't inject artifacts — dropouts, clicks, clips, or a known-precise difference between a reference and a DUT file — into existing content; that's outside wavgen's own scope, which is clean stimulus synthesis, not fault-injection test-fixture generation.

What sample formats can I feed into the WaveLens analysis tool afterward?

See the main WaveLens documentation for input requirements — this guide covers signal generation only.