Search guides and the APICtrl K
  1. API reference
  2. DSP

impulse.h

Impulse responses, prepared for convolution.

#include <sonore/impulse.h>
On this page

Design notes

Convolver in fft.h takes a mono array of samples and convolves fast. What a convolution REVERB needs on top of that is everything between a file on disk and that array, and it is more than it looks:

  • the file is at ITS rate, not the session's, and an IR played at the wrong rate is transposed: a hall becomes a bathroom;
  • a stereo IR is two responses, not one interleaved stream;
  • loading two IRs at the same peak does NOT make them equally loud, so normalising by peak leaves the user riding the mix control every time they change preset;
  • a recorded IR usually starts with silence, which is pre-delay the user did not ask for.

All of it is offline work: this reads files, allocates and resamples, so it belongs in prepare() or a message-thread handler, never in process().

Types 1

A loaded, rate-matched impulse response, one array per channel.

Channels are kept SEPARATE rather than interleaved because that is what a convolver wants: one partitioned FFT per channel, each fed its own response.

Enums 1

↑↓ to move↵ to openEvery public name in the headers, and every guide