Skip to content

Add DX7 DAC Quantization to Mark I Engine#521

Open
grahamfranz wants to merge 1 commit into
asb2m10:masterfrom
grahamfranz:Low-Diff-quantization
Open

Add DX7 DAC Quantization to Mark I Engine#521
grahamfranz wants to merge 1 commit into
asb2m10:masterfrom
grahamfranz:Low-Diff-quantization

Conversation

@grahamfranz

@grahamfranz grahamfranz commented Apr 25, 2026

Copy link
Copy Markdown

Add DX7 DAC Quantization to Mark I Engine

Summary

Implements authentic Yamaha DX7 digital-to-analog converter (DAC) quantization in the Mark I synthesizer engine. The DX7 hardware uses a 12-bit DAC with a 3-bit analog scaler to handle the wide dynamic range of FM synthesis, creating characteristic quantization artifacts that are part of the original synth's sonic character.

Addresses feature request from issue #511 (thanks @dronus). This implementation focuses on the core 12-bit mantissa quantization; additional features like parameterized resistor network error simulation could be explored in future work.

Implementation

The d7DacQuantize() function simulates the hardware behavior:

  • 12-bit mantissa quantization: Reduces sample precision to 4095 discrete levels (0xFFF)
  • 3-bit adaptive exponent: Automatically selects shift amount (0-4 positions right) based on signal magnitude
  • Magnitude-based scaling: Larger input signals use higher exponent values to fit within the 12-bit range

Quantization behavior:

  • Input values < 2048: Pass through with no quantization error
  • Input values 2048-4095: Quantized to 12-bit precision (Shift = 0)
  • Input values 4096-65520: Quantized with right-shift (Shift = 1-4)
  • Input values > 65520: Clamped to 12-bit max, output ~65520 at highest shift

Hardware References

Testing & Verification

Verified the quantization function correctly:

  • ✓ Quantizes large input values aggressively (fitting 12-bit constraint)
  • ✓ Preserves small input values with minimal error
  • ✓ Maintains symmetric quantization for positive/negative signals
  • ✓ Produces characteristic bit-crushing artifacts

Notes

  • Applied per-voice before mixing, preserving authentic DX7 signal flow
  • Does not reduce overall volume—only adds quantization artifacts
  • Effect is subtle but adds authentic hardware character to synthesis

@grahamfranz grahamfranz changed the title Add files via upload Add DX7 DAC Quantization to Mark I Engine Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant