4 Commits

Author SHA1 Message Date
b1rdmania f829e992c7 v2: Fix playback engine with progressive scheduling and gain tuning
- Add progressive note scheduling (2 seconds ahead) to prevent browser overwhelm
- Tune channel gains: pulse 0.12, wave 0.15, noise 0.02
- Reduce per-note noise gains for cleaner drums
- Re-enable arpeggiation for harmony tracks
- Limit to 8 channels max
- Add scheduler cleanup on stop
2026-01-26 00:10:48 +00:00
b1rdmania f095f9a2a7 Fix distortion with limiter and reduced gains
- Added DynamicsCompressorNode limiter at master output
- Reduced channel gains (pulse: 0.08, wave: 0.12, noise: 0.05)
- Disabled arranger by default (was adding overlapping notes)
- Total max gain now 0.66 with headroom for overlap
2026-01-20 20:05:32 +00:00
b1rdmania 7aa1d6f660 Fix stop button - track and stop all active audio nodes
- Track all oscillators/sources in APU activeNodes Set
- Add stopAll() method that immediately stops all tracked nodes
- Auto-remove nodes from tracking when they end naturally
- GameBoyPlayer.stop() now calls apu.stopAll()
2026-01-20 19:45:08 +00:00
b1rdmania 5e127c3a3e Add v2 Game Boy sound engine (isolated from v1)
- Authentic DMG-CPU sound chip implementation:
  - 4 Pulse channels with duty cycle control (12.5%, 25%, 50%, 75%)
  - 2 Wave channels with 4-bit wavetables
  - 2 Noise channels with LFSR (7-bit and 15-bit modes)

- GameBoy Colorizer effect chain:
  - Low-pass filter (natural GB rolloff)
  - Bit-crushing (4-bit DAC simulation)
  - Sample rate reduction
  - Saturation and high-pass filter
  - Presets: DMG, GBC, GBA, Clean

- Intelligent MIDI processing:
  - Track analysis and role detection (bass, lead, drums, etc.)
  - Automatic channel mapping to GB channels
  - Chord arpeggiator for polyphony handling
  - GameBoy Arranger for fuller sound

- BitMidi search integration
- Completely isolated from v1 (no changes to src/)
2026-01-20 19:36:13 +00:00