⚡ Hardware SIMD-accelerated real-time audio pitch detection, SOLA pitch shifting, and zero-allocation DSP filters.
FastAudioProcess provides native C++ AVX2 vector processing for Java audio applications, enabling high-throughput DSP filtering, pitch tracking, and format conversions without Garbage Collection stalls.
import fastaudioprocess.FastAudioProcess;
public class Demo {
public static void main(String[] args) {
// 1. Generate 1 second 440Hz sine wave buffer
float[] audio = new float[44100];
for (int i = 0; i < audio.length; i++) {
audio[i] = (float) Math.sin(2.0 * Math.PI * 440.0 * i / 44100.0);
}
// 2. AVX2 SIMD pitch detection
float pitch = FastAudioProcess.detectPitchNative(audio, 44100);
System.out.printf("Detected pitch: %.2f Hz%n", pitch);
}
}- Why FastAudioProcess?
- Key Features
- Real-World Use Cases
- Performance Benchmarks
- Architecture Overview
- API Quick Reference
- Installation
- Documentation
- Platform Support
- License
- Related Projects
Standard Java audio loops suffer from float boxing overhead, slow software resamplers, and JVM GC pauses that cause real-time audio crackles. FastAudioProcess solves this by:
- AVX2 SIMD Vector Acceleration — Uses 256-bit SIMD registers to process multiple float audio channels in parallel.
- Native Autocorrelation Pitch Tracking — Detects fundamental frequencies (F0) at sub-millisecond speeds.
- SOLA Pitch Shifting — Synchronized Overlap-Add algorithm for pitch modulation without changing playback duration.
- Off-Heap Direct Buffers — Operates directly on native memory buffers to prevent JVM Garbage Collection stutters.
- ⚡ Native AVX2 SIMD Acceleration — Accelerated float audio vector math for 44.1kHz / 48kHz audio streams.
- 🎤 Real-Time Pitch Tracking — High-speed autocorrelation pitch estimator for voice and instrument tuning.
- 🎵 SOLA Pitch Shifter — Native time-domain pitch shifter preserving audio duration and tempo.
- 🎛️ Zero-GC DSP Filters — Multi-channel gain, biquad EQ, and FIR filters operating on off-heap memory.
- 🔄 Interoperable Java Audio Bridge — Seamless conversion to and from standard
javax.sound.sampledformats.
- 🎙️ Live Voice Modulation & Pitch Correction: Auto-tune and pitch correction for real-time voice streaming apps.
- 🎸 Digital Audio Workstations (DAW): High-speed audio effect plugins running on FastAudioCapture streams.
- 🤖 Speech Recognition Preprocessing: Formant analysis and noise suppression for AI speech recognition models.
- 🎮 Game Sound Engines: Multi-channel audio mixer with real-time pitch shifting for sound effects.
In the official JMH Benchmark, FastAudioProcess measured throughput for 44.1kHz audio frame processing:
Benchmark Mode Cnt Score Error Units
JMH_Audio.benchmarkFastAudioProcessPitch thrpt 2 24,118 ops/s
24,000+ Pitch Detections / sec:
FastAudioProcessanalyzes 1-second 44.1kHz audio buffers at 24,118 operations per second with zero JVM Garbage Collection allocations.
FastAudioProcess (This Library — Native DSP Engine)
Provides SIMD-accelerated pitch detection, SOLA pitch shifting, and audio filters.
FastSIMD (Hardware Acceleration Engine)
Provides cross-platform hardware SIMD vectorization primitives.
FastAudioCapture (WASAPI Audio Capture)
Captures low-latency Windows audio streams for FastAudioProcess.
| Method | Description | Path |
|---|---|---|
detectPitchNative(samples, rate) |
AVX2 SIMD pitch detection using autocorrelation. | Reference 📖 |
pitchShiftNative(samples, semitones, rate) |
SOLA native pitch shifter algorithm. | Reference 📖 |
Add the JitPack repository and the complete dependency stack to your pom.xml:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<!-- FastAudioProcess Engine -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastAudioProcess</artifactId>
<version>0.1.1</version>
</dependency>
<!-- FastSIMD Hardware Vector Acceleration Engine -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastSIMD</artifactId>
<version>0.1.3</version>
</dependency>
<!-- FastMemory Aligned Allocator -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastMemory</artifactId>
<version>0.1.1</version>
</dependency>
<!-- FastPointer Address Wrapper -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastPointer</artifactId>
<version>0.1.1</version>
</dependency>
<!-- FastCore Native Loader -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastCore</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.andrestubbe:FastAudioProcess:0.1.1'
implementation 'com.github.andrestubbe:FastSIMD:0.1.3'
implementation 'com.github.andrestubbe:FastMemory:0.1.1'
implementation 'com.github.andrestubbe:FastPointer:0.1.1'
implementation 'com.github.andrestubbe:FastCore:0.1.0'
}Download the required JARs directly to add them to your classpath:
- ⚡ FastAudioProcess-0.1.1.jar (The Core Library)
- 🚀 FastSIMD-0.1.3.jar (Hardware Vector Acceleration Engine)
- 💾 FastMemory-0.1.1.jar (32-Byte Aligned Allocator)
- 📍 FastPointer-0.1.1.jar (Primitive Address Pointer)
- ⚙️ fastcore-0.1.0.jar (Mandatory Native Loader)
Important
All JARs must be included in your classpath for the native SIMD JNI bindings to function correctly.
- CHANGELOG.md: Version history and release notes.
- COMPILE.md: Full compilation guide (MSVC C++17 build chain + JNI Setup).
- REFERENCE.md: Full API contracts and routing logic.
- PHILOSOPHY.md: Off-heap zero-GC memory philosophy.
- ROADMAP.md: Future development goals.
| Platform | Status |
|---|---|
| Windows 10/11 (x64) | ✅ Fully Supported |
| Linux | 🔄 Planned |
| macOS | 🔄 Planned |
MIT License — See LICENSE file for details.
- FastAudioCapture — Low-latency WASAPI audio capture
- FastSIMD — Hardware SIMD acceleration engine
- FastCore — Native JNI loader for FastJava libraries
Part of the FastJava Ecosystem — Making the JVM faster. Small package. Maximum speed. Zero bloat. ⚡
