A node-based audio-visual performance system built in Rust with real-time audio synthesis and GPU-accelerated visuals.
- Glicol Live Coding: Real-time audio synthesis and live coding capabilities
- MIDI Support: Full MIDI input/output with device detection and routing
- Audio Analysis: Real-time FFT analysis, beat detection, and spectral analysis
- Audio Synthesis: Advanced synthesis capabilities with multiple oscillators and effects
- GPU-Accelerated Rendering: Using Bevy engine with Vulkan/DirectX support
- Shader Hot-Reload: Real-time shader development and testing
- Post-Processing Pipeline: Customizable visual effects and filters
- Asset Management: Efficient loading and caching of visual assets
- Visual Programming: Node editor for creating complex workflows
- Audio Nodes: Oscillators, filters, effects, analysis nodes
- Visual Nodes: Shaders, post-processing, generators
- Hybrid Workflows: Seamless integration between audio and visual processing
- Rust 1.75+ with Cargo
- Git
- A GPU with Vulkan/DirectX support
- Clone the repository:
git clone https://github.com/vdmo/nuwe-rust.git
cd nuwe-rust- Install Rust dependencies:
cargo build --release- Run the application:
cargo runThe system starts with a rotating cube demo that demonstrates:
- Real-time 3D rendering
- Audio system initialization
- Visual shader effects
- Audio Input: Connect MIDI controllers or audio interfaces
- Live Coding: Use the Glicol syntax for real-time audio synthesis
- Visual Programming: Create node graphs for complex audio-visual mappings
// Example: Audio-reactive visual workflow
AudioInput -> BeatDetector -> AudioToImage -> Display
β β β
MIDI Control -> Parameters -> Visual Effectssrc/
βββ core/ # Core node graph system
β βββ graph.rs # Graph data structures
β βββ node.rs # Node trait and base types
β βββ mod.rs # Core module exports
βββ audio/ # Audio processing system
β βββ glicol.rs # Glicol integration
β βββ midi.rs # MIDI handling
β βββ analysis.rs # Audio analysis
β βββ mod.rs # Audio module
βββ visual/ # Visual rendering system
β βββ shaders/ # Shader management
β βββ effects.rs # Visual effects
β βββ post_processing.rs # Post-processing pipeline
β βββ mod.rs # Visual module
βββ nodes/ # Node implementations
β βββ audio.rs # Audio processing nodes
β βββ visual.rs # Visual processing nodes
β βββ generators.rs # Signal generators
β βββ mod.rs # Node exports
βββ compute/ # GPU compute shaders
βββ lib.rs # Main library file
use crate::core::{Node, NodeId, InputPort, OutputPort, DataType};
use std::collections::HashMap;
use anyhow::Result;
#[derive(Debug, Clone)]
pub struct CustomAudioNode {
pub id: NodeId,
// Custom parameters
}
impl Node for CustomAudioNode {
fn id(&self) -> NodeId { self.id.clone() }
fn name(&self) -> &str { "CustomAudio" }
fn inputs(&self) -> Vec<InputPort> {
vec![InputPort::new("audio_in", DataType::Audio)]
}
fn outputs(&self) -> Vec<OutputPort> {
vec![OutputPort::new("audio_out", DataType::Audio)]
}
fn process(&mut self, inputs: HashMap<String, serde_json::Value>)
-> Result<HashMap<String, serde_json::Value>> {
// Custom processing logic
Ok(HashMap::new())
}
}# Run all tests
cargo test
# Run specific test suite
cargo test audio::tests
cargo test visual::tests- bevy (0.17) - Game engine and app framework
- glicol (0.13) - Live coding audio synthesis
- petgraph (0.6) - Graph data structures
- serde (1.0) - Serialization framework
- cpal (0.15) - Cross-platform audio I/O
- rustfft (6.1) - Fast Fourier Transform
- midir (0.9) - MIDI input/output
- wgpu (26.0) - WebGPU implementation
- naga (26.0) - Shader translation
- image (0.25) - Image processing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Rust naming conventions
- Add tests for new features
- Update documentation
- Ensure all tests pass
- Use
cargo fmtandcargo clippy
This project is licensed under the MIT License - see the LICENSE file for details.
- Bevy Engine - Rust game engine
- Glicol - Live coding audio synthesis
Built with β€οΈ and Rust by Kapil