diff --git a/docs/HARMONICE_PHYSICAL_KEYS_SOF_CONTRACT.md b/docs/HARMONICE_PHYSICAL_KEYS_SOF_CONTRACT.md new file mode 100644 index 000000000..efc83f06a --- /dev/null +++ b/docs/HARMONICE_PHYSICAL_KEYS_SOF_CONTRACT.md @@ -0,0 +1,64 @@ +# Harmonice v9 physical MUTE / SOLO / PFL — SOF integration contract + +## Artwork provenance and nonnegotiable look + +Use the user's approved **Harmonice_Thin_Flat_Bezel_v9_PFL_FontMatched_Assets.zip**. +The blue PFL PNG master has the same thin flat bezel, cap geometry, typography +and ON text debossing as the v9 MUTE/SOLO faces. Do not recreate it in CSS/SVG. + +- Existing production 4×3, 57×30-per-cell MUTE/SOLO/PRE/POST atlas remains + **exactly unchanged**: + `site/preview-buttons/assets/harmonice-thin-flat-v9-approved-off-shadow-57x30.png`. +- New approved **PFL OFF / PFL ON** raster is a separate 2×1 114×30 RGBA atlas: + `site/preview-buttons/assets/harmonice-thin-flat-v9-pfl-font-matched-57x30.png`. +- PFL sprite SHA256: `1ede18534fa678461ebcb1a100a61170700d75048b11607600cf09d9de8872fd`. +- Display through the same `mixer-control-keys.css` and existing + `strip(t)` renderer; the artwork remains PNG, never a CSS imitation. +- PFL OFF inherits the two approved v9 lower-alpha drop shadows; PFL ON does + **not** inherit OFF shadow. Neither frame alters button hitbox/strip height. + +## One workspace decides the third physical key + +| Context | Source audio strip | BUS/FX strip | MASTER | +| --- | --- | --- | --- | +| MAIN MIX | MUTE, SOLO, PRE/POST | MUTE, SOLO, PRE/POST | MUTE, SOLO | +| SOF | **MUTE, SOLO, PFL** | MUTE, SOLO | MUTE, SOLO | + +PFL is **not** a replacement for PRE/POST routing. In SOF, the selected +send's PRE/POST belongs in the contextual **FX/send processing panel** (PR +#604); its hardware key row uses PFL. The PFL key does not change the +SOF target's send tap/gain or the channel's PRIMARY MAIN edge. + +## Monitoring and state contract + +- Browser reference: PFL uses the existing per-channel `cue` state, purely + as visual feedback. The browser generates no real monitored audio and + **must not feed cue into MAIN**. PFL is initially OFF. +- Leaving SOF clears browser-only PFL requests; there must be no invisible + armed cue. Normal MUTE/SOLO survive workspace changes. +- Native: PFL is disabled / visibly OFF until a separate pre-fader MONITOR + L/R bus has a real native route and ACK/readback. The existing native + bridge `consumeAction('cue')` fails closed; the button must never simulate + monitor audio or claim native availability. +- Native SOF itself remains unavailable until native send gain/tap support is + admitted. This PR does **not** implement an audio PCM audition bus. + +## Concurrent work: draft PR #604 + +**Do not overwrite or independently merge #604's experimental SOF branch.** +The SOF author must forward-port the third-key decision from `strip(t)`: +`sofPfl = sofEnabled && t.kind==='audio'`, `hasTap = t.kind!=='master' && +!sofEnabled`. When SOF is active, preserve PFL in the MUTE/SOLO key row +and keep per-EdgeId PRE/POST in the contextual SOF panel. Preserve the one +existing key CSS owner, both approved raster sprites and native fail-closed +behavior. Do not restore PFL into MAIN MIX or the hidden Clear PFL toolbar. + +## Regression evidence + +- Fast `tests/harmonice_v7_keys_contract.py` checks SHA, dimensions, the + existing MUTE/SOLO sprite, renderer contracts and native guard. +- Existing Chromium Stage D checks both contexts, PFL OFF→ON without layout + changes, actual sprite URL/frame/shadow, no MASTER PFL, and reset on exiting + SOF. It does not assert any native PCM audio. +- Publish only the single `/preview/` GUI; `/preview-prod/` is a frozen + pre-v7 comparison and must remain unchanged. diff --git a/scripts/build_pages.py b/scripts/build_pages.py index 0a77aefec..0ec75a8ab 100644 --- a/scripts/build_pages.py +++ b/scripts/build_pages.py @@ -56,11 +56,12 @@ canonical_html=(canonical/'index.html').read_text(encoding='utf-8') special=('mixer-control-keys.css','mixer-control-keys.js') sprite='harmonice-thin-flat-v9-approved-off-shadow-57x30.png' +pfl_sprite='harmonice-thin-flat-v9-pfl-font-matched-57x30.png' for src in sorted((canonical/'assets').iterdir()): if not src.is_file(): raise SystemExit('Unexpected nested preview-v2 asset: '+str(src)) if src.name not in special: shutil.copy2(src,buttons_dest/'assets'/src.name) -for name in (*special,sprite): +for name in (*special,sprite,pfl_sprite): src=buttons_source/name if not src.is_file(): raise SystemExit('Approved PNG asset missing: '+str(src)) shutil.copy2(src,buttons_dest/'assets'/name) diff --git a/site/preview-buttons/assets/harmonice-thin-flat-v9-pfl-font-matched-57x30.png b/site/preview-buttons/assets/harmonice-thin-flat-v9-pfl-font-matched-57x30.png new file mode 100644 index 000000000..1c3174d26 Binary files /dev/null and b/site/preview-buttons/assets/harmonice-thin-flat-v9-pfl-font-matched-57x30.png differ diff --git a/site/preview-buttons/assets/mixer-control-keys.css b/site/preview-buttons/assets/mixer-control-keys.css index 6996d2e17..9a617cea1 100644 --- a/site/preview-buttons/assets/mixer-control-keys.css +++ b/site/preview-buttons/assets/mixer-control-keys.css @@ -16,7 +16,7 @@ border-bottom:1px solid #415463!important; box-shadow:inset 0 1px 0 #ffffff0a!important; } -.app .console-body .strip .mx-hw-row[data-tap-applicable="false"]{ +.app .console-body .strip .mx-hw-row[data-tap-applicable="false"]:not([data-pfl-applicable="true"]){ grid-template-columns:repeat(2,minmax(0,33%))!important; justify-content:center!important; } @@ -89,6 +89,16 @@ .app .console-body .strip .mx-hw-row>button.mx-hw-key[data-hw-kind="tap"][data-tap-visual="idle"]{--mx-native-x:33.333333%} .app .console-body .strip .mx-hw-row>button.mx-hw-key[data-hw-kind="tap"][data-tap-visual="post"]{--mx-native-x:66.666667%} .app .console-body .strip .mx-hw-row>button.mx-hw-key[data-hw-kind="tap"][data-tap-visual="mixed"]{--mx-native-x:100%} +/* Approved v9 PFL FontMatched source: physical 57x30 OFF + ON PNGs. + Two frames are a separate extension to the original MUTE/SOLO/tap atlas: + no repaint or reallocation of any previously approved control. */ +.app .console-body .strip .mx-hw-row>button.mx-hw-key[data-hw-kind="pfl"]::before{ + background-image:url("harmonice-thin-flat-v9-pfl-font-matched-57x30.png")!important; + background-size:200% 100%!important; + background-position:var(--mx-native-x,0%) 0%!important; +} +.app .console-body .strip .mx-hw-row>button.mx-hw-key[data-hw-kind="pfl"][aria-pressed="true"]{--mx-native-x:100%} +.app .console-body .strip .mx-hw-row>button.mx-hw-key[data-hw-kind="pfl"][aria-pressed="false"]{--mx-native-x:0%} /* Approved v9 HTML, physical 1x: --shadow-u:1px. Exactly the two OFF-only alpha drop-shadow layers from the signed-off Harmonice_Thin_Flat_Bezel_v9_Refined_OFF_Shadow_Interactive_AB.html. @@ -96,6 +106,7 @@ the clickable box or ON face. No artwork repaint or geometry change. */ .app .console-body .strip .mx-hw-row>button.mx-hw-key[data-hw-kind="mute"][aria-pressed="false"]::before, .app .console-body .strip .mx-hw-row>button.mx-hw-key[data-hw-kind="solo"][aria-pressed="false"]::before, +.app .console-body .strip .mx-hw-row>button.mx-hw-key[data-hw-kind="pfl"][aria-pressed="false"]::before, .app .console-body .strip .mx-hw-row>button.mx-hw-key[data-hw-kind="tap"][data-tap-visual="pre"]::before{ filter: drop-shadow(0 .8px 1.15px rgba(0,0,0,.42)) diff --git a/site/preview-v2/index.html b/site/preview-v2/index.html index 4df87e2ae..a44442f5c 100644 --- a/site/preview-v2/index.html +++ b/site/preview-v2/index.html @@ -718,10 +718,18 @@ tapMode==='mixed'?'Mixed PRE and POST parallel WIRE sends · click to set all POST': (tapMode==='send'?'POST follows channel fader':'PRE independent before FX')+ ' · '+parallelSends.length+' outgoing parallel SEND(s), primary MAIN unchanged'; - code+='