1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Animalese pipeline — Animal Crossing (GC)</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Animalese: the text → speech pipeline</h1>
<p class="lede">How <em>Animal Crossing</em> (GameCube, <code>GAFE01</code>, USA rev 0) turns a
message string into villager babble. Every claim here is traced to a function in the
<a href="https://github.com/Prakxo/ac-decomp">ac-decomp</a> tree.</p>
<h2>The short version</h2>
<pre>
message text (game charset, 1 byte/char)
│
│ 1. mMsg_sound_voice_get() 256-entry table
▼ char code ──► voice code (0x53–0x86)
gating + voice selection
│ 2. mMsg_sound_voice_mode_get() animalese / click / silent
│ mNpc_GetNpcSoundSpec() speaker ──► spec 2–9
▼ Na_SpecChange() spec ──► sequence 243/244/245
windowing
│ 3. mMsg_sound_voice_entry() collect (a, b, c) over two cursor steps
▼ ~1 character per 2 game frames
draw-time trigger
│ 4. mFontSentence_animal_voice_se() glyph scale ──► volume
▼ sAdo_VoiceSe(a, b, c, npc, scale, mode)
phonology
│ 5. Na_VoiceSe() digraphs, long vowels, silent e
▼ ──► phoneme code 0x01–0x77
playback
│ 6. Sou_VoiceStart() write port 0 of a JAudio2 subtrack
│ sequence dyntbl ──► instrument (code − 1)
▼ 7. ProgToVp(bank, inst) ──► NoteToVoice() ──► smzwavetable
DSP ──► one 30–400 ms VADPCM sample, 22050 Hz, pitched down 4–9 semitones
</pre>
<p>A phoneme code is literally a <strong>soundfont instrument number plus one</strong>. The whole
"engine" is a lookup table with about fifty special cases; the character comes almost
entirely from the samples.</p>
<h2>Pages</h2>
<ul class="toc">
<li><a href="gating.html">1. Gating & voice selection</a>
<span>When animalese plays at all, and which of the three voices you hear.
Specs 2–9, the click fallback, and the player's own voice.</span></li>
<li><a href="encoding.html">2. Text → voice code</a>
<span>The game's character set, the 256-entry voice table, case folding,
accent folding, and the eight punctuation codes.</span></li>
<li><a href="scheduling.html">3. Windowing & timing</a>
<span>How three characters get bundled into one call, why it fires from the
font renderer, and the every-other-frame cursor.</span></li>
<li><a href="phonology.html">4. The phonology engine</a>
<span><code>Na_VoiceSe</code> in full: the 53-entry digraph table, short/long
vowel tables, silent e, magic e, and punctuation flush.</span></li>
<li><a href="playback.html">5. Playback</a>
<span>Sequences, banks, the two alternating subtracks, per-spec timbre,
the emotion LFO, and the deferred second syllable.</span></li>
<li><a href="soundfont.html">6. The soundfont lookup</a>
<span>Sequences, banks and instruments as data: the four archive tables, the
bank blob, load-time relocation, and where the PCM actually lives.</span></li>
<li><a href="editor.html">7. The editor path</a>
<span>Mode 1 — an undocumented third calling convention that bypasses
phonology entirely, and what it says about samples 0x53–0x76.</span></li>
<li><a href="disc.html">8. Walking the disc image</a>
<span>CISO, the GameCube filesystem, the DOL, the bank blobs, the VADPCM
decoder, and the voice sequences disassembled — every offset needed to
extract and replay the samples from a dump.</span></li>
<li><a href="quirks.html">9. Quirks, dead code & corrections</a>
<span>The dead volume store, the tautological dedup, vestigial mouth-shape
tracking, and corrections to earlier notes.</span></li>
<li><a href="reference.html">10. Reference tables</a>
<span>Everything in one place: the full voice table, digraphs, phoneme
tables, control codes, disc offsets, source line index.</span></li>
</ul>
<h2>Scope</h2>
<p>Pages 1–7 document the <em>runtime</em> pipeline as decompiled. Page 8 documents the
<em>data</em>: how to walk a dumped disc image down to individual VADPCM frames, with
the audio table-of-contents, bank/sample formats, sequence disassembly and decoding
notes. Together they are intended to be a complete reference for a reimplementation.</p>
<div class="note">
<strong>No game assets here.</strong> Everything on these pages is derived from decompiled
source and structural analysis. Reproducing audible animalese needs a legally dumped
copy of the game.</div>
<p class="src">Verified against ac-decomp at commit <code>09ca8e8b</code> (DOL and REL
100 % linked) and against a dumped <code>GAFE01</code> USA rev 0 disc image.</p>
</body>
</html>
|