Blog

dspguide

January 6th, 2026 (permalink)

Well, I finished reading (most of) dspguide. The first half gave me some insights I had either forgotten, or never learned, including the convolution insight of my previous post.

Other insights were about how FFT works, what additional steps are needed for iFFT to work (mainly synthesizing the negtive frequencies), zero-padding tricks for FFT, and the significance of windowing. I'll probably revisit some old projects and fix some stuff. Maybe.

Other parts of the book were less interesting, going into data compression methods that have nothing to do with DSP, and other stuff which I'm already familiar with, and diving deeper into the Laplace and Z-transform math, which I skipped. I remember being really excited about z-transform in school, as you could turn particle systems into linear functions and jump forward and backward in time - something I never actually did.

Some jokes in the book landed, others were less succesful.

The book also is a product of its time, and it was nostalgic to read about internet speeds using a modem, or performance characteristics of 100Mhz computers. A lot of those things are really out of date or at worst misleading today.

Anyway, the "shortcuts and precalculations" I guessed at in previous blog post probably primarily consist of doing FFT, multiplying, and doing iFFT. Which is fine, except that when your IR consists of a million samples and you're doing real time processing, it still leaves some questions open..

Convolution

January 2nd, 2026 (permalink)

As far as I recall - and I may be totally wrong with this - back in school convolution was considered a "black box" being too complex math to get into. Granted, this was an engineering school, not a science one, so if a black box solves your problem, black box is what you'll use. In any case, the result was that I filed convolution under "stuff I don't need to care about".

Turns out, at least on discrete side (as in, dealing with samples, not continous signals), convolution is stupid simple, if computationally expensive (at least in a naive way).

Let's say we have an impulse response (IR); which might be a recording of a click in a tunnel with all its echoes etc.

convolve_ir.ogg

impulse response

Now, we can take any other audio sample, which we'll call the signal.

convolve_signal.ogg

signal

And then, for evey sample in the signal, replace the single sample by the whole IR multiplied with the sample. Sum all of these. So if your signal is just a single sample of value 1, you would output the IR.

Let's say we have sample abcd and IR response of ABC:

aA aB aC
   bA bB bC
      cA cB cD
         dA dB dC

The first output sample would be just a (the first sample in signal) multipled with A (the first sample in IR).
Second sample would be aB plus bA.
Third is aC + bB + cA.
Fourth is bC + cB + dA. And so on.

convolve_out.ogg

signal convolved with IR

And that's it. That's the whole thing.

Obviously if you're using an IR of thousands of samples and input of thousands of samples, this gets computationally rather expensive. I'm sure there are shortcuts and precalculations one can do, as there are realtime convolution filter VSTs out there.

The fun thing is that you can convolve anything with anything; here's the signal convolved with itself:

convolve_out2.ogg

signal convolved with signal

MMXXVI

January 1st, 2026 (permalink)

Here's the new year demo:

And here's a reminder that my Ko-Fi shop exists. If you like my stuff, maybe consider checking it out?

I shouldn't even call these things resolutions, more like a "here's some stuff I should probably look at this year". Considering there's no downside to failing the tasks, I'm not likely to succeed, but hey, if you don't have any goals, you might as well just spend your time staring at a wall..

  • I bought an electric guitar last year. I should try to do something with it daily or at least every second day. At one point I had a goal to just touch a synth keyboard daily, and while I'm not a keyboard player by definition, the year-long project clearly improved me. I'll try something similar with the guitar, maybe.
  • I have a zx spectrum next game project going. I should get it done, even if it sucked.
  • I started reading a DSP basics book. Which may surprise people considering all the audio projects I've done. Anyway, I should go through the book. So far it hasn't really taught me anything new, but it has given me more theoretical background to stuff I've done.

My day cycle is typically; wake up at 7 latest, hit the bed around 22. Due to new year I went to sleep at around 2am, and I've been a total zombie all day. It'll take me a few days to get back to normal routine.