๐ Enhancement Roadmap: cc-dashboard
**Implementation**: ```typescript // New component: TrajectoryGraph.tsx <svg width="300" height="150"> {/* Plot tension over time */} <path d={tensionPath} stroke="red" /> {/* Plot energy over time */} <path d={energyPath} stroke="blue" /> {/* Current time marker */} <line x1={now} x2={now} stroke="white" /> </svg> ```
Full Public Reader
๐ Enhancement Roadmap: cc-dashboard
Current Status: Phase 4 Complete (Predictive Music System Operational)
Date: December 20, 2025
---
๐ฏ Enhancement Categories
### ๐ข Quick Wins (Hours)
Immediate improvements with high impact
### ๐ก Short-term (Days)
Significant features requiring focused work
### ๐ Medium-term (Weeks)
Major capabilities, architectural changes
### ๐ด Long-term (Months)
Research-level innovations
---
๐ข Quick Wins (1-4 hours each)
1. Enhanced Trajectory Visualization
What: 3D trajectory graph showing predicted future
Why: Help users understand what the system is "thinking"
Implementation:
// New component: TrajectoryGraph.tsx
<svg width="300" height="150">
{/* Plot tension over time */}
<path d={tensionPath} stroke="red" />
{/* Plot energy over time */}
<path d={energyPath} stroke="blue" />
{/* Current time marker */}
<line x1={now} x2={now} stroke="white" />
</svg>Impact: Better debugging, user engagement
---
2. Section Transition Hysteresis
What: Require section to be stable for N frames before transitioning
Why: Prevent rapid flickering between sections
Implementation:
// In ConductorEngine.ts
private sectionStabilityCounter: number = 0
private requiredStableFrames: number = 10 // ~200ms at 50 Hz
if (predictedSection !== currentSection) {
this.sectionStabilityCounter = 0
} else {
this.sectionStabilityCounter++
}
if (this.sectionStabilityCounter >= this.requiredStableFrames) {
// Transition is stable, commit it
commitTransition(predictedSection)
}Impact: Smoother, more musical transitions
---
3. Confidence-Based Decisions
What: Only transition when trajectory confidence is high
Why: More reliable predictions = better music
Implementation:
// Use confidence from trajectory
const avgConfidence = trajectory.future
.reduce((sum, f) => sum + f.confidence, 0) / trajectory.future.length
if (avgConfidence > 0.7 && shouldTransition) {
transition(newSection)
} else {
console.log('๐ฎ Low confidence, staying in current section')
}Impact: More conservative, reliable transitions
---
4. Parameter Range Expansion
What: Map to more musical parameters
Why: Richer sonic palette
New Mappings:
// Current: kick_gain, bass_cutoff, hihat_density, pad_reverb
// Add:
- filter_resonance (tension โ 0-1)
- delay_feedback (curvature โ 0-0.9)
- reverb_size (grounding โ 0-1, inverted)
- compression_ratio (velocity โ 1:1 to 8:1)
- stereo_width (left_energy - right_energy โ 0-1)
- pitch_shift (head_pitch โ -12 to +12 semitones)
- distortion (excitement โ 0-0.5)
- swing_amount (watch rhythm_intensity โ 0-50%)Impact: More expressive music
---
5. Keyboard Shortcuts for Sections
What: Manual section override (for testing/performance)
Why: Quick testing, artistic control
Implementation:
// Add to page.tsx keyboard handler
case '1': setSection('intro'); break
case '2': setSection('groove'); break
case '3': setSection('build'); break
case '4': setSection('climax'); break
case '5': setSection('breakdown'); break
case '6': setSection('outro'); break
case '0': enableAutoMode(); break // Return to automaticImpact: Better testing, performance mode
---
6. Section Duration Tracking
What: Track min/max/avg duration per section
Why: Understand musical pacing, tune thresholds
Implementation:
// In conductorStore.ts
sectionHistory: Array<{
section: SectionType
duration: number
startTime: number
endTime: number
avgTension: number
avgEnergy: number
}>
// Analytics
const avgBuildDuration = sectionHistory
.filter(s => s.section === 'build')
.reduce((sum, s) => sum + s.duration, 0) / countImpact: Data-driven tuning
---
๐ก Short-term (1-3 days each)
7. Improved Trajectory Prediction
What: Physics-based prediction with momentum
Why: Simple decay is too pessimistic
Implementation:
class PhysicsTrajectoryPredictor {
predict(current: LatentState, velocity: LatentState) {
// Use current + velocity for better prediction
// Add momentum: future = current + velocity * dt - drag * velocity
// Add noise model for uncertainty
}
}Approach:
- Track velocity (rate of change of latent state)
- Add momentum term
- Model acceleration/deceleration
- Estimate uncertainty bounds
Impact: More accurate predictions
---
8. Gesture-Based Overrides
What: Specific gestures trigger section changes
Why: Performative control, demo mode
Implementation:
// Integrate with existing gesture system
if (gesture.type === 'shake' && gesture.confidence > 0.8) {
forceTransition('climax')
scheduleEvent('crash', 1.0)
}
if (gesture.type === 'swipe_down') {
forceTransition('breakdown')
}Gestures:
- Shake โ Instant climax
- Swipe down โ Breakdown
- Circle โ Build
- Double tap โ Reset to intro
Impact: Interactive performance mode
---
9. Session Recording & Playback
What: Record sessions for analysis/replay
Why: Training data, debugging, demos
Implementation:
interface SessionRecording {
id: string
timestamp: number
duration: number
frames: Array<{
time: number
latentState: LatentState
section: SectionType
trajectory: LatentTrajectory
edits: PatternEdit[]
}>
metadata: {
devices: string[]
avgTension: number
sectionCounts: Record<SectionType, number>
}
}
// Record
const recorder = new SessionRecorder()
recorder.start()
// ... during session, record each frame
recorder.addFrame(latentState, section, trajectory, edits)
recorder.stop()
recorder.save('session_001.json')
// Playback
const player = new SessionPlayer('session_001.json')
player.play() // Replays entire sessionImpact: Training data collection, analysis
---
10. Multi-Device Role Assignment
What: Smart device role detection and assignment
Why: Better music mapping, flexible setup
Current:
- Hardcoded: left phone = bass, right phone = hats
Enhanced:
interface DeviceRole {
device_id: string
role: 'lead' | 'rhythm' | 'bass' | 'harmony' | 'conductor'
confidence: number
assignedBy: 'auto' | 'manual'
}
// Auto-detect based on movement patterns
if (device.avgEnergy > 0.7 && device.avgCurvature > 0.5) {
assignRole(device, 'lead') // Expressive, high energy
} else if (device.rhythmicStability > 0.8) {
assignRole(device, 'rhythm') // Steady, consistent
} else if (device.avgFrequency < 2.0) {
assignRole(device, 'bass') // Slow, grounded
}Impact: Flexible setups, better mappings
---
11. Adaptive Thresholds
What: Learn optimal section transition thresholds per user
Why: Personalization, different movement styles
Implementation:
class AdaptiveThresholds {
private userProfile: {
tensionRange: [min, max]
velocityRange: [min, max]
preferredSectionDurations: Record<SectionType, number>
}
calibrate(sessions: SessionRecording[]) {
// Analyze user's typical ranges
// Adjust thresholds to match their style
// E.g., energetic dancers โ higher thresholds
// subtle dancers โ lower thresholds
}
getThreshold(section: SectionType, metric: string): number {
// Return personalized threshold
}
}Impact: System adapts to YOU
---
12. Section Momentum & Inertia
What: Sections have "weight" - harder to leave some sections
Why: Musical structure, prevent rapid changes
Implementation:
const sectionMomentum: Record<SectionType, number> = {
intro: 0.5, // Easy to leave
groove: 0.8, // Stable, need strong signal to leave
build: 0.6, // Momentum carries into climax
climax: 0.9, // Hard to leave prematurely
breakdown: 0.5, // Easier to transition
outro: 0.7 // Deliberate ending
}
// Require stronger signal to overcome momentum
const requiredConfidence = baseLine + sectionMomentum[current] * 0.3
if (transitionConfidence > requiredConfidence) {
transition(newSection)
}Impact: More stable, musical pacing
---
๐ Medium-term (1-2 weeks each)
13. ML Pattern-Coder
What: Replace rule-based parameter mapping with learned model
Why: More expressive, personalized music
Architecture:
LatentState + Trajectory
โ
Neural Network (trained on user sessions)
โ
PatternEdit predictions
โ
MotionStrudelTraining:
- Collect 20-50 user sessions
- Annotate "good" vs "bad" transitions
- Train model to predict PatternEdits from latent state
- Use trajectory features as input
Model:
# Example PyTorch model
class PatternCoder(nn.Module):
def __init__(self):
self.encoder = nn.Sequential(
nn.Linear(latent_dim + trajectory_dim, 256),
nn.ReLU(),
nn.Linear(256, 128),
nn.ReLU()
)
self.section_head = nn.Linear(128, num_sections)
self.param_head = nn.Linear(128, num_params)
def forward(self, latent, trajectory):
features = self.encoder(torch.cat([latent, trajectory]))
section = self.section_head(features)
params = self.param_head(features)
return section, paramsDeployment:
- Export to ONNX
- Run in browser with onnxruntime-web
- Real-time inference
Impact: Personalized, expressive music
---
14. Neural Audio Synthesis
What: Replace Strudel with neural synthesis
Why: More timbral control, smoother transitions
Options:
1. DDSP (Differentiable Digital Signal Processing)
- Google's neural audio synthesis
- Control pitch, loudness, timbre separately
- Pre-trained models available
2. WaveGAN/WaveNet
- Generate audio directly from latent
- Higher quality, more CPU intensive
3. Hybrid: Strudel structure + DDSP synthesis
- Best of both worlds
Implementation:
import * as ort from 'onnxruntime-web'
class NeuralSynthesizer {
private session: ort.InferenceSession
async init() {
this.session = await ort.InferenceSession.create('ddsp_model.onnx')
}
async synthesize(latent: Float32Array): Promise<Float32Array> {
const input = new ort.Tensor('float32', latent, [1, latent.length])
const output = await this.session.run({ input })
return output.audio.data
}
}Impact: Higher quality audio, more control
---
15. Rehearsal Engine (WASM)
What: Port cc-brain's RehearsalEngine to WASM
Why: More sophisticated trajectory prediction
Current: Simple exponential decay (96 lines TypeScript)
Enhanced: Full physics simulation (cc-brain C++)
Build:
# In cc-brain crate
cargo build --target wasm32-unknown-unknown --release
wasm-bindgen target/wasm32-unknown-unknown/release/cc_brain.wasm --out-dir pkgUsage:
import init, { rehearse_trajectory } from '@/wasm/cc_brain'
await init()
const trajectory = rehearse_trajectory(
current_latent,
current_lexicon,
current_section,
dt,
horizon,
control_policy
)Impact: Production-quality predictions
---
16. Multi-User Ensemble Mode
What: Support multiple dancers simultaneously
Why: Group performances, coordination
Features:
- Each user has own device/color
- Ensemble conductor combines all inputs
- Leader/follower dynamics
- Coordination visualization
Implementation:
interface EnsembleMember {
id: string
color: string
latentState: LatentState
trajectory: LatentTrajectory
role: 'leader' | 'follower' | 'independent'
}
class EnsembleConductor {
combineTensions(members: EnsembleMember[]): number {
// Weighted average based on roles
const leader = members.find(m => m.role === 'leader')
const followers = members.filter(m => m.role === 'follower')
return leader ? leader.latentState.tension * 0.6 +
avgTension(followers) * 0.4
: avgTension(members)
}
}Visualization:
- Multiple trajectory lines (one per user)
- Coherence meter (how in-sync are they?)
- Energy balance (left vs right side of room)
Impact: Group performances, social dancing
---
17. Cloud Deployment & Optimization
What: Deploy to Vercel with optimizations
Why: Share with others, production use
Optimizations:
- Code splitting (lazy load Strudel, conductor)
- WASM caching
- Service worker for offline mode
- WebGL acceleration for viz
Deployment:
# Vercel deployment
vercel --prod
# Environment variables
NEXT_PUBLIC_API_URL=https://cc-mcs-headless-274020562532.us-central1.run.app
NEXT_PUBLIC_ENABLE_ANALYTICS=trueFeatures:
- Analytics (track sessions, popular sections)
- User accounts (save preferences, sessions)
- Public gallery (share recordings)
Impact: Production deployment, scalability
---
๐ด Long-term (Months)
18. Learned Latent Dynamics
What: Train model to predict latent evolution
Why: Better trajectory than hand-coded physics
Approach:
- Collect 1000s of movement sequences
- Train RNN/Transformer to predict latent(t+1) from latent(t)
- Use for trajectory generation
- Model uncertainty
Model:
class LatentDynamicsModel(nn.Module):
def __init__(self):
self.lstm = nn.LSTM(latent_dim, 256, num_layers=2)
self.output = nn.Linear(256, latent_dim + uncertainty_dim)
def forward(self, latent_sequence):
# Predict next 100 frames
predictions = []
hidden = None
for i in range(100):
pred, hidden = self.lstm(latent_sequence[-1:], hidden)
predictions.append(self.output(pred))
return predictionsImpact: Research-quality predictions
---
19. Topological Phase Space Analysis
What: Use cc-trajectory's topological analysis
Why: Detect complex movement patterns
Features:
- Identify attractors (stable movement patterns)
- Detect bifurcations (sudden changes)
- Measure complexity (persistent homology)
- Phase transitions
Integration:
import { TopologicalAnalyzer } from '@/lib/cc-trajectory'
const analyzer = new TopologicalAnalyzer()
const analysis = analyzer.analyze(trajectoryBuffer)
if (analysis.hasAttractor && analysis.complexity > 0.7) {
// Complex, repeating pattern detected
transitionTo('hypnotic_groove')
}
if (analysis.bifurcationDetected) {
// Sudden change in movement dynamics
transitionTo('breakdown')
}Impact: Novel musical interactions
---
20. Real-time Collaboration
What: Multiple users, different locations, synchronized
Why: Remote performances, teaching
Architecture:
User A (NYC) โโโ
โโโโ Cloud Conductor โโโ Synchronized Music
User B (LA) โโโFeatures:
- WebRTC for low-latency state sync
- Distributed conductor (aggregate decisions)
- Latency compensation
- Ghost playback (see partner's movements)
Impact: Remote collaboration
---
๐ฏ Recommended Priority Order
### This Week (Phase 5):
1. โ
Enhanced Trajectory Visualization
2. โ
Section Transition Hysteresis
3. โ
Confidence-Based Decisions
4. โ
Test with real movement extensively
### Next Week:
5. Improved Trajectory Prediction (Physics-based)
6. Gesture-Based Overrides
7. Session Recording & Playback
### Month 1:
8. ML Pattern-Coder (start collecting training data now!)
9. Adaptive Thresholds
10. Multi-Device Role Assignment
### Month 2-3:
11. Neural Audio Synthesis (DDSP)
12. Rehearsal Engine (WASM)
13. Cloud Deployment
### Research Track (Ongoing):
14. Learned Latent Dynamics
15. Topological Analysis
16. Multi-User Ensemble
---
๐ก Quick Impact Matrix
| Enhancement | Effort | Impact | Priority |
|---|---|---|---|
| Trajectory Viz | ๐ข Low | ๐ก Medium | HIGH |
| Hysteresis | ๐ข Low | ๐ข High | HIGH |
| Confidence | ๐ข Low | ๐ข High | HIGH |
| More Params | ๐ข Low | ๐ก Medium | Medium |
| Keyboard Override | ๐ข Low | ๐ก Medium | Medium |
| Session Recording | ๐ก Medium | ๐ข High | HIGH |
| Gesture Override | ๐ก Medium | ๐ก Medium | Medium |
| Physics Trajectory | ๐ก Medium | ๐ข High | HIGH |
| ML Pattern-Coder | ๐ High | ๐ด Very High | HIGH |
| Neural Audio | ๐ High | ๐ด Very High | Medium |
| WASM Rehearsal | ๐ High | ๐ข High | Medium |
| Multi-User | ๐ด Very High | ๐ข High | Low |
---
๐ Success Metrics
Track these to measure improvements:
Musical Quality:
- Section transition smoothness (user rating 1-10)
- False transition rate (transitions that felt wrong)
- Musical coherence (does it make sense?)
Technical:
- Latency (maintain <100ms)
- Prediction accuracy (future vs actual)
- Frame rate (maintain 50 Hz)
User Experience:
- Learning curve (time to first "good" session)
- Expressiveness (how much control do users feel?)
- Engagement (session duration, return rate)
---
Current Status: Phase 4 Complete โ
Next: Pick 2-3 Quick Wins and implement this week!
Which enhancements interest you most? ๐
Promotion Decision
Attach run IDs, datasets, metrics, and reproduction commands.
Source Anchor
Comp-Core/apps/web/cc-dashboard/ENHANCEMENT_ROADMAP.md
Detected Structure
Method ยท Evaluation ยท References ยท Code Anchors ยท Architecture