Giter Site home page Giter Site logo

jipesfft's Introduction

LGPL 2.1 Maven Central Build and Test CodeCov

jipesFFT

Native FFT (Fast Fourier Transformation) implementations for Java (macOS, Windows, Linux).

The macOS version uses Apple's Accelerate framework. Windows and Linux versions use more ordinary implementations.

Installation

jipesFFT is released via Maven. You can install it via the following dependency:

<dependencies>
    <dependency>
        <groupId>com.tagtraum</groupId>
        <artifactId>jipesfft-complete</artifactId>
    </dependency>
</dependencies>

Usage

Here's a simple example that demonstrates how the com.tagtraum.jipesfft.FFT class can be used:

import com.tagtraum.jipesfft.FFT;

class Demo {
    public static void main(final String[] args) {
        // Create a new FFT instance suitable
        // for a window length of 8 samples.
        // Do this in a "try" statement to ensure native resources
        // are freed in a timely fashion.
        try (final FFT fft = new FFT(8)) {
            final float[] result = fft.transform(new float[]{0, 0, 0, 1, 0, 0, 0, 1});
            // real part of the complex result
            float[] real = result[FFT.REAL];
            // imaginary part of the complex result
            float[] imaginary = result[FFT.IMAGINARY];
            // frequencies for the result - must still be multiplied with sampling
            // frequency. Second half of frequency array is not necessarily useful.
            float[] frequencies = result[FFT.FREQUENCY];

            // go on and do something with it...
        }
    }
}

Java Module

jipesFFT is shipped as a Java module (see JPMS) with the name tagtraum.jipesfft.

API

You can find the complete API here.

Additional Resources

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.