genymtable - YM2149 3-voice DAC volume table generator
======================================================

What it does
  Generates ymtable.i, the 256 x 16-byte table audio.s includes: each signed
  8-bit sample maps to the A/B/C 4-bit volume triple whose summed output best
  tracks a linear ramp (sample 0 = mid).

    genymtable <out.i> [--smooth <slack>]

  --smooth <slack>  output-error slack (in target steps) traded for smaller
                    channel-to-channel jumps (default 1.0; 0 = pure nearest-level).

Why it's done this way
  - The channel outputs are summed via Hatari's circuit-analysed YM2149 model
    (src/sound.c, YM2149_BuildModelVolumeTable), not a naive mean.
  - For each of the 256 targets, a pure nearest-of-4096-triples table clicks: the
    best triple for one sample can sit far from its neighbour on a channel, and
    the YM has no atomic 3-register write.
    So among triples within --smooth of the best match we keep the one nearest
    the previous row, walking up from silence - minimising per-sample movement.

  No audio input; deterministic from the chip model, so the build regenerates it.

Build
  make            (needs only a C++23 compiler)
