Skip to content

all3f0r1/OneDrop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OneDrop 🎨

A pure Rust implementation of Milkdrop visualization engine

License: MIT Rust

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.

✨ Features

Core Capabilities

  • πŸ¦€ 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

Modern Architecture

  • Modular design: 8 independent crates
  • Well-tested: 94+ passing tests
  • Documented: Comprehensive inline documentation
  • Performant: 60 FPS at 1920x1080

πŸš€ Quick Start

Installation

git clone https://github.com/all3f0r1/OneDrop.git
cd OneDrop
cargo build --release

Usage

GUI Application

cargo run --release -p onedrop-gui

Controls:

  • ←/β†’ or N/P: Navigate between presets
  • F8: Cycle beat detection modes (Off β†’ HardCut1-6)
  • R: Reset current preset
  • Q: Quit

CLI Tools

# 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

As a Library

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

πŸ“¦ Project Structure

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

πŸ“Š Performance

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

🎯 Roadmap

v0.7.0 βœ…

  • Beat detection (6 HardCut modes)
  • GUI integration (F8 key)
  • 14 comprehensive tests

v0.8.0 βœ…

  • 30+ math functions
  • Type conversion (Int β†’ Float)
  • Variable auto-initialization
  • Compatibility: 6% β†’ 52%

v0.9.0 (Current) βœ…

  • milkif() function (game changer!)
  • Boolean arithmetic
  • Compatibility: 52% β†’ 98% πŸŽ‰
  • Production-ready

v1.0.0 (Next)

  • GUI rendering complete
  • Audio input integration
  • User documentation
  • Binary releases

v1.1.0 (Future)

  • Per-pixel equations
  • Custom shapes
  • Waveform modes (all 8)
  • Performance optimizations

v1.2.0

  • Double-preset rendering
  • 27 blend patterns
  • Preset transitions
  • .od2 format support

v1.0.0

  • Production stability
  • Complete compatibility
  • Performance optimizations
  • Community features

πŸ”§ Development

Building

cargo build --all

Testing

cargo test --all

Documentation

cargo doc --open

πŸ“š Documentation

Each crate has comprehensive documentation:

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new features
  4. Run cargo clippy and cargo test
  5. Submit a Pull Request

πŸ“ License

MIT License - See LICENSE file for details.

πŸ™ Acknowledgments

  • Ryan Geiss - Original Milkdrop creator
  • MilkDrop3 - Modern enhancements
  • projectM - Cross-platform reference
  • Rust community - Amazing ecosystem

πŸ”— Related Projects

πŸ“§ Contact


Made with πŸ¦€ and ❀️ by the OneDrop team

About

A modern, pure-Rust reimplementation of the Milkdrop music visualizer

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors