feat(player): sub-project 3 slice 1 — alteration engine + player core #5
Reference in New Issue
Block a user
Delete Branch "feature/player-alteration-core"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Begins sub-project 3 (Player Runtime + alteration engine) per
docs/ROADMAP.md§3 and the approved machine-altered-perception design (§4 alteration engine, §5 mood grade, §6 7-way content dial, §7 intensity).Ships slice 1 — the pure-logic core as a new
player/package, fully unit-tested (56 new tests; 189 passed / 2 skipped total) with all I/O (video/audio/serial) behind injected interfaces — mirroring how sub-project 1 was the pure-logic dependency root.What's in
player/controls.py—Controls, the full panel state (7-way content dial + 4 experience knobs + volume + brightness); the serial-contract data shape shared with sub-project 4.content.py—resolve_content, the §6 7-way dial → (audio source, video on/off) table.alteration.py—plan_alteration, knob vector →RenderPlan(moodColorGradewith center=identity §5; LeftAnalyticalOverlay; RightRestyle), encoding the §4.2 layering rule (substrate vs overlay; Left & Right stack, not cancel).state.py—Player, the state machine that diffs successive controls into transitions:FADE_TO_BLACK/FADE_FROM_BLACK(video on/off),CROSSFADE(clip/restyle-variant swap),LIVE_UPDATE(continuous grade/overlay/level ops per §4.3),NONE(unchanged).Deferred to later slices (named in the plan/roadmap, not built here)
mpv/ffmpeg runtime renderer + GPU shaders; real USB-serial reader + the 3⇄4 framing contract; white-noise DSP; offline v2v variant pipeline; catalog audio-source + neutral-base flag (sub-project 2 territory).
Flagged for operator (transcript Deferred decisions)
The knob→strength calibration reconciles a §3 vs §4.2/§5 conflict: brain knobs use
value/4(0=off, 4=max); mood uses(light−dark)/4(equal dark/light = identity). This reads §3's "(2,2,2,2) neutral" as a vestige of the old coordinate-grid center. The calibration lives in three one-line helpers so the convention can be flipped trivially.Plan:
docs/superpowers/plans/2026-06-05-player-alteration-core.md. Session 0006.🤖 Generated with Claude Code