Skip to content

ShenyfZero9211/WASAPI_p5

Repository files navigation

WASAPI Bridge for Processing

WASAPI_p5 Demo

English | 中文说明


High-performance system audio capture and analysis library based on Windows WASAPI, specifically designed for Processing.

Why choose WASAPI_p5?

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.

Features

  • 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.

Documentation

Installation

  1. Download this repository.
  2. Place the WasapiBridge folder into your Processing libraries directory (usually Documents/Processing/libraries).
  3. Restart Processing.

Quick Start (Processing Example)

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);
  }
}

Development & Build

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.

Dependencies

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors