Phonalyser logo

Theory of operation

How the signal path and the analysis engine actually work, written for the measurement user.

This page explains how Phonalyser works inside - what actually happens to your signal between the moment it is synthesized and the moment a THD number appears on screen. It is written for the measurement user: you don't need to know anything about software development to follow it. The user-facing controls are documented in the preferences and the in-app help.

A tip of the hat. Phonalyser owes its existence to REW (Room EQ Wizard) - working with that excellent tool inspired the author to build a measurement application of his own, aiming at even more comprehensive and more precise distortion and frequency-response measurement.

The signal path

Everything in Phonalyser hangs off one loop: synthesized samples leave through the DAC, pass through the device under test, return through the ADC, and are distributed to the analysis views through a shared ring buffer.

Signal generator DDS synthesis Quantizer TPDF dither + PCM Playback engine audio backend DAC output device DUT device under test ADC input device Capture engine audio backend Capture session PCM → [-1,+1] Ring buffer last 22 s, stereo Oscilloscope reads "now" FFT analyser reads a gap-free stream Frequency response exclusive sweep capture one independent read cursor per consumer

The modules and what they are for

Signal generator - the stimulus source. Produces calibrated test signals: a spectrally pure sine for distortion measurements, two tones for intermodulation, white/pink noise, linear and logarithmic sweeps, and a compensated sine that actively cancels the playback chain's own distortion so the DUT receives a cleaner signal than the DAC alone can produce. Output level is set in volts, against the DAC calibration.

Oscilloscope - the time-domain view. This is where you look first: is the signal there at all, is it clipping, does it carry DC or mains hum, what are Vpp / Vrms / frequency? A spectral number is only worth trusting after the time-domain picture looks sane.

FFT analyser - the frequency-domain workhorse. Shows the spectrum and measures THD, THD+N, SNR, SINAD/ENOB and the individual harmonics; in two-tone mode the intermodulation products. Coherent averaging digs signals out far below the single-shot noise floor.

Frequency response - the swept measurement. Plays a logarithmic sweep through the DUT and computes its transfer function - magnitude and phase across the whole band in seconds. Results can be compared against RIAA / IEC curves or saved as calibration files the FFT analyser later de-embeds.

Full theory chapters

Each chapter is a page in this guide (the same engineering theory is also served inside the app and the web version):

Design themes you will meet everywhere