| project | riffstack | |||||
|---|---|---|---|---|---|---|
| type | roadmap | |||||
| status | active | |||||
| date | 2025-11-23 | |||||
| author | Scott Senften | |||||
| keywords |
|
|||||
| beth_topics |
|
Vision: A complete creative compiler stack combining harmony DSL, audio synthesis, and MLIR compilation for unprecedented musical expressiveness and performance.
What Works (as of Oct 2025):
- Stack-based RPN expression evaluation
- 11 DSP operations (sine, lowpass, delay, chorus, etc.)
- YAML patch configuration
- Real audio playback (sounddevice)
- WAV file export
- Parameter references (
$pitch) - CLI interface (
riffstack play,validate,ops) - Example patches (simple_tone, filtered_tone, etc.)
- Audio graph representation
- Operation registry pattern
What's Next: Evolution to complete creative compiler
High-level musical intent language
Enables musicians to describe harmony as movement, not labels:
verse:
start: Cmin11.lush(smooth)
progression:
- +5.bright(anticipate)
- -2.dark(spread)See: Harmony DSL Vision
Mid-level audio synthesis language (current MVP)
Stack-based DSP operations for expressive sound design:
instruments:
- id: pad
expr: "sine $pitch 0.6 chorus 2.0 0.5 reverb 0.8 play"See: RiffStack README
Multi-level compiler infrastructure
Transforms musical intent → optimized audio running on any device:
Harmony IR → Note IR → Audio IR → DSP IR → Machine Code
See: MLIR Architecture
Timeline: Completed Oct 2025 Status: Working CLI audio synthesizer
Achievements:
- Core audio engine operational
- Stack-based DSL proven
- Registry pattern established
- Real-time playback working
Goal: Prototype harmony language with basic voice-leading
Deliverables:
- Motion operator syntax (
+1,-3,T,5) - Chord quality macros (
min11,maj9,7#11,sus4) - Basic voice-leading solver (smooth, common constraints)
- YAML parser for progressions
- MIDI output (proof-of-concept playback)
- 10+ example progressions (ii-V-I, jazz, modal)
Milestone: Can write harmonic progressions and hear MIDI output
Key Questions:
- Constraint solver: SAT/SMT vs heuristic?
- YAML vs custom syntax?
- Relative vs absolute root motion?
Goal: Bridge harmony DSL to RiffStack synthesis
Deliverables:
- Harmony → RiffStack parameter binding
- Multi-track rendering (harmony generates note streams)
- Example compositions (verse/chorus/bridge structures)
- Voice-leading quality validation
- Audio rendering from harmony DSL
Milestone: Full audio synthesis driven by harmony language
Architecture:
Harmony DSL → Note Events → RiffStack Patches → Audio Output
Goal: Production-ready harmony expressiveness
Deliverables:
- Rhythm modifiers (arp, stab, roll, sync, anticipate)
- Generative rules (choose, randomize with weights)
- Mood/color system (lush, bright, dark, empty, rich)
- Multi-scale structure (phrase → section → song)
- Reharmonization algorithms
- Alternative tunings (microtonal, just intonation)
Milestone: Professional composition tool for harmony exploration
Goal: Establish compiler infrastructure
Deliverables:
- Define MLIR dialects:
-
theory- Harmony operations -
note- Pitch/rhythm streams -
audio- RiffStack operations -
dsp- Low-level signal processing
-
- Lowering passes between dialects
- Basic optimization passes
- LLVM backend for CPU
- Benchmark suite
Milestone: Compiled audio engine (CPU only)
Performance Target: <5ms latency @ 48kHz
Goal: Cross-device performance
Deliverables:
- GPU backend (SPIR-V/CUDA)
- WebGPU backend (browser audio)
- Runtime abstraction layer
- Platform-specific optimizations
- Performance profiling tools
Milestone: One source → runs optimized on CPU/GPU/Web
Performance Targets:
| Backend | Latency | Concurrent Voices |
|---|---|---|
| CPU (AVX2) | <5ms | 16 |
| GPU (CUDA) | <3ms | 100+ |
| WebGPU | <20ms | 8-16 |
Goal: Production-ready synthesis capabilities
Deliverables:
- 50+ DSP operations (comprehensive library)
- Live looping implementation (KT Tunstall-style)
- MIDI integration (hardware controller support)
- Pattern sequencing
- Real-time performance mode
- Effect chain optimization
- Preset library
Milestone: Feature-complete audio engine
Goal: Production release
Deliverables:
- Web interface (browser-based editor)
- VST/AU plugin version
- Comprehensive documentation
- Tutorial library
- Community examples
- Performance benchmarks
Milestone: Public v1.0 release
Focus: User-facing DSL syntax and semantics
Activities:
- Harmony DSL grammar finalization
- RiffStack YAML spec evolution
- Example composition library
- User testing & feedback
Focus: MLIR dialects and optimization
Activities:
- Dialect definitions
- Lowering pass implementation
- Optimization strategy
- Backend targeting
Focus: DSP implementation and performance
Activities:
- New operation development
- Buffer management optimization
- Real-time performance tuning
- Device I/O abstraction
Compiler:
- Harmony DSL compiles to MIDI
- Harmony DSL compiles to audio
- MLIR lowers through all dialects
- CPU backend <5ms latency
- GPU backend handles 100+ voices
- WebGPU runs in browser
Audio Quality:
- 48kHz/16-bit minimum
- No audible artifacts (clicks, pops)
- Voice-leading matches human arrangers
- Professional-grade synthesis quality
Developer Experience:
- Compile time <1s for typical patches
- Clear error messages (musical + technical)
- Step-through IR debugging
- Performance profiling tools
Community:
- 1,000+ experimental users (months 6-12)
- 100+ example compositions shared
- 10+ tutorial videos/blog posts
- Active Discord/forum discussions
Production Use:
- 100+ paying users (educational/professional tiers)
- 5+ livecoding performances
- 3+ educational institution adoptions
- Integration requests from DAW vendors
- Can voice-lead ii-V-I smoothly?
- Can generate convincing jazz reharmonization?
- Can create complete song from harmony DSL?
- Do musicians prefer this to typing chord symbols?
- Does MLIR compilation improve performance?
- Can we achieve <10ms end-to-end latency?
- Does WebGPU match native quality?
- Can constraint solver handle complex progressions?
- Will livecoding community adopt this?
- Will educators pay for licenses?
- Is harmony DSL more accessible than Max/MSP?
- Does MLIR differentiate vs SuperCollider/Pure Data?
Risk: Voice-leading constraint solver too slow
- Mitigation: Heuristic fallback, precomputed voicing tables
- Validation: Benchmark on complex progressions
Risk: MLIR learning curve too steep
- Mitigation: Start with interpreter, add compilation later
- Validation: Prototype without MLIR first
Risk: WebGPU audio latency unacceptable
- Mitigation: Focus on CPU/GPU, WebGPU as bonus
- Validation: Early WebGPU prototype testing
Risk: Musicians prefer visual tools (Max/MSP)
- Mitigation: Build web GUI alongside text DSL
- Validation: User testing with both interfaces
Risk: Free tools (SuperCollider, Pure Data) sufficient
- Mitigation: Focus on unique harmony features, not just synthesis
- Validation: Emphasize harmony DSL differentiation
Risk: Too niche (experimental music only)
- Mitigation: Target education market alongside artists
- Validation: Pilot programs with music schools
- Languages: Python (parser), YAML (syntax)
- Libraries: music21 (music theory), constraint (SAT solver)
- Skills: Music theory, language design
- Languages: C++ (MLIR), Python (bindings)
- Libraries: LLVM/MLIR, pybind11
- Skills: Compiler engineering, IR design
- Languages: CUDA/HIP (GPU), WGSL (WebGPU)
- Libraries: Vulkan, WebGPU API
- Skills: GPU programming, parallel computing
- Standalone tool vs Kairo module?
- VST plugin vs web app vs both?
- Educational SaaS vs one-time purchase?
- Pure YAML syntax vs hybrid (YAML + custom DSL)?
- Compile-time vs runtime voice-leading?
- Monolithic compiler vs separate tools?
- Open-source vs proprietary?
- Self-hosted vs cloud rendering?
- Desktop-first vs web-first?
- Harmony DSL Vision - Musical language design
- MLIR Architecture - Compiler infrastructure
- RiffStack README - Current MVP capabilities
- Architecture Patterns - Design philosophy
- Execution Brief - Business context
- Finalize harmony DSL syntax grammar
- Prototype voice-leading constraint solver
- Create 5 example progressions (ii-V-I, modal, jazz)
- Implement basic harmony → MIDI pipeline
- Design
theoryMLIR dialect specification - User testing with musician friends
- Complete Phase 1 (Core Harmony DSL)
- Begin Phase 2 (Harmony + Audio Integration)
- Validate musical quality with real compositions
Last Updated: 2025-11-23 Current Phase: Planning → Phase 1 (Harmony DSL Prototype) Next Milestone: MIDI output from harmony progressions