feat(player): 음악 이론 정량 하니스 + 조성·선법 음높이 배선 - #51
Conversation
오디오 엔진이 harmony/motif를 무시하고 레인 고정 주파수를 쓰는 결함을 문서화하고, 스케일 적합률 등 정량 게이트와 pitchMidi 배선을 설계. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
정량 하니스(스케일 적합률·박 그리드·밀도·도약)를 CI 게이트로 추가. 하니스가 검출한 결함 — 오디오 엔진이 세션 조성/선법/모티프를 무시하고 레인 고정 주파수(항상 Am계)를 쓰던 문제(F dorian 적합률 53%) — 를 chartMapper의 pitchMidi 배선(registerBand 옥타브 + 모티프 음정을 선법 스케일에 스냅)과 엔진의 midiToFrequency 사용으로 수정. 이제 브랜치별 조성·선법이 실제 소리에 반영된다(적합률 95%+). pitchMidi 없는 노트는 레거시 레인 주파수 폴백으로 하위 호환. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b654585b0d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| test('모든 픽스처: 발음 큐의 선법 스케일 적합률 ≥ 95%', () => { | ||
| for (const fixture of collectFixtures()) { | ||
| const { plan, cuePlan } = renderFixture(fixture.events); | ||
| const conformance = scaleConformance(cuePlan, plan[0].harmony); |
There was a problem hiding this comment.
Validate each session against its own harmony
When a fixture spans multiple branches or session gaps, buildMusicPlan returns multiple sessions while renderFixture combines all their notes into one cue plan. Passing plan[0].harmony therefore judges every later session against the first session’s tonic and mode, so correctly pitched later cues can make this gate fail—and later-session pitch defects can pass when they happen to fit the first scale. Partition the cues by session/event references and run conformance against each session’s own harmony.
Useful? React with 👍 / 👎.
요약
"알고리즘을 검증할 방법" 논의의 실행 — 정량 하니스를 만들었고, 하니스가 실제 결함을 즉시 검출해 함께 수정했다.
스펙:
docs/superpowers/specs/2026-08-04-player-music-theory-harness-design.md하니스 (CI 게이트,
tests/musicTheoryHarness.test.mjs+src/lib/musicTheory.js)검출된 결함과 수정
harmony(조성/선법)와motif음정을 무시하고 레인 번호 고정 주파수(항상 A·C·E·G)를 사용 — "F dorian"이 라벨로만 존재 (적합률 **53.3%**로 검출)pitchMidi부여(registerBand 옥타브 + tonic + 모티프 음정을 선법 스케일에 스냅) → 엔진이midiToFrequency로 발음 (hold −1옥타브/accent +1옥타브 — 피치 클래스 보존). pitchMidi 없는 노트는 기존 레인 주파수 폴백.검증
npm run qa(node 86 + UI 33 + 하니스 8) 무회귀 — golden fingerprint 결정성 유지,build:extension통과.경계
player/+ 스펙 문서만 수정.🤖 Generated with Claude Code