Commit Graph

1 Commits

Author SHA1 Message Date
josh 2ba57cadd6 Add Bass Octaver pedal (Boss OC-2 style)
Monophonic octave-down pedal with OCT1/OCT2/Direct knobs and a Mode
switch between two algorithms:

- Flip-flop (default): a hysteresis comparator clocks a T flip-flop
  divider chain (new SubOctaveDivider generator) to produce square
  sub-octaves one and two octaves down, amplitude-followed off the dry
  signal. Time-domain — tracks low bass with no detection floor.
- Tracking: FreqTracker drives square oscillators at half and quarter
  the detected frequency. Cleaner, but limited by the tracker's ~90 Hz
  floor; flip-flop is the bass mode.

SubOctaveDivider classifies its input as generator-or-scalar at init to
keep _computeSamples allocation-free, uses a shared file-scope zero
block, bounds-checks the input read, and traps on divisor < 2.

Tests: BassOctaverPedal integration (both modes non-silent, modes
differ, sub-octaves change output, knobs/switch/preset/registry) and
SubOctaveDivider deterministic frequency-division (divisor 2 -> /2,
divisor 4 -> /4, /4 one octave below /2). 127 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:43:03 -07:00