English | 中文说明
High-performance system audio capture and analysis library based on Windows WASAPI, specifically designed for Processing.
Traditional audio processing often requires installing virtual sound cards (such as Virtual Audio Cable, VoiceMeeter) or relying on specific audio playback platforms. WASAPI_p5 utilizes the native Windows WASAPI Loopback technology to achieve:
- Real-time System Monitoring: Directly capture all audio currently playing through your speakers or headphones.
- Zero External Dependencies: No need to install any third-party software or drivers.
- No Virtual Sound Card Required: No complex audio routing settings needed; just plug and play.
- High-Performance Analysis: The low-level C driver ensures extremely low CPU usage and latency.
- 4096-bin FFT: High-resolution spectrum analysis.
- Built-in Recording: Record system audio directly to 16-bit PCM WAV.
- Beat Detection: Supports energy detection for Kick (Bass), Snare, and Hat.
- Gain & Sensitivity Control: Global gain adjustment and per-band sensitivity settings.
- Low Latency: Direct monitoring of Windows system output via a C-level driver.
- Online API Reference: Detailed class and method descriptions (Javadoc web version).
- Download this repository.
- Place the
WasapiBridgefolder into your Processing libraries directory (usuallyDocuments/Processing/libraries). - Restart Processing.
import wasapibridge.WasapiBridge;
WasapiBridge audio;
void setup() {
size(800, 600);
audio = new WasapiBridge();
audio.init();
}
void draw() {
background(0);
float[] fft = audio.getFFT(1024);
for (int i = 0; i < fft.length; i++) {
rect(i, height, 1, -fft[i] * height);
}
}This project includes C driver source code (native/) and Java wrapper source code (src/).
Use MinGW-w64 to run build.bat to recompile all components.
- JNA (Java Native Access) - Already included in
library/jna.jar.
MIT License
