comfort-fftw

High-level interface to FFTW (Fast Fourier Transform) based on comfort-array

https://hub.darcs.net/thielema/comfort-fftw/

Version on this page:0.0.0.1
LTS Haskell 22.18:0.0.0.1@rev:1
Stackage Nightly 2024-04-24:0.0.0.1@rev:1
Latest on Hackage:0.0.0.1@rev:1

See all snapshots comfort-fftw appears in

BSD-3-Clause licensed and maintained by Henning Thielemann
This version can be pinned in stack with:comfort-fftw-0.0.0.1@sha256:c29087ea6e503dc2fcd448a75e04a2ba030b91a5c2a25bdb8853461ab0d64ece,3046

FFTW claims to be the fastest Fourier Transform in the West. This is a high-level interface to libfftw. We re-use the type classes from netlib-ffi.

Features:

  • Support of one (audio), two (image), three (video) dimensional data, as well as n-dimensional one.

  • Support for batched transformations e.g. for block-wise Fourier transform.

  • No normalization like in plain fftw. This is because I see no universally best place to apply normalization.

The use of comfort-array enables to use array shapes tailored to Fourier transforms:

Shape.Cyclic
for data where the n-1-th element can also be accessed via index -1.
Shape.Half
for complex data of a real-to-complex Fourier transform. It saves you from case distinction between even and odd data length and according mistakes.
Shape.Symmetric
for real-to-real Sine and Cosine transforms. They assert that you will always use the appropriate kind for back transformation.

For rather simple examples see the packages align-audio and morbus-meniere.

See also package fft.