Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
T
Tidal
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • PLN
  • Tidal
  • Repository

Switch branch/tag
  • Tidal
  • tools
  • at
  • harness.py
Find file
BlameHistoryPermalink
  • PLN (Algolia)'s avatar
    feat(at): pv-at — acceptance tests that play the rig and assert on real audio · 6fbd4256
    Green unit tests on pure functions prove nothing about whether the rig makes
    sound. Every failure that has cost this project an evening lived in the SEAM:
    a helper that typechecks but silences an orbit, a knob that moves but changes
    nothing, an orbit still playing from the previous track. pytest cannot see any
    of it; a microphone can.
    
    So pv-at drives the REAL rig — boots a track through tidal-remote, taps the
    real PipeWire graph through probe-chain's `Tap`, and asserts on measured audio.
    Reusable by construction: a case is a named assertion, not a one-shot script,
    so tonight's investigation is tomorrow's regression suite.
    
    The fixture is a track, not a test tone: claude.tidal, a slow D-minor roller at
    124. Test tones prove the signal path works and nothing about whether MUSIC
    survives it, and they are miserable to listen to while debugging. Each of its
    eight orbits is simultaneously a part of the arrangement and an assertion —
    kick/presence, hats/density, sub/register, stab/brightness, pad/sustain,
    arp/mask, riser/time-axis, break/mute.
    
    8/8 passing against the live rig. Three of the assertions had to be rewritten
    first, and each rewrite is the same lesson in a new costume — the arithmetic is
    never the bug, the QUESTION is:
    
      * sub_is_low asserted on spectral centroid and failed d3 at 837 Hz — an orbit
        carrying `# lpf 220`. A magnitude-weighted centroid integrates the whole
        spectrum, so a low-level broadband floor spread over 20 kHz drags the mean
        far above where the energy actually is (d5: lpf 1400, centroid 6344 Hz).
        Replaced with band-energy ratio: d3 now reads 95% of its energy below
        300 Hz. The centroid stays for RELATIVE tests, where the floor is common to
        both readings and cancels — filter_bites moves 2749 -> 2152 Hz cleanly.
      * riser_rises compared the first half of the window to the second and was a
        COIN FLIP: d7 is driven by a saw whose period is comparable to the capture
        window, so a fixed window lands on a random phase. Consecutive runs of the
        identical pattern scored +7.1 dB and -20.9 dB. Replaced with the maximum
        draw-up (largest rise from any bin to any later bin), which is true at every
        phase: 32.4 dB over a 34.1 dB span.
      * stab_is_bright demanded ">35% of energy above 1 kHz" and failed d4 at
        32.6%. That threshold was invented, and the honest response to a number
        that close is to fix the question rather than nudge the threshold until it
        passes. Now comparative — the stab must sit well above the sub (32.6% vs
        0.4%) — which is a musical invariant instead of a guess.
    
    Safety is structural, not procedural: SAFE_CC is an allowlist, CC 77-84 are
    excluded by construction (Ardour owns those faders; CC77 down is total
    silence), the LCXL port is re-resolved BY NAME on every send, and the suite
    hushes when it finishes. Exit code 2 means "rig not running", kept distinct
    from 1 "a case failed" — conflating an unmet precondition with a pass is how a
    green suite comes to mean nothing.
    PLN (Algolia) authored Jul 28, 2026
    6fbd4256
harness.py 11 KB
EditWeb IDE
×

Replace harness.py

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.