Everything needed to reimplement the pipeline, plus an index into the
decomp.
The character → voice code table
mMsg_sound_voice_get's full 256-byte array, indexed by the game character
code (row × 16 + column). 0x7F and 0x80 hold 0xFF
but the function returns −1 for them before the lookup.
Letter L ↔ code: 0x5D + (L − 'a'). Digit D ↔ code:
0x53 + D.
Phoneme codes
Phoneme code v plays soundfont instrument v − 1. Code 0 is
silence. Codes marked † are produced by more than one rule and therefore share a
sample.
Short vowels (Sou_TanboinHenkan)
a
i
u
e
o
n
0x01
0x14
0x29
0x0A
0x1D
0x1B
Long vowels (Sou_ChouboinHenkan)
a
i
u
e
o
n
0x02 †
0x15 †
0x2A †
0x0E †
0x1E
0x1B
Used only when class(a) == vowel && class(b) == consonant && c == 'e'.
The tables are otherwise byte-identical.
Consonants (both tables)
Letter
Code
Notes
b
0x07
c
0x23 / 0x18
soft (= s) if next letter is i or e, else hard (= k)
d
0x09
f
0x11
g
0x12
h
0x00
silent — no instrument
j
0x17
shares ge
kq
0x18
l
0x19
m
0x1A
p
0x21
r
0x22
s
0x23
t
0x26
shares digit 2
v
0x2D
w
0x2E
x
0x31
shares ks
y
0x15
shares long i and ea
z
0x30
Digits (both tables)
0
1
2
3
4
5
6
7
8
9
0x32
0x33
0x26
0x27
0x34
0x35
0x36
0x37
0x10
0x38
Digraphs (Sou_ConnectCheck) — 53 entries
Pair
Code
Pair
Code
Pair
Code
Pair
Code
ai
0x0F
go
0x3E
no
0x49
si
0x36
al
0x02
ha
0x3F
of
0x4A
so
0x4F
an
0x39
he
0x40
oh
0x4B
su
0x25
ar
0x16
hi
0x41
ok
0x4C
th
0x28
as
0x3A
ho
0x42
on
0x4D
to
0x50
be
0x3B
i␣
0x05
oo
0x2A
up
0x51
by
0x3C
if
0x43
or
0x2C
we
0x52
ch
0x08
in
0x44
ou
0x20
wo
0x33
do
0x3D
ir
0x0C
ow
0x06
you
0x77
ea
0x15
is
0x45
oy
0x1F
ze
0x32
er
0x0D
it
0x46
re
0x0E
fa
0x35
ks
0x31
se
0x37
fo
0x34
me
0x47
sh
0x24
ge
0x17
my
0x48
na
0x38
ng
0x1C
Of the 119 codes 0x01–0x77, the phonology engine produces 76.
The 43 it never produces are seven isolated gaps —
0x03 0x04 0x0B 0x13 0x2B 0x2F 0x4E — plus the 36-code block
0x53–0x76. The anti-repetition substitution can reach the first six
of the gaps (it only emits 0x00–0x3F); the block is reachable only
via the editor path; 0x4E appears to be reachable by
nothing at all.
Specs
Spec
Seq
Bank
Vol
Pitch
Speaker
2
243
156
0.65
1.00
lazy & jock villagers; most special NPCs (default)
What each phoneme code actually plays — instrument, semitone, note delay, velocity,
per sequence — is tabulated on the disc page, extracted from the
shipped sequence data. The headline constants: dialogue phonemes play at semitone 44
(seq 243), 41/39 (seq 244) or 39 (seq 245) against unity-at-48
(PITCHTABLE[i] = 2^((i−48)/12)), velocity 110 (gain
(110/127)² ≈ 0.75); editor letter names at semitone 44 with a rising sweep
from 41, velocity 95; all samples tuned 0.689062 = 22050/32000.