Skip to content

GassiusODude/jdsp

Repository files navigation

jdsp

[TOC]

jdsp is my initial attempt at building a library for signal processing in the Java language.

Install

Dependencies Description License Added
JDK21 Migrated to JDK 21 to support jdk.incubator.vector 2026-01-17
Efficient Java Matrix Library (EJML) External matrix library LICENSE 2026-01-18
Apache Commons Math 3 Math library LICENSE-2.0 2026-01-21

To install, perform the following actions.

  1. Build
        # Build
        $ gradlew build
    
        # Run Test
        $ gradlew test
    
        # Run Example (run the jar and add the incubator)
        $ gradlew runJar
  2. Generate Javadoc
        $ gradlew javadoc
  3. Publish jdsp to the local maven repository to be used in another project (for development only)
        $ gradlew publishToMavenLocal
    • Recommendation is to specify version with SNAPSHOT (i.e. v1.0.2-SNAPSHOT)
  4. Install
    • Add the jar file to the $CLASSPATH
  5. Run
        java --add-modules jdk.incubator.vector -jar build/libs/jdsp-$VERSION.jar
  6. Compiling FAT Jar
        # Use fat jar so it includes dependencies
        $ gradlew shadowJar

Github Action

  • Set up Java environment with a gradle check
  • Create a fat JAR (to include dependencies)
  • If tagged
    • Push release to Github, allowing other devs to pull the built fat JAR.
    • Push to Github Maven, allowing Java projects to pull.

Examples

Example: Creating and applying a Filter object

    import jdsp.filters.Filter;
    // constructor defaults to moving average filter
    Filter f = new Filter(11);
    // update filter
    f.designFilter(101, "HAMMING", 0.1);

    // apply filter
    float[] data0 = {1.0f, 2.0f, 3.4f};
    float[] data1 = {1.0f, 2.0f, 3.4f};
    float [] out1, out2;
    out1 = f.applyFilter(data0);

    // continue filter on second data segment
    out2 = f.applyFilter(data1);

Example Plots and Figures

Some functionality was created with Java Swing to provide visual tools to be used with this package.

Filter Design

About

This is a library to perform general signal processing in Java.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors

Languages