Drawing a waveform

A second of sound is 44,100 numbers. A screen is a few hundred pixels wide. Every waveform is an answer to how one fits into the other.

1Every Nth sample

Keep one sample per pixel. Fast, and wrong: tones above the pixel rate fold into slow waves that aren't there. Here, a sweep; grey is what it really spans.1

2Lowest and highest

Each pixel column draws from its lowest sample to its highest. No peak is missed. Audacity, Audition and most editors draw this.2

Reading every sample for every column is slow for an hour of audio, so editors keep the lowest and highest of blocks of 256, 512, 1024… samples, made once: a pyramid, read a few blocks a column.2,3

3Loudness inside the peaks

Peaks say how far the sound reaches, not how loud it is. A band of its RMS inside shows the loudness: Audacity's lighter core.2

4Brightness by level

Or shade the fill by how often the sound reaches each level: bright where it lives, dim where it rarely goes. Four guesses from the peak and RMS, of how much passes each level or sits at it,4,5 and two counts of the samples themselves. The last is an oscilloscope's afterglow, bright where a wave turns.6

Power law: 1 − (level / peak)k, k from peak and RMS
Gaussian: erfc(level / RMS√2), noise of that RMS
Laplace, at the level: e−√2·level / RMS, as speech is
Gaussian, at the level: e−level² / 2RMS²
Counted: samples at or past the level
Counted: samples at the level

5Up close

Zoomed in, a sample is a point, not a step. Between points runs the one band-limited curve through them,7 and it can peak above every sample: a quarter-rate tone at 45° has no sample above 71 %, yet reaches 100 %. Meters call that the true peak.8

6Amplitude or decibels

On a linear scale the quiet half of a sound is a hairline. In decibels, tails, fades and room tone show.9

7Colour for frequency

A waveform shows how loud, not how high. Colour can carry the rest, one colour a moment, once the spectrum is folded into it. Software folds it four ways.

Split the sound into lows, mids and highs, and give each a primary: bass red, mids green, a hi-hat blue. Serato colours so,10 as does Engine DJ's RGB.11 Mixxx shows how they mix: it splits at 600 Hz and 4 kHz, adds the three primaries by each band's level, as a screen adds light, and scales the sum until its strongest primary is full, so a full mix runs orange to white.12 rekordbox's RGB reads the same from its files.13,14 djay Pro names four bands: red, yellow, green, blue.15

Or draw each band as a waveform of its own, as tall as the band is loud, the lows under the mids under the highs: rekordbox's 3Band, dark blue, amber and white,13,14 and Mixxx's Filtered.12 Engine DJ's Tri-Band colours its bands blue, green and white,11 and an inMusic patent lays such bands over each other, split at 500 Hz and 5 kHz in its example.16 A mixer's three EQ knobs, drawn.

Or fold the spectrum into one frequency and look it up on a colormap. FL Studio takes the average, red low to blue high, its gradient yours to edit;17 WaveLab the average or the strongest, on a colour bar;18 Freesound the centroid, violet-blue at 100 Hz through green and yellow to orange-red at 22 kHz.19 Traktor keeps its colours and lightens them for the highs.20

REAPER reads two things: the strongest frequency sets the hue, how tonal the moment is sets the saturation, so a whistle is full colour and a hiss grey.21 Here tonal means how far the spectrum is from flat.22 Sound Forge does the same,23 as did Comparisonics' patented colouring in Samplitude, which took each segment's dominant band.24,25

No one agrees which end is red: Serato, FL Studio and Sound Forge put it on the lows, as light's spectrum does; Freesound, Comparisonics and Samplitude on the highs, as a heat map does. Ableton Live and Logic Pro colour a clip by its track or by hand, not by its sound.26

8Two channels

Stereo is two waveforms. Lanes keep them apart. One lane saves the space, each channel in its colour: a pair opposite across grey in the plane of vision that holds brightness still,27,28 equally light, adding back to grey where the channels agree.29 Pretty, but which colour is which side? A sound panned left, or a different take in each channel, reads better in lanes.

9All at once

Every choice above, as controls that combine. Pinch, or scroll with Ctrl held, to zoom at the pointer; drag or scroll sideways to pan.

Reduce Edges Fill Scale Colour

10Where they live

  1. C. E. Shannon, “Communication in the presence of noise,” Proc. IRE 37 (1949): sampling below twice a frequency aliases it.
  2. Audacity Manual, “Audacity Waveform” (peaks and RMS); D. Mazzoni & R. B. Dannenberg, “A fast data structure for disk-based audio editing,” Computer Music Journal 26 (2002): block summaries of 256 and 65,536 samples.
  3. BBC R&D, audiowaveform: min/max pairs at a chosen zoom, for peaks.js.
  4. M. Abramowitz & I. A. Stegun, Handbook of Mathematical Functions (1964), 7.1.26: erfc, for the Gaussian guess.
  5. S. Gazor & W. Zhang, “Speech probability distribution,” IEEE Signal Processing Letters 10 (2003): speech is closer to Laplace than to Gaussian.
  6. Tektronix digital phosphor oscilloscopes (DPO): a trace's brightness by how often it passes a point.
  7. C. Montgomery, Digital Show & Tell, Xiph.Org (2013).
  8. ITU-R BS.1770-4 (2015), Annex 2: true peak by 4× oversampling.
  9. Adobe Audition, iZotope RX: waveform in decibels, a vertical scale option.
  10. Serato, Main Waveform Display (2025): “red representing low frequency bass sounds, green representing mid frequency sounds and blue representing high frequency treble sounds”; EQ Colored Waveforms (2015): cutting a band takes its colour out.
  11. Engine DJ User Guide v5.1.0 (2026), pp. 14, 39: Tri-Band, blue bass, green mids, white treble; RGB, red, green, blue.
  12. Mixxx, source: analyzerwaveform.cpp (4th-order Bessel bands split at 600 Hz and 4 kHz, each band's peak), waveformrendererrgb.cpp (the bands' colours summed, divided by the largest channel), waveformrendererfiltered.cpp (each band drawn over the last), waveformrendererhsv.cpp.
  13. AlphaTheta, rekordbox 7 Operating Instructions (7.2.18), p. 92: waveform colour Blue, RGB or 3Band; Pioneer DJ, CDJ-3000: “3Band Waveform uses different colors to show the volume of each frequency band”.
  14. Deep Symmetry, rekordbox analysis files (reverse-engineered), PWV4–PWV7: RGB as the low, middle and high thirds of the spectrum; 3Band as lows dark blue, mids amber, highs white, the highs drawn last.
  15. Algoriddim, djay Pro: Understanding waveforms: “Red = Bass, Yellow = Low-mid, Green = High-mid, Blue = High frequencies”.
  16. M. Kaletta et al., inMusic Brands, US 10,970,033 B2 (2021), “Systems and methods for generating a visual color display of audio-file data”: superimposed subsidiary waveforms per band, e.g. 20–500 Hz, 500 Hz–5 kHz, 5–20 kHz.
  17. Image-Line, FL Studio manual, General settings: “Colorful waveforms”, Color map (the average frequency, red low to blue high) or Multiband; Themes: Waves, “customize the frequency to color relationship”; FL Studio 21.1 and 21.2 (2023).
  18. Steinberg, WaveLab Pro 12, Rainbow Waveform Settings: average or dominant frequency, colour handles, colour maps.
  19. B. de Jong, Freesound's wav2png, processing.py and color_schemes.py: the spectral centroid, log 100 Hz to 22,050 Hz, on a palette from (50, 0, 200) to (255, 70, 0).
  20. Native Instruments, Traktor Pro 4 Manual (2024), p. 63: “lighter colors represent high frequency content while darker colors represent low frequency content”.
  21. Cockos, REAPER User Guide v7.84, §7.38, pp. 152–156: “the hue is based on the dominant frequency and the saturation is based on the signal's tonality”; spectral peaks since REAPER 5.32 (2017).
  22. J. D. Johnston, “Transform coding of audio signals using perceptual noise criteria,” IEEE J. Sel. Areas Commun. 6 (1988): tonality from spectral flatness, its dB over −60 dB.
  23. Boris FX, Sound Forge: WaveColor: “Low tones are red, mid tones are green, high tones are blue”; saturation by how tonal.
  24. S. V. Rice & M. D. Patten, Comparisonics, US 6,184,898 B1 (2001), “Waveform display utilizing frequency-based coloring and navigation”: a colour for each segment's dominant band, red the highest.
  25. MAGIX, Samplitude Pro X manual, “Comparisonics Farbverlauf”: low tones blue, high green, yellow, red; tonal material clear, noisy grey.
  26. Ableton, Live 12 Reference Manual: a clip takes its track's colour or one chosen; Apple, Logic Pro User Guide: regions coloured individually or by track.
  27. A. M. Derrington, J. Krauskopf & P. Lennie, “Chromatic mechanisms in lateral geniculate nucleus of macaque,” J. Physiol. 357 (1984).
  28. D. H. Brainard, “Cone contrast and opponent modulation color spaces,” in Human Color Vision, 2nd ed. (1996).
  29. B. Ottosson, A perceptual color space for image processing (2020): OKLab.