Go bindings for fftw3

Go bindings for FFTW v3.2.2 Maintained by Jonathan Wills: [email protected] Feel free to email me patches, suggestions or bugs.

FFTW homepage: http://www.fftw.org/ Documentation for the latest version: http://www.fftw.org/fftw3_doc/

These bindings are incomplete, but should include enough functionality that you can do whatever transforms you need (perhaps not as easily as you would like, for now). The function definitions do not mirror exactly what is written in the docs. For example, passing arrays does not require passing the size of the arrays.

Usage: Here is an example of doing a simple DFT with these bindings

data := fftw.NewArray(64) // Similar to calling make([]complex128, 64)
forward := fftw.NewPlan(data, data, fftw.Forward, fftw.Estimate)
backward := fftw.NewPlan(data, data, fftw.Backward, fftw.Estimate)
defer forward.Destroy()  // Make sure to clean things up, since there are allocations happening
defer backward.Destroy() // in c-land somewhere.
// ... fill in data with something interesting
forward.Execute() // Transforms data, in place, to frequency domain
// ... do something interesting with data
backward.Execute() // Returns data, in place, to time domain

Installation: When installing fftw you must compile it as a shared library:

./configure --enable-shared
make
make install

Once installed properly, these bindings can be installed like so:

go get github.com/runningwild/go-fftw
Comments
  • Array definition

    Array definition

    This is not an issue just a commit and question. I have been using your go-fftw in my signal processing programs since you first posted it. I think it is a great addition to Go. It adds great value to Go for DSP applications that need FFTs. However, I prefer the older Array definition, Alloc2d(N1,N2) over the latest. The former allows easy access to Go's normal slice and array definitions, namely I used make(X[] complex128 , N1*N2) or slices of slices such as X[N1][N2] types in all of my programs. This made it easy to call and return these slices in my functions with go-fftw The current slice or array means I have to use some kind of conversion to get back to original slice or array format. Can you give me an example of how o easily convert back and forth between the two formats. Or better yet how to use the Alloc2d function in the present implementation of go-fftw? I like your current implementation except for the inconvenient Array definition.

    I would appreciate any advice that would make this current version easier to interface

  • The FFT

    The FFT "Measure" option does not seem to work

    I replaced the " Measure" option in place of "Estimate" , In the interest of measuring the improvement in speed. It did not give the same results. I was wondering if that flag was be ignored.

  • Add new array functionality from FFTW

    Add new array functionality from FFTW

    FFTW also allows you to execute a plan on different arrays than the ones for which the plan was originally created. This can be very useful for e.g. calculating large numbers of FFTs on slices of larger arrays. This extends Plan simply to allow for this functionality. A test is created in fftw_test.

  • Single Precision version

    Single Precision version

    Is there a single precision version of FFTW for GO? Or what would it take to convert to single precision. In "C" the single precision version of FFTW is almost 4 times faster.

  • Should now build on 386

    Should now build on 386

    A 1<<30 array size, even for a throwaway pointer, won't build on 386. This avoids that issue by building the slice header without using an array pointer.

Related tags
libsox bindings for go

gosox "SoX − Sound eXchange, the Swiss Army knife of audio manipulation" Go bindings for the libsox sound library For more information and documentati

Nov 22, 2022
Go bindings for the PortAudio audio I/O library

portaudio This package provides an interface to the PortAudio audio I/O library. See the package documentation for details. To build this package you

Jan 1, 2023
Go bindings for libportmidi

portmidi Want to output to an MIDI device or listen your MIDI device as an input? This package contains Go bindings for PortMidi. libportmidi (v. 217)

Dec 25, 2022
Golang bindings for the Telegram Bot API

Golang bindings for the Telegram Bot API All methods are fairly self explanatory, and reading the godoc page should explain everything. If something i

Jan 6, 2023
OpenSSL bindings for Go

OpenSSL bindings for Go Please see http://godoc.org/github.com/spacemonkeygo/openssl for more info License Copyright (C) 2017. See AUTHORS. Licensed u

Dec 29, 2022
Golang bindings for libxlsxwriter for writing XLSX files
Golang bindings for libxlsxwriter for writing XLSX files

goxlsxwriter provides Go bindings for the libxlsxwriter C library. Install goxlsxwriter requires the libxslxwriter library to be installe

Nov 18, 2022
Go bindings for ForestDB

goforestdb Go bindings for ForestDB Building Obtain and build forestdb: https://github.com/couchbaselabs/forestdb (run make install to install the lib

Sep 26, 2022
Go bindings for GLib type system.

Go bindings for GLib type system. This package is designed for building bindings to C libraries based on GLib type system (like GTK, GStreamer, and ot

Aug 13, 2019
Source code editor written in Go using go-gtk bindings. It aims to handle navigation effectively among large number of files.
Source code editor written in Go using go-gtk bindings. It aims to handle navigation effectively among large number of files.

tabby Source code editor written in Go using go-gtk bindings. It aims to handle navigation effectively among large number of files. screenshot: depend

Nov 16, 2022
Duktape JavaScript engine bindings for Go

Duktape bindings for Go(Golang) Duktape is a thin, embeddable javascript engine. Most of the api is implemented. The exceptions are listed here. Usage

Jan 6, 2023
PHP bindings for the Go programming language (Golang)

PHP bindings for Go This package implements support for executing PHP scripts, exporting Go variables for use in PHP contexts, attaching Go method rec

Jan 1, 2023
naive go bindings to the CPython C-API

go-python Naive go bindings towards the C-API of CPython-2. this package provides a go package named "python" under which most of the PyXYZ functions

Jan 5, 2023
Go bindings for Lua C API - in progress

Go Bindings for the lua C API Simplest way to install: # go get github.com/aarzilli/golua/lua You can then try to run the examples: $ cd golua/_examp

Dec 28, 2022
Go bindings for libmagic to detect MIME types

magicmime magicmime is a Go package which allows you to discover a file's mimetype by looking for magic numbers in its content. It could be used as a

Nov 9, 2022
Go bindings for raylib, a simple and easy-to-use library to enjoy videogames programming.
Go bindings for raylib, a simple and easy-to-use library to enjoy videogames programming.

raylib-go Golang bindings for raylib, a simple and easy-to-use library to enjoy videogames programming. Requirements Ubuntu X11 apt-get install libgl1

Dec 28, 2022
Go bindings for the Cartographic Projections Library PROJ.4

The Go package proj provides a limited interface to the Cartographic Projections Library PROJ. For PROJ version 5 and beyond, see also: https://github

Nov 10, 2022
Go bindings for GLFW 3

GLFW 3.3 for Go Installation GLFW C library source is included and built automatically as part of the Go package. But you need to make sure you have d

Jan 8, 2023
Go bindings for GLFW 3

GLFW 3.3 for Go Installation GLFW C library source is included and built automatically as part of the Go package. But you need to make sure you have d

Dec 25, 2022
Go bindings for OpenGL (generated via glow)

gl This repository holds Go bindings to various OpenGL versions. They are auto-generated using Glow. Features: Go functions that mirror the C specific

Dec 12, 2022
Go bindings to OpenGL Utility Library

GLU This package offers minimal bindings for GLU functions. Usage go get github.com/go-gl-legacy/glu License Copyright 2012 The go-gl Authors. All ri

Aug 18, 2018