A microphone-driven Web Audio and raw WebGL example for the Junkpile Tauri v2 essentials collection.
The application captures a selected audio-input device, analyzes it locally with an AnalyserNode, uploads the complete FFT and waveform arrays to one-dimensional WebGL textures, and also derives smoothed musical bands for direct shader uniforms.
Microphone MediaStream
↓
MediaStreamAudioSourceNode
↓
GainNode
↓
AnalyserNode
├── frequency bins → WebGL FFT texture
├── waveform bytes → WebGL waveform texture
└── reduced bands → sub / bass / mid / high / air / RMS
↓
adaptive beat pulse
↓
GLSL visual + feedback buffers
The analyser is deliberately not connected to the speakers. Microphone audio is measured but not monitored, avoiding feedback and echo.
npm install
npm run dev
Press Start microphone, approve the operating-system permission prompt, and then choose an input device if more than one is available.
The project includes:
src-tauri/Info.plist with NSMicrophoneUsageDescriptionsrc-tauri/entitlements.plist with com.apple.security.device.audio-inputtauri.conf.jsonIf permission was previously denied, enable the application under System Settings → Privacy & Security → Microphone.
13-tauri-v2-audio-reactive-fft/
├── package.json
├── src/
│ ├── index.html
│ ├── styles.css
│ └── app.js
└── src-tauri/
├── Cargo.toml
├── Info.plist
├── entitlements.plist
├── tauri.conf.json
├── capabilities/default.json
└── src/main.rs
The WebView owns microphone capture and WebGL. Rust is intentionally limited to native desktop duties: PNG writing and fullscreen control.