not-tonight/lanes/LANE_JUICE2.md

3.2 KiB

LANE-JUICE2 — The night has a sound (Phase 3, parallel)

Executor: Opus 4.8. Branch: lane/juice2 (from main after Phase 2). Owns: src/audio/, src/ui/, tests. Prereq reading: CLAUDE.md → LANE_JUICE.md (your Phase-1 spec) → Phase-2 REVIEW block in LANEHANDOVER.md.

Phase-2 reality (read before coding)

  • TechnoEngine + Sfx now live inside the actual night (NightScene creates them; unlock on first pointerdown; StubBeatClock hands over on audio:unlocked). The location filter sweeps on every doorway/exit toggle.
  • audio:unlocked.atMs now carries the ANCHORED beat-0 origin (your open question, ruled and implemented).
  • MeterHud has initialHeat (ruled: read run-scoped strikes at construction — wired in the floor's night mode).
  • ui/Stamp is the door's stamp, with stampSlam/stampInk wired. The decal is destroyed ~900ms post-slam by DoorScene.
  • Your ui/juiceEvents.ts was deleted at review — its events live in data/types.ts now. Extensions go via CONTRACT CHANGE REQUEST only.

Deliverables (in priority order)

1. Ear pass with John (the debt from Phase 1: "verified by ear: NOTHING")

Sit a human in front of the JuiceDemo AND a real night. Tune: does the kick read as a kick, is the bassline musical, typeTick level (it fires per character), stamp slam vs music balance, the door→floor sweep (does it feel like a door opening). Document every constant you change and why. This is THE deliverable — everything below is secondary.

2. Ambience layer

  • rainLoop at the door (start/stop on audio:location — rain is outside).
  • A crowd-murmur bed INSIDE (filtered noise, level follows NightState.capacity.inside — read via a bus listener on meters:changed? No — capacity isn't in that payload; request what you need or derive from door:clicker/door:verdict counting. State your approach in the handover).
  • The kebab-shop fluoro hum if you're feeling artistic (tiny, dry, mono).

3. The night has an arc

Track intensity should rise across the night: thin kick+hat at 9 PM, bassline enters ~10, pads and full mix by midnight, strip back at Last Drinks. Drive it from clock:tick (you know the clock minute). Keep every parameter externally settable — this surface IS the future DJ role's control panel (BUILD_PLAN Phase 4 rule).

4. Widget debts

  • Phone thread: scroll instead of truncating the newest over-tall message.
  • DialogueBox drunk-typo mode: wire into the floor cut-off overlay (it currently renders plain text — coordinate via handover, LANE-FLOOR2 owns the call site; you own the widget).
  • Optional: MeterHud variant sized for the door's top bar, so DoorScene can drop its bespoke MeterBars (currently duplicated look). Only if clean — the door HUD works and this is cosmetic unification, not a rescue.

Constraints

  • Location filter architecture is non-negotiable: music through the lowpass, SFX and ambience around it (rain is OUTSIDE — it belongs on the sfx bus but only audible at the door; that's a routing decision, justify yours).
  • No imports from door/floor scenes. Bus + constructor config only.
  • Pure-testable math tested; everything else honestly listed as ear-checked or not, per your own Phase-1 standard.