A pure Rust implementation of Milkdrop visualization engine
OneDrop is a modern, cross-platform music visualizer inspired by the legendary Milkdrop. Built entirely in Rust, it provides high-performance audio-reactive visualizations with full compatibility with .milk preset files.
- π¦ Pure Rust - Memory-safe, fast, and reliable
- π Modern GPU - wgpu for Vulkan, Metal, DX12, OpenGL
- π¨ 98% preset compatibility - Works with nearly all MilkDrop presets
- β‘ 30+ math functions - Complete mathematical expression support
- π΅ Real-time audio - FFT analysis with bass/mid/treb extraction
- π― Beat detection - 6 hardcut modes (MilkDrop3 complete)
- π‘οΈ Error recovery - Never crashes, always continues rendering
- π₯οΈ Cross-platform - Windows, macOS, Linux
- Modular design: 8 independent crates
- Well-tested: 94+ passing tests
- Documented: Comprehensive inline documentation
- Performant: 60 FPS at 1920x1080
git clone https://github.com/all3f0r1/OneDrop.git
cd OneDrop
cargo build --releasecargo run --release -p onedrop-guiControls:
β/βorN/P: Navigate between presetsF8: Cycle beat detection modes (Off β HardCut1-6)R: Reset current presetQ: Quit
# Show preset information
cargo run --release -p onedrop-cli -- info preset.milk
# Validate a preset
cargo run --release -p onedrop-cli -- validate preset.milk
# Render frames
cargo run --release -p onedrop-cli -- render preset.milk --frames 120
# List presets
cargo run --release -p onedrop-cli -- list ./test-presets[dependencies]
onedrop-engine = { git = "https://github.com/all3f0r1/OneDrop" }use onedrop_engine::{EngineConfig, MilkEngine};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = EngineConfig::default();
let mut engine = MilkEngine::new(config).await?;
engine.load_preset("preset.milk")?;
loop {
let audio_samples = capture_audio();
engine.update(&audio_samples, 0.016)?;
display(engine.render_texture());
}
}| Crate | Description | LOC | Status |
|---|---|---|---|
onedrop-parser |
Parse .milk files | ~2,000 | β |
onedrop-eval |
Expression evaluation | ~1,500 | β |
onedrop-renderer |
GPU rendering | ~3,000 | β |
onedrop-engine |
Visualization engine | ~2,500 | β |
onedrop-cli |
CLI interface | ~300 | β |
onedrop-gui |
GUI application | ~500 | β |
onedrop-codegen |
Code generation | ~200 | β |
Total: ~12,500 lines of Rust code
| Metric | Value |
|---|---|
| Preset compatibility | 98% (49/50 tested) |
| Simple presets | 100% (19/19) |
| Medium presets | 100% (20/20) |
| Complex presets | 91% (10/11) |
| Rendering | 60 FPS @ 1080p (target) |
| Memory usage | < 50 MB typical |
- Beat detection (6 HardCut modes)
- GUI integration (F8 key)
- 14 comprehensive tests
- 30+ math functions
- Type conversion (Int β Float)
- Variable auto-initialization
- Compatibility: 6% β 52%
- milkif() function (game changer!)
- Boolean arithmetic
- Compatibility: 52% β 98% π
- Production-ready
- GUI rendering complete
- Audio input integration
- User documentation
- Binary releases
- Per-pixel equations
- Custom shapes
- Waveform modes (all 8)
- Performance optimizations
- Double-preset rendering
- 27 blend patterns
- Preset transitions
- .od2 format support
- Production stability
- Complete compatibility
- Performance optimizations
- Community features
cargo build --allcargo test --allcargo doc --openEach crate has comprehensive documentation:
- onedrop-parser - Preset parsing
- onedrop-eval - Expression evaluation
- onedrop-renderer - GPU rendering
- onedrop-engine - Complete engine
- onedrop-cli - CLI usage
- onedrop-gui - GUI usage
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new features
- Run
cargo clippyandcargo test - Submit a Pull Request
MIT License - See LICENSE file for details.
- Ryan Geiss - Original Milkdrop creator
- MilkDrop3 - Modern enhancements
- projectM - Cross-platform reference
- Rust community - Amazing ecosystem
- Repository: https://github.com/all3f0r1/OneDrop
- Issues: https://github.com/all3f0r1/OneDrop/issues
Made with π¦ and β€οΈ by the OneDrop team