This chapter explains how Phonalyser.web 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 module chapters (Generator, Oscilloscope, FFT analyser).
Everything in Phonalyser.web 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 - 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? Triggering, per-channel scaling and a running measurement table work like on a bench scope. 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; mains rejection, calibration de-embedding and a manual fundamental reference handle real-world measurement setups (notch filters, attenuators, known source levels).
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 that the FFT analyser later de-embeds from its own measurements.
Underneath all of them sit the two infrastructure layers this chapter describes: the audio backend (the bit-exact bridge to the sound hardware) and the ring buffer (the shared memory that lets every view read the same capture independently).