Skip to content

y0f/mycelium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mycelium

Audio-reactive visual engine in Rust. Captures system audio or microphone input, runs FFT analysis, and drives GPU shaders in real time. Everything pulses to the beat.

Built on wgpu (Vulkan, Metal, DX12), with MIDI/OSC/gamepad control and Lua scripting.

Mycelium running the liquid shader

Quick Start

cargo run -p mycelium-app

Press Tab to open the GUI overlay. Press 1 through 0 to switch between shaders.

Features

  • 10 built-in WGSL shaders (fractal, voronoi, kaleidoscope, reaction diffusion, strobe, etc.)
  • Real-time FFT with 6-band energy, BPM detection, onset detection, spectral analysis
  • Shader hot-reload from disk
  • Audio-to-shader parameter mapping with EMA smoothing and peak hold
  • MIDI CC input for hands-on control
  • OSC input on port 9000
  • Gamepad support via gilrs
  • Lua scripting for custom parameter logic
  • Preset save/load system
  • Config hot-reload from TOML
  • Frame export and video encoding via ffmpeg

Controls

Key Action
Tab Toggle GUI overlay
F11 Fullscreen (borderless)
1-9, 0 Switch shader
Escape Quit

MIDI controllers send CC messages to control shader parameters. OSC messages go to /cc/N or /trigger/N on port 9000.

Project Structure

10-crate workspace:

Crate Purpose
mycelium-core GPU context, plugin bus, config, engine loop, mapping, presets
mycelium-audio Audio capture, FFT, band energy, BPM, onset detection
mycelium-shaders Shader registry, effect presets
mycelium-graph Node-based visual pipeline, topological sort
mycelium-script Lua scripting, WASM plugin stubs
mycelium-io MIDI, OSC, gamepad input
mycelium-ui Overlay module
mycelium-render Frame export, video encoding
mycelium-marketplace Plugin loading, namespaced shader registry
mycelium-app Binary entrypoint

Build

cargo build                    # all crates
cargo test --workspace         # run tests
cargo clippy --workspace       # lint

Optional features:

cargo build --features ml              # ML audio intelligence
cargo build --features scripting-wasm  # WASM plugin runtime

Configuration

Edit config/default.toml for window size, audio input mode, FFT size, and processing parameters. Changes are picked up automatically at runtime.

License

MIT

About

A tiny, audio-reactive visual engine

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors