Source: https://guthlabs.ai/docs/instruments/transposition-calculator/implementation/

instrument implementation / implementation-contract

# Transposition Calculator implementation

A source-bound implementation contract for Transposition Calculator; deployment and executable qualification remain separate.

Status: **VERIFIED_CLEAN**Lifecycle: **implementation-contract**

## Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

**Record owner**: Guth Instruments

**Lifecycle**: verified-clean

**Evidence ID**: t6-012

**Effect**: Computation or source lookup only

## Input and validation requirements

- A missing or non-integer semitone shift can make the modulo operation invalid or ambiguous.

- If note names are parsed without a defined accidental and enharmonic policy, outputs such as G-sharp versus A-flat cannot be verified uniquely.

- Key names without an explicitly supported mode and tonic spelling are ambiguous for output note naming.

- Pitch-class modulo 12 discards octave/register information; the specification should state whether octave numbers are preserved, shifted, or ignored.

- Chord symbols may contain quality, extensions, alterations, inversions, and slash bass notes that a simple note lookup table may not transpose correctly unless each component is parsed.

- A zero or full-octave shift is valid but must not be treated as missing input; division-by-zero is not applicable to this algorithm.

## Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

## Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

````
{
  "inputs": {
    "notes": [
      "C",
      "E",
      "G"
    ],
    "source_key": "C major",
    "target_key": "D major"
  },
  "expected_outputs": {
    "semitone_shift": 2,
    "transposed_notes": [
      "D",
      "F-sharp",
      "A"
    ]
  },
  "working": "C=0, E=4, G=7. Target D=2 and source C=0, so shift=2-0=2 semitones. C: (0+2) mod 12=2=D. E: (4+2) mod 12=6=F-sharp. G: (7+2) mod 12=9=A. Result: D-F-sharp-A."
}
````

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/transposition-calculator/>)[02**Mechanism**](<https://guthlabs.ai/docs/instruments/transposition-calculator/mechanism/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/transposition-calculator/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche6/tranche6-results.json`
