-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Summary
Build a .apr model for generating synthetic audio noise (white, brown, pink, etc.) using ML/DL techniques. WASM-first approach enables browser-based interactive demos and CLI execution.
Motivation
- Demonstrate
.aprformat capabilities with audio generation - WASM-first architecture for instant web demos
- Showcase ML-based audio synthesis vs traditional DSP
- Provide infinitely customizable noise generation beyond static presets
Requirements
Core Features
-
.aprmodel that generates continuous noise streams - WASM build for browser deployment
- CLI execution via
aprender run noise.apr - Real-time parameter adjustment (no model reload)
Noise Types (via ML generation)
| Type | Characteristics |
|---|---|
| White | Flat frequency spectrum |
| Brown/Red | -6 dB/octave, deeper |
| Pink | -3 dB/octave, balanced |
| Blue | +3 dB/octave, brighter |
| Violet | +6 dB/octave |
| Custom | User-defined spectral profile |
Customization Parameters
- Spectral shape: Arbitrary frequency curve (not just fixed slopes)
- Modulation: LFO on amplitude, frequency bands
- Binaural: Optional stereo offset for binaural beats
- Texture: Grain size, smoothness, rhythmic patterns
- Blend: Mix multiple noise profiles
WASM Demo Interface
┌─────────────────────────────────────────┐
│ 🎵 Noise Generator │
├─────────────────────────────────────────┤
│ Type: [White ▾] [Brown] [Pink] [Custom]│
│ │
│ Spectral Curve: ═══════════╲ │
│ ╲ │
│ Depth: ████████░░ 80% │
│ Texture: ██████░░░░ 60% │
│ Modulation:███░░░░░░░ 30% │
│ │
│ [▶ Play] [⏸ Pause] [💾 Export .apr] │
└─────────────────────────────────────────┘
Technical Approach
Option A: Diffusion-based
- Small diffusion model for audio generation
- Spectral conditioning for noise color
- Higher quality, more compute
Option B: Autoencoder + Decoder
- VAE-style latent space for noise characteristics
- Fast inference, lower memory
- Easier WASM deployment
Option C: Neural vocoder adaptation
- WaveNet/WaveGrad style generation
- Real-time streaming possible
- Most complex
Recommended: Start with Option B for WASM feasibility, iterate to A/C.
Dependencies
aprender::audio(mel, resample - already exists)trueno(SIMD acceleration)wasm-bindgen/web-sys(browser integration)- Web Audio API for playback
Acceptance Criteria
cargo build --target wasm32-unknown-unknown --features audiosucceeds- Demo page loads model and generates audio in <2s
- Parameter changes reflect in audio within 50ms
- Model size <5MB for fast web loading
- Works offline after initial load
References
- WaveNet - Autoregressive audio
- Diffusion models for audio
- Existing
aprender::audio::melfor spectral processing
Metadata
Metadata
Assignees
Labels
No labels