Source: https://guthlabs.ai/docs/instruments/midi-note-number-note-name-converter/

instrument / verified-clean

# MIDI Note Number ↔ Note Name Converter

The current ledger marks this instrument verified clean within the source-bound verification corpus.

Status: **VERIFIED_CLEAN**Lifecycle: **verified-clean**

## Inspectable records

[01**Overview**Purpose and lifecycle](<https://guthlabs.ai/docs/instruments/midi-note-number-note-name-converter/>)[02**Mechanism**Method and assumptions](<https://guthlabs.ai/docs/instruments/midi-note-number-note-name-converter/mechanism/>)[03**Implementation**Binding and validation](<https://guthlabs.ai/docs/instruments/midi-note-number-note-name-converter/implementation/>)[04**Qualification**Evidence and errata](<https://guthlabs.ai/docs/instruments/midi-note-number-note-name-converter/qualification/>)

## Ledger state

The current ledger marks this instrument verified clean within the source-bound verification corpus.

**Area**: Audio, Music, Photography & Color

**Tranche**: tranche-6

**Evidence ID**: t6-043

**Ledger rows**: 1

No ledger note is attached.

## Review findings

The arithmetic is correct under the standard MIDI convention, but the specification needs an explicit note-name mapping, reverse-conversion rule, valid input ranges, and enharmonic spelling policy. Because these behaviors are ambiguous, the instrument requires review before being considered fully specified.

### Formula and scope findings

- The forward formula is standard for integer MIDI note numbers: note_index = MIDI % 12 and octave = floor(MIDI / 12) - 1, with MIDI 60 = C4.

- The note-index-to-name mapping is not specified. A canonical spelling convention is required; the vectors below assume sharp spellings: C, C#, D, D#, E, F, F#, G, G#, A, A#, B.

- The reverse conversion algorithm is not stated. It should be MIDI = 12 × (octave + 1) + note_index.

- The supported MIDI-number domain is not stated. Standard MIDI note numbers are integers from 0 through 127; values outside that range should be rejected unless an extended domain is intentionally supported.

- The accepted note-name syntax and enharmonic aliases are not specified. For example, C#4 and Db4 represent the same pitch but require an explicit policy.

### Unit assumptions

- MIDI note numbers are dimensionless integer values in the standard range 0–127.

- Note names use scientific pitch notation with an integer octave, such as C4 or G#5.

- The octave convention is MIDI/scientific pitch notation: MIDI 60 = C4 and MIDI 69 = A4.

- The canonical output uses sharps rather than flats: C#, D#, F#, G#, and A#.

## Boundary hardening

### Recorded hazards

- Reject non-integer MIDI inputs, MIDI values below 0, and MIDI values above 127 unless the product explicitly supports a nonstandard range.

- Avoid language-specific remainder behavior for negative values; validate the MIDI range before applying modulo.

- Define whether note names are case-sensitive and whether formats such as Bb4, DB4, C♭4, or B#3 are accepted.

- Define behavior for enharmonic spellings and normalize aliases to one canonical output spelling.

- Ensure octave -1 is formatted unambiguously as C-1 rather than being confused with a negative note number.

- Do not silently clamp invalid inputs or return a plausible-looking result for malformed note names.

## Errata and corrections

No applied erratum is attached to this unique-name record.

## Inspectable example

4 review vectors are recorded. One source-bound sample is shown below.

````
{
  "inputs": {
    "midi_number": 0
  },
  "expected_outputs": {
    "note_name": "C-1",
    "note_index": 0,
    "octave": -1
  },
  "working": "note_index = 0 % 12 = 0. octave = floor(0 / 12) - 1 = 0 - 1 = -1. Index 0 maps to C, so the result is C-1."
}
````

## Related workflows

No source-defined multi-instrument workflow membership is recorded.

## Sources and evidence

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

- `VERIFIED_LEDGER.json · VERIFIED_CLEAN`

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