🎤 Music Analyzer
Real-time Audio Processing
• Captures microphone input (44.1kHz)
• Calculates RMS volume intensity
• Normalizes to 0.1-1.0 range
• Queues intensity values
• Updates at ~100Hz
🌊 Continuous Wave Dancer
Wave Physics Engine
• Traveling wave equation: A·sin(kx - ωt + φ)
• 5 motors: shoulder→elbow→wrist→roll→gripper
• Harmonic overtones for natural motion
• Cubic spline interpolation
• 100Hz motion updates
🤖 SO101 Follower
Hardware Interface
• USB serial communication
• Motor position control
• Smooth calibration system
• Real-time feedback
• Safe disconnect handling
1
Audio Capture
Microphone captures sound → RMS calculation → Intensity normalization
2
Wave Calculation
Traveling wave equation → Position calculation → Harmonic blending
3
Smooth Interpolation
Cubic spline → Motion limiting → Ultra-smooth transitions
4
Robot Motion
Motor commands → Position control → Continuous wave dance
🎯 Wave Physics
Uses true traveling wave equations to create natural, flowing motion through the robot arm. Each motor represents a point along the wave, with phase delays creating smooth propagation.
wave_value = sin(k·x - ω·t + φ)
+ 0.3·sin(2k·x - ω·t + π/4)
+ 0.1·sin(3k·x - ω·t + π/2)
🎵 Music Responsiveness
Real-time audio analysis drives wave amplitude and frequency. Louder music creates larger, more energetic waves while maintaining smooth continuity.
intensity = sqrt(mean(audio²)) / 2000
amplitude = base_amp × (0.6 + 0.4 × intensity)
🌊 Ultra-Smooth Motion
Cubic spline interpolation, motion limiting, and gentle transitions eliminate jerkiness. Updates at 100Hz with position buffers for seamless motion.
spline = CubicSpline(times, positions)
smooth_pos = old_pos + change × 0.9
max_change = 0.3° per update
🔧 Safe Operation
Gentle initialization to neutral positions, smooth returns, and error handling ensure safe operation. All transitions use cubic easing for natural movement.
progress = t² × (3 - 2t) # Cubic easing
new_pos = start + (target - start) × progress
⚡ High Performance
Multi-threaded architecture with separate threads for audio analysis, wave computation, and robot control. Optimized for real-time performance.
Audio Thread: ~100Hz (PyAudio)
Wave Thread: 100Hz (motion updates)
Main Thread: 10Hz (intensity updates)
🎛️ Motor Configuration
Five motors create the wave: shoulder lift, elbow flex, wrist flex, wrist roll, and gripper. Each has specific positioning and amplitude characteristics.
Motors 2-6: Wave propagation
Positions: [0.0, 0.25, 0.5, 0.75, 1.0]
Gripper: Special handling (40± base)
🚀 Key Innovation
This system creates true continuous wave motion by treating the robot arm as a physical medium through which waves propagate. Unlike traditional robotic choreography that moves joints independently, this approach uses wave physics to create naturally flowing, organic motion that responds dynamically to music in real-time.