Skip to content

Four effects fail on the 11.0.0-alpha.2 integer mixer (audiodsp 46f78dc and later) #245

Closed

Description

@bdbarnett

audiodsp 46f78dc took CircuitPython 11.0.0-alpha.2's integer mixer: a voice scales as (x * level) >> 15 where it used to scale by level / 32767 and truncate toward zero. The new arithmetic rounds toward minus infinity, so a voice below unity now leaves -1 where the old one left 0 on small negative samples. Four effects' tests fail from that commit on (they all pass at 1877bb9, the commit before, with the same effect code), and none of them is a one-line follow-up:

  • StereoWidener. A Mixer clamps panning to 32767/32768, so a hard-panned voice's far lane is scaled by 1/32768 and reads -1 on every negative sample (before: 0). The Haas copy is no longer exactly the right channel delayed: test_the_constructor_delay_plays_exactly, H1TheCopy (two tests), H3TheGlide, test_reset_empties_the_line_and_returns_to_patch_0. A pan of 1.0 doesn't help, because of the clamp.
  • Distortion. The leg mix runs below unity ahead of about 67 dB of pre-clip gain, so the -0.5 LSB mean bias comes out as standing negative DC on quiet input. At 44.1 kHz, Distortion at maximum, a 1 kHz sine at 4 LSB now renders -0.070 of full scale of DC (before: silence), and at -40 dBFS input -0.017 (before: -0.0003). The F1/F2/F4 rows, their planted-fault guards and TheResetResidue (909 against 800) go red.
  • Overdrive. Patch 6 at 44.1 kHz stands 1 LSB of DC into digital silence (before: 0): test_the_planted_class_stands_dc_where_this_one_does_not.
  • DeEsser. D1 got better on every patch (patch 0 from 0.386 to 0.059 dB, patch 3 from 2.262 to 0.583, patch 4 from 2.479 to 1.321). The sweep holds the recorded verdict "D1 misses at the HF-only patches", and patch 3 no longer misses.

MultiTapDelay, AirSpace and the Harmonizer tests needed only to drop or model the old arithmetic; that is done in #243, which moves the pin past 46f78dc.

Activity

  1. bdbarnett commented on Oct 29, 2026

    @bdbarnett
    ContributorAuthor

    Fixed in #243.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions