A mobile-first audio synthesizer with fluid, oil-like visual interface. Touch the surface to create grimey, distorted synth sounds with real-time effects and loop recording capabilities.
- Real-time synthesis with Web Audio API for minimal latency
- Pentatonic scale mapping with quantized pitch steps for musical harmony
- Polyphonic voices with automatic voice management
- Built-in effects: Distortion, delay, chorus, and dynamic filtering
- Loop recording with overdubbing support and additive mixing
- Touch-responsive parameters mapped to screen coordinates
- WebGL oil surface with fluid dynamics and shader-based rendering
- Touch-based reveal system that unveils the oil surface on first interaction
- Real-time color blending tied to audio parameters
- Responsive animations optimized for 60fps on mobile devices
- Iridescent color schemes inspired by oil-on-water effects
- 5-knob interface: GRIME, FLOW, SHIMMER, DEPTH, PITCH
- Loop controls: Record, Play/Pause, Volume, Clear with progress indicator
- Mobile-optimized with large touch targets and haptic feedback
- Performance scaling based on device capabilities
# Clone the repository
git clone https://github.com/yourusername/oil-synth.git
cd oil-synth
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run buildOpen your browser to http://localhost:5173 and tap the screen to begin!
- Audio: Web Audio API with MediaRecorder for loop recording
- Visuals: WebGL with custom fragment shaders
- Build: Vite for fast development and optimized production builds
- Performance: Adaptive quality based on device capabilities and battery status
src/
├── audio/ # Audio synthesis and effects
│ ├── synthesizer.js # Core audio engine
│ └── loop-controller.js # Loop recording system
├── visual/ # WebGL rendering and shaders
│ └── oil-surface.js # Fluid oil surface simulation
├── controls/ # UI components and interaction
│ ├── knob-control.js # Rotary knob controls
│ ├── loop-controls.js # Loop panel interface
│ └── touch-handler.js # Multi-touch gesture handling
├── utils/ # Performance optimization utilities
└── styles/ # CSS styling
npm run dev # Start development server
npm run build # Build for production
npm run lint # Lint code
npm run typecheck # Type checking
npm run preview # Preview production buildAudio Performance
- Pre-allocated audio buffers to avoid garbage collection
- Voice limiting based on device capabilities
- Efficient filter implementations using Web Audio API nodes
Visual Performance
- Batched WebGL draw calls
- Level-of-detail adjustments for complex effects
- Frame timing monitoring with automatic quality scaling
Mobile Optimization
- Touch event pooling for smooth interaction
- Passive event listeners where possible
- Memory management for continuous use
- Tap anywhere on the dark surface to reveal the oil interface
- Touch and drag to create sounds - position affects pitch and timbre
- Use multiple fingers for polyphonic playing
- Adjust knobs to modify the sound character in real-time
- Press Record to start capturing a loop
- Play and record your performance - loop length is automatic
- Press Record again while playing to overdub additional layers
- Use Play/Pause to control playback
- Adjust Volume knob to mix loop level
- Press Clear to remove the current loop
- GRIME: Controls distortion and harmonic saturation
- FLOW: Adjusts filter cutoff and resonance
- SHIMMER: Modulates chorus and stereo effects
- DEPTH: Controls reverb and spatial depth
- PITCH: Sets pitch range (7 quantized musical steps)
- Chrome/Edge: Full support with optimal performance
- Firefox: Full support with good performance
- Safari: Full support (iOS Safari optimized for mobile)
- Mobile browsers: Optimized experience with touch controls
Requirements: Modern browser with Web Audio API and WebGL support
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Follow the existing code style and architecture patterns
- Test on both desktop and mobile devices
- Commit with conventional commit format (
feat:,fix:, etc.) - Push to your branch and create a Pull Request
feat: add chorus effect to audio chain
fix: resolve touch event handling on iOS
perf: optimize WebGL rendering pipeline
style: update oil surface color palette
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Web Audio API and WebGL
- Inspired by analog synthesizers and fluid dynamics
- Optimized for mobile-first audio performance
🎵 Create ethereal soundscapes with touch 🎨