Re: Convolution, channel-selectiveness of effects and spectrograms

Martin Guy <[email protected]> Sat, 29 Nov 2025 14:37:27 +0100
Newsgroups gmane.comp.audio.sox
Message-ID <CAL4-wQryN8BfspWa0tw16MjDz2DX2NmOyo3zdYdOosQ1zFrxQQ@mail.gmail.com>
Thanks, that's all clear now.

> OK as long as buffer size is less than 1522 seconds @ 44100Hz sample rate

I think we can guarantee that!

> // just define FFTPACK_DOUBLE_PRECISION

Good. SoX's internal "fft4g" routine has the same thing:

#ifdef FFT4G_FLOAT
  #define double float
  #define sin   sinf
  #define cos   cosf
  #define atan  atanf

  #define cdft  lsx_cdft_f
  #define rdft  lsx_rdft_f
...

which means some jiggery pokery to compile it twice into different object files
to get both versions (something I was already contemplating for fft4g) and
that means including the pffft source in SoX' source tree to be able to do this,
something that would be necessary anyway as it's not included in many distros,
only ArchLinux, MacPorts and FreeBSD Ports.
https://repology.org/project/pffft/versions

Thanks for your exhaustive analysis of the necessary precision in DFTs.
I will be careful with them.

    M