Encoding 36 French Conservatoire Oboe Fingerings, Trill Linkages, and Acoustic Registers in Strict TypeScript A developer built OboeLib, a strictly typed TypeScript state model that encodes all 36 chromatic oboe fingerings (Bb3 to A6), eight orchestral trill mechanisms, and reed scrape specifications for the French Conservatoire Système 6 bis keywork. The model replaces bitmap fingering charts with a typed OboeKeyLayout schema, including a tri-state half-hole, that drives SVG rendering, server-rendered plain-text tables, and a read-only MCP endpoint from a single file. A deterministic resolveOboeFChoice function encodes the Conservatory rule for choosing between Regular F, Left-Hand F, and Forked F based on neighboring pitches. Most woodwind fingering references on the web still ship as scanned PDFs or grids of 1990s GIF diagrams. That breaks immediately on mobile viewports, fails keyboard navigation, hides alternate fingerings from screen readers, and forces search engines to guess what a raster image depicts. While building OboeLib https://oboelib.com , we replaced bitmap charts with a strictly typed TypeScript state model covering all 36 chromatic oboe pitches Bb3 to A6 , eight orchestral trill mechanisms, and millimeter-level reed scrape specifications. This post walks through the data modeling decisions behind turning physical French Conservatoire Système 6 bis keywork into a deterministic static TypeScript schema that drives SVG rendering, server-rendered plain-text tables, and a read-only MCP endpoint from one file. A naive approach to fingering data stores an array of six booleans 1, 1, 1, 1, 1, 0 plus a free-text footnote for side keys. On the oboe, that collapses immediately because three mechanical states cannot be represented by binary finger dots: LH 1 is tri-state, not boolean. Db5 it seals completely closed . On 554.37 Hz , D5 587.33 Hz , and Eb5 622.25 Hz , the player rolls the finger downward to expose a small upper vent half . Above C5 on notes like open C 5 , it lifts completely open . E5–Ab5 , switch to the 2nd octave side key across A5–C6 , and use a 3rd octave upper-joint lever from E6 through A6 . F4 349.23 Hz and F5 698.46 Hz each carry three distinct key configurations—Regular F, Left-Hand F Instead of encoding fingerings as opaque strings, we modeled every key cup and side lever explicitly in OboeKeyLayout : export type HalfHoleState = 'open' | 'half' | 'closed'; export interface OboeKeyLayout { // Left Hand halfHole: HalfHoleState; lh1: boolean; lh2: boolean; lh3: boolean; octave1: boolean; // 1st Octave Key Back Thumb octave2: boolean; // 2nd Octave Key Side Forefinger octave3: boolean; // 3rd Octave Key Top Lever lhGSharp: boolean; lhEb: boolean; leftF: boolean; lowBb: boolean; // Right Hand rh1: boolean; rh2: boolean; rh3: boolean; rhFKey?: boolean; forkedFResonance: boolean; rhLowC: boolean; rhLowCSharp: boolean; rhEb: boolean; rhLowB: boolean; rhSideBb: boolean; trillKey1: boolean; // Upper C-D Trill Key Tr1 trillKey2: boolean; // Lower C -D Trill Key Tr2 } Making every mechanical lever a typed boolean and halfHole a three-way union eliminates string-parsing bugs. Any impossible state—such as marking octave1: true on a half-hole D5 —becomes trivially catchable during static build validation. Knowing three valid fingerings for F4 is not enough during sight-reading; musicians need to know which F prevents the right ring finger from sliding off RH 3 onto the side Regular F key. Because Regular F occupies the space between RH 2 and RH 3 , moving directly between F and any note that closes RH 3 D , Eb , Db , C , B , Bb introduces an audible mechanical hiccup at tempo. We encoded that Conservatory rule as a deterministic state check: js type FVariant = 'regular' | 'left-f' | 'forked-f'; const RH3 CLOSED NEIGHBORS = new Set 'D', 'Eb', 'Db', 'C', 'B', 'Bb' ; const LEFT PINKY OCCUPIED = new Set 'Ab', 'G ', 'Eb', 'Bb3' ; export function resolveOboeFChoice prevPitch: string, nextPitch: string : FVariant { const needsAlternate = RH3 CLOSED NEIGHBORS.has prevPitch || RH3 CLOSED NEIGHBORS.has nextPitch ; if needsAlternate return 'regular'; const leftPinkyBusy = LEFT PINKY OCCUPIED.has prevPitch || LEFT PINKY OCCUPIED.has nextPitch ; return leftPinkyBusy ? 'forked-f' : 'left-f'; } Separating the decision logic from UI state meant we could drive the browser tool at https://oboelib.com/fingering https://oboelib.com/fingering , the standalone Left-F solver, and the JSON-RPC MCP tool check oboe f fingering choice from identical TypeScript rules. Trill charts suffer from a second UI problem: showing two static fingering diagrams side by side forces the player to mentally diff 22 keys to figure out which single finger actually moves. In OboeTrillEntry , we split each trill into two layers: a stationary baseKeys: OboeKeyLayout snapshot and a single activeTrillKeyId pointing to the oscillating lever trill1 , trill2 , rhEb , rhSideBb , rh1 , or lhGSharp . For example: C5 – D5 whole-tone : LH 1 + RH 1 and oscillate trill1 Tr1 with the right side finger rather than rolling across the half-hole. C 5 – D5 semitone : LH 2-3 + RH 1 and pulse trill2 Tr2 . A4 – Bb4 and B4 – C5 : A4 LH 1-2 or B4 rh1 alone, relying on the articulated Conservatoire bridge linkage. In the interactive Conservatoire trill reference https://oboelib.com/trill-chart , that separation lets the SVG layer render stationary closed keys in solid dark fill while pulsing only activeTrillKeyId —and lets the server render a plain-text HTML table explicitly naming both the anchor grip and the moving finger. A subtle pitfall with interactive JavaScript instrument charts is shipping a blank canvas to crawlers and assistive tech until client hydration completes. We solved this by deriving three outputs from the same static modules during Next.js static export: OboeKeyLayout to an SVG