hommage-0.0.5: doc/Sound.Hommage.FFT.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><TITLE
>Sound.Hommage.FFT</TITLE
><LINK HREF = "haddock.css" REL = "stylesheet" TYPE = "text/css"
></HEAD
><BODY
><TABLE CLASS = "vanilla" CELLSPACING = "0" CELLPADDING = "0"
><TR
><TD CLASS = "topbar"
><TABLE CLASS = "vanilla" CELLSPACING = "0" CELLPADDING = "0"
><TR
><TD
><IMG SRC = "haskell_icon.gif" WIDTH = "16" HEIGHT = "16" ALT = " "
></TD
><TD CLASS = "title"
></TD
><TD CLASS = "topbut"
><A HREF = "Sound.Hommage.html"
>Parent</A
></TD
><TD CLASS = "topbut"
><A HREF = "index.html"
>Contents</A
></TD
><TD CLASS = "topbut"
><A HREF = "doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS = "modulebar"
><TABLE CLASS = "vanilla" CELLSPACING = "0" CELLPADDING = "0"
><TR
><TD
><FONT SIZE = "6"
>Sound.Hommage.FFT</FONT
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD
><TABLE CLASS = "vanilla" CELLSPACING = "0" CELLPADDING = "0"
><TR
><TD CLASS = "section4"
><B
>Contents</B
></TD
></TR
><TR
><TD
><DL
><DT
><A HREF = "#1"
> FFT</A
></DT
><DT
><A HREF = "#2"
> FFT</A
></DT
></DL
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "section1"
>Description</TD
></TR
><TR
><TD CLASS = "doc"
> This module implements the Fast Fourier Transformation purely in Haskell.</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "section1"
>Synopsis</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "body"
><TABLE CLASS = "vanilla" CELLSPACING = "0" CELLPADDING = "0"
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afft"
>fft</A
> :: Int -> [Double] -> [[Complex Double]]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afft'"
>fft'</A
> :: Int -> [Complex Double] -> [Double]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afftt"
>fftt</A
> :: Int -> ([[Complex Double]] -> [Complex Double]) -> [Double] -> [Double]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afftc"
>fftc</A
> :: Int -> [Complex Double] -> [[Complex Double]]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afftc'"
>fftc'</A
> :: Int -> [Complex Double] -> [[Complex Double]]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Affttv"
>ffttv</A
> :: Int -> [Double] -> [Double] -> [Double]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afftco"
>fftco</A
> :: Int -> [Complex Double] -> [[Complex Double]]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afftco'"
>fftco'</A
> :: Int -> [Complex Double] -> [Complex Double]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Arect_transform"
>rect_transform</A
> :: (Floating a) => Int -> [a] -> [[a]]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Arect_filter"
>rect_filter</A
> :: (Floating a) => Int -> ([[a]] -> [[a]]) -> [a] -> [a]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Arect_filter'"
>rect_filter'</A
> :: (Floating a) => Int -> [[a]] -> [a] -> [a]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Ai"
>i</A
> :: Complex Double</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Aw"
>w</A
> :: Int -> Complex Double</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Aws"
>ws</A
> :: Bool -> Int -> [Complex Double]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Amap2"
>map2</A
> :: (a -> a -> b) -> [a] -> [b]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Azip2"
>zip2</A
> :: [a] -> [a] -> [a]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Aappendpair"
>appendpair</A
> :: ([a], [a]) -> [a]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Areorder"
>reorder</A
> :: Int -> [[a]] -> [[a]]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Areorder_init'"
>reorder_init'</A
> :: [a] -> [[a]]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Abutterfly"
>butterfly</A
> :: Complex Double -> Complex Double -> Complex Double -> (Complex Double, Complex Double)</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Abutterfly'"
>butterfly'</A
> :: Complex Double -> Complex Double -> Complex Double -> (Complex Double, Complex Double)</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afft_level"
>fft_level</A
> :: [Complex Double] -> [[Complex Double]] -> [[Complex Double]]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afft_merge"
>fft_merge</A
> :: [Complex Double] -> [Complex Double] -> [Complex Double] -> ([Complex Double], [Complex Double])</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afft_level'"
>fft_level'</A
> :: [Complex Double] -> [[Complex Double]] -> [[Complex Double]]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Afft_merge'"
>fft_merge'</A
> :: [Complex Double] -> [Complex Double] -> [Complex Double] -> ([Complex Double], [Complex Double])</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Aoverlap_curve"
>overlap_curve</A
> :: Int -> [Double]</TD
></TR
><TR
><TD CLASS = "s8"
></TD
></TR
><TR
><TD CLASS = "decl"
><A HREF = "#v%3Amix_overlap"
>mix_overlap</A
> :: Int -> [[Double]] -> [Double]</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "section1"
><A NAME = "1"
> FFT</A
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afft"
></A
><B
>fft</B
> :: Int -> [Double] -> [[Complex Double]]</TD
></TR
><TR
><TD CLASS = "doc"
> FFT transformation. Input is grouped into overlapping parts of 2^(N+2) reals and mapped to sublists
with 2^(N+1) complex numbers. </TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afft'"
></A
><B
>fft'</B
> :: Int -> [Complex Double] -> [Double]</TD
></TR
><TR
><TD CLASS = "doc"
> Inverse FFT transformation. Complex input is grouped into parts with length 2^(N+1) and mapped to
sublists with 2^(N+2) reals, which are overlapped and mixed.</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afftt"
></A
><B
>fftt</B
> :: Int -> ([[Complex Double]] -> [Complex Double]) -> [Double] -> [Double]</TD
></TR
><TR
><TD CLASS = "doc"
> FFT transformation with overlapping and windowing.
Argument function maps the coefficients. Windowsize: 2^(N+2), i. e. 2^(N+1) coefficients</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "section1"
><A NAME = "2"
> FFT</A
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afftc"
></A
><B
>fftc</B
> :: Int -> [Complex Double] -> [[Complex Double]]</TD
></TR
><TR
><TD CLASS = "doc"
> FFT transformation for complex input (segments of length 2^n).
No overlapping or windowing.</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afftc'"
></A
><B
>fftc'</B
> :: Int -> [Complex Double] -> [[Complex Double]]</TD
></TR
><TR
><TD CLASS = "doc"
> Inverse FFT transformation for complex input (segments of length 2^n).
No overlapping or windowing.</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Affttv"
></A
><B
>ffttv</B
> :: Int -> [Double] -> [Double] -> [Double]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afftco"
></A
><B
>fftco</B
> :: Int -> [Complex Double] -> [[Complex Double]]</TD
></TR
><TR
><TD CLASS = "doc"
> FFT for complex input with overlapping. Segment-size: 2^(n+1)</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afftco'"
></A
><B
>fftco'</B
> :: Int -> [Complex Double] -> [Complex Double]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Arect_transform"
></A
><B
>rect_transform</B
> :: (Floating a) => Int -> [a] -> [[a]]</TD
></TR
><TR
><TD CLASS = "doc"
> A self-inverse transformation similar to FFT but with a simple butterfly
operation that uses always W=1. Modifying the data between application
and inverse is similar to filtering but the result will be built up from
rectangle waves instead of sinus waves.</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Arect_filter"
></A
><B
>rect_filter</B
> :: (Floating a) => Int -> ([[a]] -> [[a]]) -> [a] -> [a]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Arect_filter'"
></A
><B
>rect_filter'</B
> :: (Floating a) => Int -> [[a]] -> [a] -> [a]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Ai"
></A
><B
>i</B
> :: Complex Double</TD
></TR
><TR
><TD CLASS = "doc"
> The complex value <TT
><A HREF = "Sound.Hommage.FFT.html#v%3Ai"
>i</A
></TT
> = <TT
>(0 :+ 1)</TT
></TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Aw"
></A
><B
>w</B
> :: Int -> Complex Double</TD
></TR
><TR
><TD CLASS = "doc"
> The n-th root of 1</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Aws"
></A
><B
>ws</B
> :: Bool -> Int -> [Complex Double]</TD
></TR
><TR
><TD CLASS = "doc"
> the 2n-th root with exponents 0, 1, .. n. False=inverse (exponents are negated)</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Amap2"
></A
><B
>map2</B
> :: (a -> a -> b) -> [a] -> [b]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Azip2"
></A
><B
>zip2</B
> :: [a] -> [a] -> [a]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Aappendpair"
></A
><B
>appendpair</B
> :: ([a], [a]) -> [a]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Areorder"
></A
><B
>reorder</B
> :: Int -> [[a]] -> [[a]]</TD
></TR
><TR
><TD CLASS = "doc"
> list is grouped into sublists with length N (must be power of 2) and bitwise reverse order</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Areorder_init'"
></A
><B
>reorder_init'</B
> :: [a] -> [[a]]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Abutterfly"
></A
><B
>butterfly</B
> :: Complex Double -> Complex Double -> Complex Double -> (Complex Double, Complex Double)</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Abutterfly'"
></A
><B
>butterfly'</B
> :: Complex Double -> Complex Double -> Complex Double -> (Complex Double, Complex Double)</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afft_level"
></A
><B
>fft_level</B
> :: [Complex Double] -> [[Complex Double]] -> [[Complex Double]]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afft_merge"
></A
><B
>fft_merge</B
> :: [Complex Double] -> [Complex Double] -> [Complex Double] -> ([Complex Double], [Complex Double])</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afft_level'"
></A
><B
>fft_level'</B
> :: [Complex Double] -> [[Complex Double]] -> [[Complex Double]]</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Afft_merge'"
></A
><B
>fft_merge'</B
> :: [Complex Double] -> [Complex Double] -> [Complex Double] -> ([Complex Double], [Complex Double])</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Aoverlap_curve"
></A
><B
>overlap_curve</B
> :: Int -> [Double]</TD
></TR
><TR
><TD CLASS = "doc"
> Creates a fade with length N</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "decl"
><A NAME = "v%3Amix_overlap"
></A
><B
>mix_overlap</B
> :: Int -> [[Double]] -> [Double]</TD
></TR
><TR
><TD CLASS = "doc"
> Overlaps a sequence of parts of length N (overlaps by N/2).</TD
></TR
><TR
><TD CLASS = "s15"
></TD
></TR
><TR
><TD CLASS = "botbar"
>Produced by <A HREF = "http://www.haskell.org/haddock/"
>Haddock</A
> version HADDOCK_VERSION</TD
></TR
></TABLE
></BODY
></HTML
>