Why this guide?

Engineers, acousticians, and developers search for terms like "third octave calculator", "wave to third octaves bands", and "how do I get octave bands from an audio file". This page shows the signal path we use, so you can trust the processing and replicate it in your own pipeline.

Signal chain overview

  • Load PCM audio from the WAV container with the original sample rate preserved.
  • Apply high-pass protection (e.g., 20 Hz) to avoid DC/rumble contaminating the bands.
  • Run the audio through a bank of IIR bandpass filters centered on ISO 1/1 or 1/3-octave frequencies.
  • Square and average each band to obtain energy, then convert to dB (often with A-weighting if required).
  • Optionally decimate or resample the band-level time history for plotting and storage.

IIR filters vs. FIR

Third-octave analyzers frequently use cascaded biquads (IIR) because they are efficient and match IEC/ANSI analog prototypes. A two-pole Butterworth or 4th-order design per band is common; you can use SOS (second-order sections) for numerical stability. FIRs can also work, but require longer kernels to match steep skirts, so IIR keeps CPU lower for streaming analysis.

For each band, design a bandpass with lower/upper edges at 2^(-1/6) and 2^(+1/6) times the center frequency for 1/3-octaves. Convert those edges to normalized digital frequencies using f_edge / (fs/2) before calling your filter designer.

Nyquist, aliasing, and oversampling

The Nyquist limit is fs/2; bands that extend above it will alias unless you resample. If you need bands up to 16 kHz but your file is 24 kHz, either limit the top band or upsample to 48 kHz with a proper low-pass anti-imaging filter. Oversampling can also reduce warping in bilinear-transform designs, but apply a low-pass to avoid mirrored energy.

After filtering, you may decimate slow-moving band levels for storage (e.g., 10 Hz to 1 Hz) as long as you low-pass first to prevent aliasing of the envelope.

Center frequencies and band edges

ISO 266 gives preferred center frequencies. For 1/3-octaves, compute f_c(n) = 1000 * 2^(n/3) where n is an integer index. Limit the set so edges stay within your usable bandwidth: edge_low = f_c / 2^(1/6), edge_high = f_c * 2^(1/6).

Store the band metadata (center, low edge, high edge, order, weighting) alongside the computed levels for traceability.

Poles, zeros, and stability

When you bilinear-transform an analog prototype, zeros map to z = -1 or z = 1 and poles map inside the unit circle. Use SOS form to avoid coefficient drift; verify each pole radius r < 1.0 and that filter magnitude meets IEC 61260-1 tolerances if compliance matters. If you cascade multiple biquads, normalize gain per section to prevent overflow on fixed-point hardware.

From waveform to band levels

  1. Read WAV bytes to float PCM and track the sample rate.
  2. Run each bandpass filter; for stereo, process each channel or sum to mono depending on the use case.
  3. Square the filtered signal, optionally smooth with a short moving average, and integrate over your chosen time window (e.g., 125 ms or 1 s).
  4. Convert power to dB SPL-like units: L = 10 * log10(P / P0) with your reference P0.
  5. Aggregate to overall LAeq or LCeq if you apply weighting curves before or after the bands.

Exporting and using the bands

Typical outputs include CSV columns for time, each center frequency (31.5 Hz through 16 kHz), and optional A/C weightings. For visualization, render waterfall plots or stacked bar charts; for QC, compare band spectra across takes. When targeting embedded devices, pre-compute coefficients offline and load them as a table keyed by sample rate.

Need a working third octave calculator?

Third Octave processes WAV files server-side, turning them into octave and 1/3-octave bands with stable IIR filters, proper Nyquist handling, and traceable metadata. If you need an API or help designing filters for your own pipeline, reach out and we can tailor the coefficients and reporting to your sample rates and hardware.