DSP · C++ / MATLAB / JS

DSP Toolkit & Spectrum Analyzer

An interactive signal-processing lab. Everything runs in your browser on a JavaScript port of a tested C++17 library, with a matching MATLAB script. Topics: sampling and aliasing, FIR filter design, decimation and interpolation, AM/FM and ASK/BPSK/16-QAM modulation, and FFT-based vs swept-tuned spectrum analysis.

Time domain

The continuous tone, its samples, and the lowest-frequency sinusoid that passes through those samples.

Analog toneSamplesAlias seen after sampling

Spectrum of the sampled signal

Magnitude response |H(f)|

fs = 48 kHz

Impulse response h[n]

Symmetric taps mean linear phase (constant group delay).

Input spectrum (fs = 48 kHz)

After decimation (fs / M)

Naive downsampling (aliased)Anti-alias filtered

Analog modulation

Modulated carrierMessageDemodulated

Received constellation

Symbols plus AWGN; decision regions from the slicer.

Bit error rate vs Eb/N0

SimulatedTheory

Displayed spectrum: tone 1 at 5 kHz (0 dB), tone 2 adjustable, noise floor ≈ −100 dB

FFT analyzerSwept-tuned analyzer