{"slug": "encoding-36-french-conservatoire-oboe-fingerings-trill-linkages-and-acoustic-in", "title": "Encoding 36 French Conservatoire Oboe Fingerings, Trill Linkages, and Acoustic Registers in Strict TypeScript", "summary": "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.", "body_md": "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.\n\nThis 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.\n\nA 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:\n\n`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 (\nInstead of encoding fingerings as opaque strings, we modeled every key cup and side lever explicitly in `OboeKeyLayout`:\n\n```\nexport type HalfHoleState = 'open' | 'half' | 'closed';\n\nexport interface OboeKeyLayout {\n  // Left Hand\n  halfHole: HalfHoleState;\n  lh1: boolean;\n  lh2: boolean;\n  lh3: boolean;\n  octave1: boolean;      // 1st Octave Key (Back Thumb)\n  octave2: boolean;      // 2nd Octave Key (Side Forefinger)\n  octave3: boolean;      // 3rd Octave Key (Top Lever)\n  lhGSharp: boolean;\n  lhEb: boolean;\n  leftF: boolean;\n  lowBb: boolean;\n\n  // Right Hand\n  rh1: boolean;\n  rh2: boolean;\n  rh3: boolean;\n  rhFKey?: boolean;\n  forkedFResonance: boolean;\n  rhLowC: boolean;\n  rhLowCSharp: boolean;\n  rhEb: boolean;\n  rhLowB: boolean;\n  rhSideBb: boolean;\n  trillKey1: boolean;    // Upper C-D Trill Key (Tr1)\n  trillKey2: boolean;    // Lower C#-D Trill Key (Tr2)\n}\n```\n\nMaking 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.\n\nKnowing 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.\n\nBecause 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:\n\n``` js\ntype FVariant = 'regular' | 'left-f' | 'forked-f';\n\nconst RH3_CLOSED_NEIGHBORS = new Set(['D', 'Eb', 'Db', 'C', 'B', 'Bb']);\nconst LEFT_PINKY_OCCUPIED = new Set(['Ab', 'G#', 'Eb', 'Bb3']);\n\nexport function resolveOboeFChoice(prevPitch: string, nextPitch: string): FVariant {\n  const needsAlternate =\n    RH3_CLOSED_NEIGHBORS.has(prevPitch) || RH3_CLOSED_NEIGHBORS.has(nextPitch);\n\n  if (!needsAlternate) return 'regular';\n\n  const leftPinkyBusy =\n    LEFT_PINKY_OCCUPIED.has(prevPitch) || LEFT_PINKY_OCCUPIED.has(nextPitch);\n\n  return leftPinkyBusy ? 'forked-f' : 'left-f';\n}\n```\n\nSeparating 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.\n\nTrill 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.\n\nIn `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:\n\n`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.\nIn 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.\n\nA 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:\n\n`OboeKeyLayout` to an SVG `<circle>` or `<path>` element with explicit `aria-label` keywork descriptions and client-side Web Audio synthesis.`Bb3` (`233.08 Hz`) to `1760.00 Hz`) and every trill entry renders directly in initial HTML markup so musicians on slow connections, screen readers, and text-only crawlers receive exact key codes immediately.`10.5 mm` vs. `6.8 mm`), shoulder step geometry (` hasShoulderStep`), and micrometer thickness across Tip (` 0.06 mm` vs. `0.08 mm`), Heart (` 0.40 mm` vs. `0.45 mm`), Spine (` 0.49 mm` vs. `0.54 mm`), and Back (` 0.30 mm` vs. `0.36 mm`) on a `47 mm` staple.\nBecause the entire fingering and reed dataset is pure TypeScript with zero database dependencies, exposing it to coding agents and CLI tools required only a thin stateless `streamable-http` worker (`POST /api/mcp`) and an open-source wrapper repository (` github.com/AbigailDavised/oboelib-mcp`). Every tool is marked `readOnlyHint: true` and returns deterministic JSON directly from the same Conservatoire tables powering the web UI.\n\nIf you are building vertical domain tools—whether for musical instruments, hardware pinouts, or engineering reference charts—modeling the physical state space in strict TypeScript first pays off across every surface: fewer UI bugs, accessible SSR fallbacks by default, and clean machine-readable APIs without duplicating business logic.\n\nThe full French Conservatoire acoustic register tables, trill lever matrix, and reed scrape measurements are also documented in the [OboeLib Technical Reference](https://abigaildavised.gitbook.io/oboelib-reference/).", "url": "https://wpnews.pro/news/encoding-36-french-conservatoire-oboe-fingerings-trill-linkages-and-acoustic-in", "canonical_source": "https://dev.to/abigaildavised/encoding-36-french-conservatoire-oboe-fingerings-trill-linkages-and-acoustic-registers-in-strict-3l0d", "published_at": "2026-12-05 01:40:28+00:00", "updated_at": "2026-12-05 01:43:39.013277+00:00", "lang": "en", "topics": ["developer-tools", "agent-protocols", "structured-data"], "entities": ["OboeLib", "TypeScript", "MCP"], "also_reported_by": [], "takeaway": "Modeling each oboe key lever as a typed boolean and the half-hole as an 'open'|'half'|'closed' union lets static build validation catch impossible states like octave1:true on a half-hole D5, and a deterministic neighbor-set check picks Regular, Left-Hand, or Forked F to avoid RH3 slides.", "recommendation": {"advice": "Encode domain rules as typed state and deterministic functions—like resolveOboeFChoice's neighbor sets—so the same logic drives UI, solvers, and MCP tools without string parsing.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/encoding-36-french-conservatoire-oboe-fingerings-trill-linkages-and-acoustic-in", "markdown": "https://wpnews.pro/news/encoding-36-french-conservatoire-oboe-fingerings-trill-linkages-and-acoustic-in.md", "text": "https://wpnews.pro/news/encoding-36-french-conservatoire-oboe-fingerings-trill-linkages-and-acoustic-in.txt", "jsonld": "https://wpnews.pro/news/encoding-36-french-conservatoire-oboe-fingerings-trill-linkages-and-acoustic-in.jsonld"}}