Commit Graph

5 Commits

Author SHA1 Message Date
b1rdmania dd4e1cfebd Fix clicky distortion - proper gain staging and reduced saturation
- Reduced channel gains: pulse 0.12, wave 0.18, noise 0.08
- Total max gain now ~1.0 instead of 2.7 (was clipping)
- More aggressive limiter: -12dB threshold, ratio 20
- Reduced saturation from 0.2-0.3 to 0.08-0.1 in all presets
- Should eliminate clicky distortion during playback
2026-01-20 19:55:03 +00:00
b1rdmania 9311e82538 Fix bass channel - warmer, less synthetic sound
- Use pure triangle wave for bass preset (warmest option)
- Reduce harmonics from 64 to 16 with gentle rolloff
- Add 2kHz low-pass filter to wave channel
- Route all wave sounds through filter for warmth
2026-01-20 19:50:55 +00:00
b1rdmania 03738dd68c Disable phantom drum track and hi-hats in arranger 2026-01-20 19:45:37 +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