Fret Spacing API
Fretted-instrument lutherie maths as an API, computed locally and deterministically — the fret positions a guitar, bass, mandolin or ukulele builder slots a fingerboard to. This is instrument-building geometry, not music theory. The positions endpoint lays out a whole fingerboard from the scale length using the twelve-tone equal-temperament rule: the distance from the nut to fret n = scale length × (1 − 1 ÷ 2^(n/12)), so the 12th fret lands at exactly half the scale (the octave) and each gap shrinks by the constant ratio 2^(1/12) ≈ 1.0595 toward the bridge — a 25.5-inch Fender scale puts fret 1 at 1.431 inches and fret 12 at 12.75. The fret endpoint gives one fret’s distance from the nut, from the previous fret and to the bridge; the scalelength endpoint runs it backwards, recovering the scale length from a measured distance to a known fret (measure to the 12th and double it). It works in inches or millimetres — 25.5 Fender, 24.75 Gibson, 25.4 classical, 34 bass. Everything is computed locally and deterministically, so it is instant and private. Ideal for lutherie, guitar-building, instrument-design and maker app developers, fingerboard-slotting and fret-calculator tools, and CAD/CNC templates. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. For note names or frequencies use a music-theory API.
api.oanor.com/fretspacing-api