b2KIT

Signal Generator & Visualizer

Generate sine, square, triangle, and sawtooth waveforms. Mix signals, apply AM/FM modulation, and view time/frequency domains.

Tested tool guide Tested browser tools Checked August 16, 2026

What Signal Generator & Visualizer does, with a checked example

Signal Generator & Visualizer creates the four classic test waveforms - sine, square, triangle, sawtooth - from the frequencies and amplitudes you set, and draws each result twice: as a time plot (amplitude against time) and as a frequency plot (the spectrum of the component frequencies). Signals can be mixed together or used to modulate a carrier with AM or FM. The thing most people get wrong is reading one view alone: a clean square wave is secretly an infinite ladder of odd harmonics, and AM sidebands are completely invisible in the time plot.

Worked example

A concrete input and expected output from the current implementation.

Input

Carrier: sine, 1000 Hz, amplitude 1. Modulator: sine, 100 Hz. AM on, depth 50%.

Expected output

Time view: a 1000 Hz sine whose envelope swells between 0.5 and 1.5, breathing 100 times per second. Frequency view: three lines - 1000 Hz at height 1, plus sidebands at 900 Hz and 1100 Hz, each at height 0.25.

At depth m, AM produces sidebands at f_c +/- f_m with amplitude m/2 of the carrier, so 0.5/2 = 0.25. The envelope spans 1 +/- m, hence 0.5 to 1.5, and a 100 Hz modulator places the sidebands 100 Hz either side of the carrier.

How the result is produced

1

Turning parameters into a curve

Each generator is evaluated at evenly spaced instants across the time window you view: a sine makes one smooth oscillation per period, a square wave flips between +A and -A, a triangle ramps linearly up then down, and a sawtooth ramps up and snaps back to zero. Mixing adds the generators point by point, which is why two close sines show the slow swelling envelope of a beat.

2

What the spectrum is telling you

The frequency view decomposes the sampled signal into its component frequencies - the same analysis that turns a recorded sound into a spectrum. A pure sine is a single line. A 50%-duty square wave is a comb of odd harmonics at 3f, 5f, 7f, ... with heights 1/3, 1/5, 1/7 of the fundamental; a sawtooth keeps every harmonic, which is why its spectrum looks denser and brighter.

Good uses

  • Choosing a filter cutoff: see that a 1 kHz square wave carries energy at 3, 5, 7 kHz at 1/3, 1/5, 1/7 amplitude, so you know where to set a low-pass.
  • Understanding AM radio: with a 1000 Hz carrier, 100 Hz tone, and 50% depth, watch sidebands appear at 900 and 1100 Hz - the spectral fingerprint of AM.
  • Disentangling a signal that looks like one tone: 1000 Hz and 1100 Hz mixed look like a wobbling single tone in time, but the spectrum reveals two clean lines.

Limits and checks

  • Frequency resolution is set by the time span: the spectrum separates frequencies only down to about the reciprocal of the time shown. A 200 ms window barely splits 1000 Hz from 1005 Hz; a 20 ms window merges them into one broadened line.
  • The display is sampled, so its range is finite: a sawtooth's spectrum truly extends to infinite frequency, but the plot stops at the top of its range, and harmonics above half the sampling rate fold back (alias) and appear at mirrored positions. Distrust lines near the top edge.
  • The two views scale differently: two in-phase sines of amplitude 1 mix to a time-domain peak of 2, while the spectrum shows two lines of height 1. Line height is amplitude per component, not the signal peak, so compare lines within one plot only.

Common questions

Why does my 440 Hz square wave show no peak at 880 Hz?

A standard square wave contains only odd harmonics of the fundamental. Its spectrum has lines at 440, 1320, 2200, and 3080 Hz (k = 1, 3, 5, 7) with heights 1, 1/3, 1/5, 1/7 of the fundamental; the even multiples at 880 and 1760 Hz are exactly zero. A triangle wave has the same odd-only structure with even faster decay.

Can this tool play the waveform as sound or export audio?

No. It generates and plots waveforms and their spectra; it does not render audio you can hear or produce audio files you can download. If you need audible output, take the same frequency, amplitude, and waveform settings into a DAW, tone generator, or the Web Audio API, which implements the same four oscillator shapes.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools