--> Lesson 6 — RTA, Signal Generator and Distortion | REW Pro Field Manual
REW Pro Field Manual Acoustic & Electroacoustic Measurement
Curriculum Module 06 Live Spectral & Non-Linear Analysis

Lesson 06 • Real-Time Analysis, Stimuli & Non-Linearity

Lesson 6 — RTA, Signal Generator and Distortion

Log sweeps deconvolve linear room transfer functions, but they are the wrong instrument for live EQ iteration, background-noise rating, CEA-2010 limit testing, and sub-−100 dB electronics characterization. This lesson covers REW’s FFT/RTA engine, periodic vs. random excitation, coherent averaging, calibrated SPL logging, Signal Generator stimulus engineering, and rigorous distortion interpretation across sweeps, live tones, multitone, and Stepped Sine.

Core Tools: RTA, Signal Generator, Distortion Panel, Stepped Sine, SPL Meter & Logger Key Trade-offs: Periodic vs. Random • Sweep vs. Stepped Sine • THD vs. THD+N & N Platform Focus: macOS Java CoreAudio / Dual-Clock Caveats

01 • Engineering Rationale

What this is for

In professional acoustic and electroacoustic workflows, a logarithmic sine sweep is not universally optimal. Sweeps excel at high-SNR linear transfer-function extraction and time-windowed reflection analysis, yet they break down or become inefficient in five daily scenarios where the RTA, Signal Generator, and SPL Meter/Logger take over:

Boundary Condition: What the RTA Cannot Do

An RTA displays the combined steady-state energy of source plus room reflections. It does not compute a transfer function or impulse response, cannot apply IR time windowing, and cannot separate direct sound from early boundary cancellations. Use the RTA for live magnitude convergence, stationary noise/rating checks, and non-linear stimulus analysis; always return to timed log sweeps when phase, excess group delay, ETC, or crossover time alignment matters.

macOS Bench & Live RTA Reality Check

On macOS, REW runs exclusively on Java audio drivers (no ASIO or WASAPI exclusive), and REW’s internal volume sliders are disabled. Before opening the RTA or Signal Generator for calibrated distortion work, lock your interface to 24-bit (or 32-bit if exposed) and the target sample rate in Audio MIDI Setup (44.1/48 kHz for acoustic work; up to 192 kHz—or higher up to 1536 kHz hardware-dependent in REW V5.30+—for wide-bandwidth electronics harmonics). Manage analog gain exclusively via Audio MIDI Setup or the interface hardware mixer, and never change sample rate without re-verifying your soundcard calibration file.

02 • Concrete REW Procedures

Steps

Execute the three workflows below according to the measurement objective. Do not reuse a stationary periodic-noise RTA configuration for asynchronous moving-mic work or ultra-low-THD electronics testing—windowing, FFT length, dither, and averaging rules change fundamentally between tasks.

Workflow A — Live Stationary RTA with Pink Periodic Noise (Zero-Leakage Tuning)

  1. Confirm clock topology first: Verify in Preferences → Soundcard that input and output reside on the same physical audio interface (shared master clock). If using a USB measurement mic with a separate DAC/AVR output, skip to the asynchronous branch in Step 4.
  2. Open the RTA window (Cmd+Alt+R or toolbar RTA) and click the Controls gear icon.
  3. Select display mode and resolution: Choose RTA 1/12 octave (or 1/24 / 1/48 octave) for EQ shaping, 1/3 octave for broadband spectral balance, 1 octave if overlaying room noise curves (PNC, NCB, NC, NR), or Spectrum for narrowband bin inspection (spurs, mains hum, harmonics).
  4. Lock FFT length and window function:
    • Single-clock periodic workflow: Set FFT Length to 64k (0.73 Hz/bin at 48 kHz; 1.37 s frame) or 32k (1.46 Hz/bin; faster visual response). Set Window to Rectangular. Set Averaging to None or a short Exponential constant.
    • Separate-clock / USB mic or Moving Mic workflow: Set Window to Hann (never Rectangular), enable high Max Overlap (e.g. 50%–75%+), and switch Averaging to Forever (or long RMS/Exponential averaging) to drive down random-signal variance.
  5. Configure the Signal Generator: Open Generator, select the Noise group, and pick Pink Periodic Noise (single-clock) or Pink Random Noise (dual-clock / moving mic). For Pink Periodic Noise, set its Sequence Length to match the RTA’s exact FFT length (64k ↔ 64k). Set output level conservatively (e.g., −20 dBFS to −12 dBFS) and verify headroom in Level Meters so peaks never clip.
  6. Start playback and capture: Start the Signal Generator, press the red Record button in the RTA window, optionally enable the Peak trace to catch transient excursions, and click Save Current whenever you want to push a snapshot directly into REW’s main measurement list for overlay comparison.

Workflow B — Calibrated SPL Meter & SPL Logger Configuration

  1. Verify SPL calibration chain: Confirm your USB mic calibration file includes its Sens Factor = ... header (or your analog rig is calibrated against an external SPL meter/calibrator, or carries a known Sensitivity -XX.XX dBFS offset). Remember that any gain change in Audio MIDI Setup or on an analog preamp invalidates SPL calibration.
  2. Open SPL Meter: Select weighting—C-weighting for subwoofer/broadband system checks, A-weighting for perceived noise floor and compliance, or Z-weighting (unweighted) for true sub-bass and flat acoustic energy.
  3. Select time constant and high-pass: Choose Slow (1 s) for steady-state calibration noise or Fast (125 ms) for dynamic program material/bursts. Engage the High-Pass filter if infrasonic HVAC rumble contaminates A/C readings. Monitor Min / Max / Peak, Leq, SEL, and the Overload indicator.
  4. Launch SPL Logger for time-series capture: Click Logger from the SPL Meter panel. Start logging to record SPL, Min/Max, Peak, Leq, and SEL continuously over time (e.g., tracking 15-minute background noise or thermal compression during high-SPL testing).
  5. Export records: Stop logging and click Save to text to archive timestamped SPL/Leq/SEL logs for client reports or post-processing.

Workflow C — High-Precision Distortion Analysis (Live RTA & Stepped Sine)

  1. Establish the electrical floor first (electronics or rig verification): For voltage-referenced bench testing, calibrate FS sine Vrms in Soundcard preferences so the RTA and Distortion Panel display calibrated Vrms / dBu / dBV alongside dBFS. Loop output to input (phantom power OFF, direct monitoring MUTED) to verify your interface’s native THD+N floor before attaching the DUT.
  2. Configure the Signal Generator stimulus:
    • Single-tone THD / THD+N / ENOB: Select Tones → Sine, enable Lock frequency to RTA FFT (bin-centered fundamental), and enable Dither (mandatory for clean low-level distortion testing).
    • Intermodulation (IMD): Select Dual tone, Triple tone, or Quad tone (e.g., SMPTE 60 Hz + 7 kHz or CCIF 19 kHz + 20 kHz).
    • Broadband complex non-linearity (TD+N): Select Multitone with Linear, Octave, Decade, or NID spacing.
    • Digital jitter: Select Tones → J-test.
    • Subwoofer max clean output: Select Tones → CEA-2010 burst and enable the CEA-2010 overlay in the RTA window.
  3. Open the RTA Distortion Panel: Switch the RTA mode to Spectrum, choose an appropriate FFT length (32k–128k+ depending on low-frequency bin separation and desired FFT processing gain), select Rectangular window for bin-locked single-clock tones (or a low-sidelobe window if clocks are asynchronous), and open the Distortion readout panel.
  4. Engage Coherent Averaging when measuring harmonics near the noise floor: In RTA controls, enable Coherent averaging. REW phase-aligns each FFT frame to the fundamental before averaging, suppressing uncorrelated noise while preserving phase-locked harmonic distortion components.
  5. Run Stepped Sine for frequency- or level-swept precision: Open the Stepped Sine dialog inside the RTA window. Choose Stepped Sine vs Frequency (or vs Level), set start/end frequency, points per octave (PPO), settle time, FFT length, and averages. Run the measurement to generate a full main-window Distortion graph containing fundamental, harmonics H2–H9, THD, THD+N, and N—completely free of the rising noise floor inherent to log-sweep distortion.
macOS Terminal — Launch REW with API enabled for automated RTA / Stepped Sine / SPL logging
open -a REW.app --args -api
macOS Terminal — Query live RTA, Generator, SPL Meter & Stepped Measurement endpoints (localhost:4735)
curl -s http://127.0.0.1:4735/rta/levels
curl -s http://127.0.0.1:4735/spl-meter/1/levels
curl -s http://127.0.0.1:4735/stepped-measurement/progress

03 • Diagnostic Interpretation

Reading the output

Raw RTA traces and distortion percentages mislead quickly if you ignore stimulus spectral slope, FFT bin gain, noise-floor masking, or the distinction between harmonic and non-harmonic energy. Read every plot through both its spectral shape and its underlying mathematical estimator.

RTA Spectrum + Live Distortion Panel (1 kHz Bin-Locked Sine, 64k FFT, 48 kHz)
Harmonics vs. Non-Harmonic Spurs & Coherent Averaging Effect
RTA / Spectrum
RTA Spectrum showing 1 kHz fundamental, harmonics H2 through H5, mains hum spurs, and noise floor drop with coherent averaging Log-frequency spectrum plot from 20 Hz to 20 kHz, amplitude from 0 dBFS down to -140 dBFS, comparing unaveraged noise floor around -112 dBFS against coherent-averaged floor near -124 dBFS, revealing H2 at -74 dBFS, H3 at -82 dBFS, H5 at -108 dBFS, and 60/120 Hz mains spurs contributing to N and THD+N. 0 -20 -40 -60 -80 -100 -120 -140 20 100 1k 2k 4k 10k 20k Frequency (Hz) — Spectrum Mode (dBFS) F1 (1 kHz, -3 dBFS) H2 (-74 dB) H3 (-82 dB) H5 (revealed) 60 Hz hum (N) 120 Hz (N) 1-frame floor (-110 dB) 16x Coherent Avg (-126 dB) DISTORTION PANEL Fund:-3.0 dBFS THD:-73.3 dB (0.022%) THD+N:-68.1 dB (0.039%) N:-69.7 dB N+D (A):-72.4 dBA SNR:86.4 dB ENOB:11.0 bits Diagnosis: THD+N worse than THD by 5.2 dB -> 60/120 Hz spurs dominate N, not harmonics.
Log Sweep vs. Stepped Sine Distortion (Noise-Floor Masking Comparison)
Why Sweep H3/H5 Become Unreliable at High Frequencies
Distortion Graph
Comparison of Log Sweep distortion rising noise floor against flat Stepped Sine noise floor Frequency plot from 20 Hz to 10 kHz showing fundamental at 0 dB, true H2 and H3 distortion curves, and comparing the rising log-sweep noise floor that masks H3 above 1.5 kHz against the flat low Stepped Sine noise floor around -92 dB. 0 dB -20 -40 -60 -80 -100 20 50 100 200 500 1k 2k 5k 10k Fundamental Frequency (Hz) — Relative Distortion (dBr) Fundamental (0 dBr) Low-freq excursion H3 Sweep noise floor (rising) Sweep H3 (noise-masked!) Stepped Sine H3 (true DUT) Stepped Sine floor (flat, + N & THD+N)

RTA & Stimulus Slope Laws

Before interpreting any spectral tilt in the RTA window, verify the pairing between display mode and stimulus:

Stimulus Energy Distribution Appearance in Narrowband Spectrum (FFT Bins) Appearance in Fractional-Octave RTA Primary Use Case
Pink Periodic Noise Equal energy / octave (repeats every N samples) Slopes down −3 dB/octave Flat (0 dB/oct), zero frame-to-frame jitter when bin-locked Live stationary EQ adjustment, fast loudspeaker magnitude checks on single-clock rigs
Pink Random Noise Equal energy / octave (stochastic) Slopes down −3 dB/octave (high variance without avg) Flat after temporal/spatial averaging Moving Mic Measurement (MMM), dual-clock (USB mic + AVR) live tuning
White Periodic / Random Equal energy / Hz Flat (0 dB/oct) Slopes up +3 dB/octave High-frequency tweeter/electronics bandwidth checks (mind HF driver thermal limits)
CTA-2034 / Speaker & Sub Cal Band-limited / weighted pink noise Band-limited −3 dB/oct slope Band-limited flat passband Calibrated channel-level matching without exciting out-of-band roll-offs

Distortion Panel & Distortion Graph Metrics — Exact Engineering Meanings

Metric Definition Stimulus Context Diagnostic Interpretation
H2 – H9 Individual harmonic components (2nd through 9th order) Log Sweep, Live Sine, Stepped Sine Dominant H2 indicates asymmetric non-linearity (suspension/Bl offset, single-ended stage). Dominant H3 / H5 signals symmetric clipping, excursion/motor limit, or crossover/port overload.
THD Root-sum-square of harmonics relative to fundamental Log Sweep, Live Sine, Stepped Sine Pure harmonic distortion only. Blind to mains hum, thermal noise, quantization spurs, or mechanical rattles that are not integer multiples of f1.
THD+N Harmonics plus all in-band noise and non-harmonic distortion Live Sine (RTA), Stepped Sine Gold-standard single-figure fidelity metric for electronics. If THD+N ≫ THD, your limitation is noise, hum, or non-harmonic spurs—not harmonic non-linearity.
N Noise and non-harmonic distortion (fundamental & harmonics removed) Live Sine (RTA), Stepped Sine Isolates broadband noise floor, 50/60 Hz power-supply hum, clock spurs, and cabinet/room buzzes independent of harmonic orders.
N+D A-weighted noise plus distortion Live Sine (RTA) Perceptually weighted noise + distortion; depresses low-frequency mains hum/rumble relative to midrange audibility.
TD+N Total Distortion plus Noise across all non-stimulus bins Multitone (Linear, Octave, Decade, NID) Captures simultaneous harmonic and intermodulation products across the entire passband in one real-time frame.
IMD Intermodulation Distortion sum/difference sidebands Dual, Triple, or Quad tone Exposes Doppler distortion in multi-way drivers and high-frequency slew/non-linearity that single-tone THD misses when harmonics fall above Nyquist.
SNR / ENOB Signal-to-Noise Ratio; Effective Number of Bits Live Sine (RTA) ENOB translates THD+N (SINAD) into equivalent ideal converter resolution: ENOB = (SINAD_dB − 1.76) / 6.02. A 24-bit interface with −104 dB THD+N delivers ~17.0 effective bits.

Fast Diagnostic Checklist: Valid Data vs. Measurement Artifacts

04 • Advanced Theory & Edge Cases

Deeper detail

Deeper Detail • DSP & Electroacoustics FFT Mathematics, Periodic Clock Synchrony, Coherent Averaging, Farina Deconvolution & Stimulus Engineering

1. FFT Resolution, Windowing Trade-offs & Dual-Clock Failure Modes

REW’s RTA computes an N-point FFT whose linear bin spacing is fixed by Δf = fs / N. At fs = 48 kHz, a 64k (65,536-sample) FFT provides Δf = 0.732 Hz and spans 1.365 s per frame. Increasing N improves frequency resolution and lowers the per-bin broadband noise floor by 3 dB per doubling (FFT processing gain), while proportionally slowing time responsiveness.

Why Pink Periodic Noise + Rectangular Window works—and exactly when it fails: A Periodic Noise sequence of length N is mathematically periodic over the exact FFT capture frame: every sinusoid comprising the noise executes an integer number of cycles inside the frame. Under a Rectangular window (no taper), the Dirichlet kernel nulls land identically on every adjacent FFT bin, yielding zero spectral leakage, zero scalloping loss, and deterministic bin magnitudes on the very first complete steady-state frame.

However, this exact bin orthogonality requires zero sample-clock drift between DAC and ADC. On macOS, Java drivers allow separate input and output devices (for instance, HDMI out to an AVR paired with a USB UMIK-1). Two independent crystal oscillators typically differ by 20–100 ppm. At 10 kHz, a 50 ppm clock offset shifts the received frequency by 0.5 Hz—more than half an FFT bin in a 64k capture—destroying bin alignment, injecting spectral leakage skirts, and corrupting Rectangular-window amplitude accuracy. Whenever DAC and ADC do not share a clock (or the microphone is in motion), abandon Rectangular windowing: apply a tapered window (e.g., Hann), enable overlap, and average.

2. Coherent Averaging Mechanics

Standard magnitude (RMS) averaging reduces the variance (jitter) of the noise floor, making the noise line smoother, but it does not lower the mean noise floor level—a harmonic buried 3 dB below the bin noise floor stays buried forever under RMS averaging.

Coherent averaging solves this in the complex frequency domain: REW locks to the phase of the fundamental tone in each FFT frame, rotates the complex harmonic bins accordingly, and averages complex vectors across M frames. Phase-coherent harmonics sum linearly in amplitude (+20·log10(M)), whereas uncorrelated random noise sums only in power (+10·log10(M)). Normalized to the fundamental, the noise floor drops by 3 dB per doubling of coherent averages (e.g., 16 coherent averages → −12 dB noise-floor reduction; 64 averages → −18 dB).

Operational caveat: Coherent averaging only preserves signals strictly phase-locked to the fundamental. Uncorrelated interference (e.g., 60 Hz mains hum when testing with a 1 kHz tone) will also attenuate during coherent averaging—so always inspect both non-coherent Spectrum (for true N and mains spurs) and coherently averaged Spectrum (for ultra-low harmonic floors).

3. Why Log-Sweep Distortion Has a Rising Noise Floor vs. Stepped Sine

During a logarithmic sine sweep from f1 to f2 over duration T, the sweep spends equal time per octave—meaning its energy density matches pink noise (−3 dB/octave). When REW deconvolves the recorded sweep with the inverse filter to produce the impulse response, Farina’s property cleanly maps the k-th harmonic to a negative arrival time ahead of t = 0:

Δt_k = − T · ln(k) / ln(f2 / f1)

Because the inverse deconvolution filter must boost high frequencies at +3 dB/octave to flatten the pink-weighted sweep into a white impulse, any flat white noise floor in the ADC, preamp, or room is tilted upward at +3 dB/octave in the deconvolved spectrum. Moreover, at higher harmonic orders (H4–H9), the spacing ln(k+1) − ln(k) shrinks rapidly, causing adjacent harmonic impulse responses—and their room-reverb tails—to overlap in negative time unless sweep length is very long.

Stepped Sine avoids deconvolution entirely: at each discrete frequency step, the generator outputs a full-power steady-state sinusoid and the RTA evaluates a narrowband FFT around the fundamental and its harmonics. The measurement noise floor remains flat across frequency, harmonic bins cannot cross-contaminate via IR tail overlap, and REW computes full THD+N and N alongside H2–H9. The only cost is measurement time.

4. Signal Generator Stimulus Engineering & Dither Discipline

  • Mandatory Dither for Low-Distortion Tests: Truncating a digital sine or multitone to 16-bit or 24-bit without dither produces quantization error strongly correlated with the signal, manifesting as artificial harmonic distortion spikes and spurs in the RTA. Enable Dither in the Signal Generator for all distortion and loopback characterization.
  • Multitone Spacing (Linear, Octave, Decade, NID): Linear spacing crowds high-frequency visual resolution; Octave and Decade spacing balance log-axis coverage. NID spacing positions tones to minimize coincident harmonic/intermodulation bin overlaps, allowing clean separation of TD+N across the audio band in a single capture. Watch crest factor: summing dozens of tones dramatically increases peak-to-RMS ratio, requiring lower RMS level to stay clear of digital FS.
  • Dual / Triple / Quad Tone IMD: High-frequency single-tone THD tests fail above fs / 6 (8 kHz at 48 kHz) because H3 exceeds Nyquist and is removed by the anti-aliasing filter. A dual-tone test (e.g., 19 kHz + 20 kHz) places the 2nd-order difference product at 1 kHz and 3rd-order products at 18 kHz / 21 kHz—squarely inside the audio passband.
  • Why Tone Bursts & CEA-2010 Bursts Are Not Low-THD Stimuli: Short-duration bursts (like CEA-2010 6.5-cycle shaped bursts) are engineered to test peak mechanical/thermal subwoofer output without melting voice coils. Their short temporal envelope inherently broadens spectral width in the FFT, restricting dynamic range for ultra-low distortion measurements. Use bursts exclusively for high-SPL limit testing with the CEA-2010 overlay.
  • Companion Live Diagnostics: Keep Relative Gain and Phase open when checking inter-channel gain/phase tracking at the generator frequency, Scope (CH1, CH2, Math) open to visually catch asymmetric clipping or DC offset before it damages a driver, and Frequency Meter to verify actual received sample-clock frequency on dual-clock rigs.

05 • End-to-End Field Procedure

Worked example

Goal: A powered two-way studio monitor exhibits subtle mid-bass “grittiness” above moderate monitoring levels. Determine whether the defect originates from the audio interface/preamp path, woofer mechanical non-linearity (H2 vs. H3), cabinet resonance/buzz (non-harmonic N), or crossover-region intermodulation—and quantify the monitor’s clean SPL ceiling.

Platform: macOS (48 kHz / 24-bit locked in Audio MIDI Setup, single audio interface clock)
Mic & Cal: Calibrated analog measurement mic (mic cal + 48 kHz soundcard cal loaded, SPL calibrated)
Test Distance: 0.5 m on-axis (raises direct-to-reverberant ratio for clean distortion capture)
Target Levels: 85 dB SPL (nominal) & 95 dB SPL (stress test) verified via SPL Meter (Z-weighted, Slow)

Steps

  1. Establish the electrical rig floor (Loopback baseline): Disconnect mic, disable 48 V phantom power, mute direct monitoring, and connect interface Output 1 → Input 1. In Generator, select 1 kHz Sine at −3 dBFS, enable Lock frequency to RTA FFT, and enable Dither. In RTA, select Spectrum, 64k FFT, Rectangular window, and open the Distortion Panel. Confirm interface loopback THD+N < −95 dB (ENOB > 15.5) and check for 60/120 Hz spurs in N.
  2. Verify room background noise floor: Reconnect the mic at 0.5 m, switch RTA to 1 octave mode, enable NC noise curve overlay, and mute the generator. Confirm ambient noise sits below NC-25 (ensuring adequate acoustic SNR at 85 dB SPL).
  3. Set repeatable SPL with SPL Meter & Logger: Play Pink Periodic Noise (64k, matching RTA FFT) and open SPL Meter (Z-weighted, Slow) + SPL Logger. Adjust monitor input trim / interface mixer to hit 85.0 dB SPL while maintaining 18–24 dB input headroom in Level Meters. Start the SPL Logger to track drift during testing.
  4. Run baseline 256k Log Sweep (fast overview): Measure 30 Hz–20 kHz at 85 dB SPL. Inspect the main Distortion graph: note any H2/H3 rises below 300 Hz and verify where the rising sweep noise floor begins masking H3/H5 (typically above 1.5–3 kHz).
  5. Run Stepped Sine at 85 dB and 95 dB SPL: Open RTA → Stepped Sine (40 Hz–10 kHz, 12 PPO, 32k FFT, Rectangular window, dither ON, 4 coherent averages). Run first at 85 dB SPL, then increase output by +10 dB (95 dB SPL) while watching SPL Meter overload and Scope for waveform clipping. Compare H2, H3, THD, THD+N, and N between both levels in Overlays → Distortion.
  6. Targeted live RTA + Dual-Tone IMD probe at the anomaly: Park the Signal Generator on a single sine at the worst low-mid frequency identified by Stepped Sine (e.g., 115 Hz) in live RTA Spectrum mode to inspect N vs. THD. Then switch to Dual Tone (115 Hz + 1.2 kHz, 4:1 ratio) to quantify sideband IMD at 95 dB SPL.

Expected Output

Test Stage THD THD+N N (Noise / Non-Harmonic) Dominant Spectral Feature
1. Electrical Loopback (1 kHz, −3 dBFS) −104.2 dB (0.0006%) −98.6 dB (0.0012%) −99.9 dB (ENOB 16.1) Clean rig floor; no 60/120 Hz ground-loop spurs
2. Stepped Sine @ 85 dB SPL (115 Hz) −46.5 dB (0.47%) −45.8 dB (0.51%) −54.1 dB H2 (−47.2 dB) > H3 (−55.0 dB); smooth acoustic behavior
3. Stepped Sine @ 95 dB SPL (115 Hz) −32.1 dB (2.48%) −27.4 dB (4.27%) −29.2 dB (spiked +24.9 dB!) H3 jumps +19 dB (−36 dB), PLUS non-harmonic spray between 600 Hz–2.5 kHz
4. Stepped Sine @ 95 dB SPL (3 kHz) −58.4 dB (0.12%) −55.0 dB (0.18%) −57.7 dB Stepped Sine reveals true clean tweeter (Log Sweep falsely showed −44 dB due to rising floor)
5. Dual-Tone IMD (115 Hz + 1.2 kHz @ 95 dB) —