epiphany/crates
Levi Neuwirth e5efe22d5b layout-ir: staff_step_pitch, the clef-relative position inverse
The inverse of staff_position: a staff step (a clicked staff height) back to the
diatonic pitch (nominal, octave) written there under a clef. This is the vertical
half of the click-to-insert inverse the GUI will use — turning where you click on
a staff into the pitch to place.

It mirrors the forward map's clef and octave-shift convention exactly, computes
the diatonic index in i64 so an extreme step cannot overflow the intermediate,
and returns None for a percussion clef (no diatonic mapping) or a position whose
octave falls outside i8 (rather than wrapping to a wrong-looking octave). A
round-trip test covers treble/bass/alto/tenor and octave-shifted (8va/8vb)
trebles across octaves and nominals, plus the out-of-range refusals.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NAtEiJtt9yKVV1zjKYmZhS
2026-06-29 17:28:23 -04:00
..
epiphany-bundle Pass 11 audit follow-up: honest LayoutObjectId status + doc/test gaps 2026-06-22 10:02:05 -04:00
epiphany-core Agent I-0: real clef + key-signature data in the core graph 2026-06-26 10:31:16 -04:00
epiphany-determinism P12-I2: wire the ratified MUSCLOID layout-object id derivation 2026-06-27 12:46:19 -04:00
epiphany-editor-core editor-core: expose the resolved layout for renderers 2026-06-29 11:46:31 -04:00
epiphany-editor-gui editor-gui: a thin native (egui) editor over the editor-core seam 2026-06-29 11:47:25 -04:00
epiphany-engrave layout-ir, engrave: ledger lines 2026-06-29 17:12:56 -04:00
epiphany-layout-ir layout-ir: staff_step_pitch, the clef-relative position inverse 2026-06-29 17:28:23 -04:00
epiphany-ops epiphany-editor-core: a headless editor API + a conformance UI-seam gate 2026-06-27 16:47:34 -04:00
epiphany-render-svg layout-ir, engrave: ledger lines 2026-06-29 17:12:56 -04:00
epiphany-testkit epiphany-editor-core: a headless editor API + a conformance UI-seam gate 2026-06-27 16:47:34 -04:00