little-scale — Let's Tune the Game Boy Like a Japanese Koto (2009)

author little-scale (Sebastian Tomczak)
date 2009-12-10
article blog post; four short paragraphs plus a screenshot of the working spreadsheet, read at /s1600/ — the method is in the picture
created 2026-08-31 · updated 2026-08-31

A commission, and the clearest worked example of a just (ratio-based) retune in the cluster: the whole ROM tuned to the pentatonic hirajoshi scale on A. The spreadsheet screenshot shows every intermediate column, so the method is fully reconstructable.

Key claims#

  • The scale: "the Hirajoshi 2 scale, which is a pentatonic scale made up of the following ratios above a fundamental frequency that is considered to be 1/1: 9/8 · 6/5 · 3/2 · 8/5 · 2/1". Tonic A. Confirmed in the spreadsheet's ratio columns (numerator 9, 6, 3, 8, 2 over denominator 8, 5, 2, 5, 1).
  • The method: "I worked using a spreadsheet, which had the ratios and then calculated the frequencies for each note. Then, the data needed for the Game Boy to generate that frequency was calculated, and converted into hex. Finally, this block of hex tuning data was copied into the LSDJ ROM using a hex editor." Same procedure as s-little-scale-underclocking-and-retuning, different numbers.
  • The spreadsheet, read from the image (koto tuning for lsdj.xls, OpenOffice.org Calc): columns numerator, denominator, Index, Frequency, Data Value, Hex, Resultant, then four HEX Nibble columns. The visible formula is =DEC2HEX(MOD($G126/256;16)).
  • The five-onto-twelve mapping is explicit. A step/identity table pairs the 12 chromatic keys of an octave with the 5 scale degrees: identities 0–1 → step 0, 2–4 → step 1, 5–6 → step 2, 7–9 → step 3, 10–11 → step 4, 12 → step 0 an octave up. In the frequency column that shows as runs of repeats — 2, 3, 2, 3, 2 keys per octave — so on the finished ROM several adjacent semitone keys sound the same pitch. That is what "tuning the ROM to a pentatonic scale" actually means on a chromatic tracker.
  • The frequencies, read from the image, tonic A: 55, 61.88, 66, 82.5, 88 Hz, then 110, 123.75, 132 … — i.e. 55 Hz × 1/1, 9/8, 6/5, 3/2, 8/5, 2/1, checked here against the stated ratios.
  • The data values and their hex confirm the Game Boy pitch formula in reverse: 66 Hz → 62 → 3E; 82.5 → 459 → 1CB; 88 → 559 → 22F; 110 → 856 → 358; 123.75 → 989 → 3DD; 132 → 1055 → 41F. All match v = 2048 − 131072 ÷ f, and the Resultant column (66, 82.49, 88.03, 109.96, 123.77, 132) shows the rounding error the integer register imposes.
  • The bottom of the range does not exist, and the sheet says so in red. Every row below about 64 Hz has a negative Data Value — 55 Hz → −335, 61.88 Hz → −70, and a stack of rows at 25.96 Hz → −3002, whose Hex column reads FFFFFFF446. The Game Boy pulse channel cannot go below 64 Hz (game-boy-apu), so the lowest octave and a half of a retuned ROM is unplayable garbage.
  • He offers the spreadsheet to anyone who asks; a commenter (T-FR, 2009-12-13, writing an Indian scale) asks what format the hex chunk is in and which note it starts with, and gets no answer.

Practical takeaways#

  • For a just scale, work in ratios × a tonic frequency, not in cents: 55 × 9/8 = 61.875 needs no logarithms.
  • Convert with v = 2048 − 131072 ÷ f, round, and write it low byte first; then check the resultant frequency, because rounding is coarse and gets coarser upward.
  • Decide the key-to-degree mapping deliberately. Five degrees over twelve keys means duplicated keys; the 2-3-2-3-2 spread here keeps the tonic under the same finger every octave.
  • Anything under 64 Hz has to be given up, or the whole scale transposed up an octave before it is written.
  • abrasive's --ratio mode does all of this from the fractions alone (s-little-scale-abrasive-lsdj-tune).

Notable quotes#

"Someone asked me to tune the Game Boy LSDJ ROM like a Japanese Koto. Sure, I said."

Relevance to the wiki#

The wiki's first fully worked non-12-TET scale on a chip, with the arithmetic visible end to end — and the first source that shows what a pentatonic retune does to the tracker's keyboard.

To verify#

  • The image shows rows 1–33 of the sheet; the columns beyond HEX Nibble 1 and the rest of the 108 notes are off-screen.
  • Which LSDj version, and whether the SGB table at $6E12 was patched too, is not stated.
  • The linked demo video (youtube.com/watch?v=6_za8v4OtL8) was not fetched.

Pages touched#

alternative-tunings · rom-retuning · scales-and-modes · harmonic-series · game-boy-apu · lsdj · little-scale

source file wiki/summaries/s-little-scale-koto-tuning.md · graph