diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/index.html | 2 | ||||
| -rw-r--r-- | docs/phonology.html | 42 | ||||
| -rw-r--r-- | docs/playback.html | 2 | ||||
| -rw-r--r-- | docs/quirks.html | 2 | ||||
| -rw-r--r-- | docs/scheduling.html | 9 |
5 files changed, 45 insertions, 12 deletions
diff --git a/docs/index.html b/docs/index.html index d6a0817..7017da5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -60,7 +60,7 @@ entirely from the samples.</p> 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 55-entry digraph table, short/long + <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> diff --git a/docs/phonology.html b/docs/phonology.html index ebbc872..075f3a2 100644 --- a/docs/phonology.html +++ b/docs/phonology.html @@ -47,8 +47,13 @@ rewritten.</p> <h3>0. Lone mute</h3> <pre>if (a == 0x85 && b == 0xFF && c == 0xFF) return;</pre> -<p>Returns before touching any state, so a lone punctuation mark does not disturb the -previous-character history.</p> +<p><code>sou_num_org</code>, <code>sou_num2_org</code> and <code>sou_num3_org</code> are assigned +<em>before</em> this test, so they <strong>are</strong> overwritten; what survives is +<code>sou_last_num</code> / <code>sou_last_num2</code>, which are written further down. A lone +punctuation mark therefore leaves the digraph history intact, but still clobbers the +context bytes a pending <a href="#mode2">mode 2</a> call will read — +<code>sou_num3_org</code> for its short-vowel lookup, <code>sou_num_org</code> for its dedup +comparison.</p> <h3>1. Silent e (<code>:2612</code>)</h3> <pre>if (a == 'e' && b > 0x77 && class(last_num) == vowel && class(last_num2) == consonant) { @@ -71,6 +76,17 @@ are consumed by one sample.</p> <h4>The digraph table — <code>Sou_ConnectCheck</code> (<code>:2316</code>)</h4> <p>53 entries. All are two characters except <code>you</code>, the only rule that reads <code>c</code>; one pairs a letter with a space rather than another letter (<code>i␣</code>).</p> +<div class="note"> +<strong><code>i␣</code> is very nearly unreachable.</strong> Its <code>b</code> is <code>0x81</code>, +which is also a punctuation-flush trigger — so rule 3 below sets <code>r28 = 3</code> and +unconditionally reassigns <code>a</code>, discarding the <code>0x05</code>. It survives only when +the previous call's <code>b</code> was <em>also</em> punctuation, which forces <code>r28 = 1</code> +instead; <code>0x05</code> then falls through <code>Sou_TanboinHenkan</code>'s +<code>default: return a</code> and reaches playback unchanged. Every other digraph has a letter +in <code>b</code> and so never meets rule 3 — for those, "<code>r28 = 2</code> falls straight +through to playback" holds as written. +</div> + <div class="grid2"> <code>ai</code>→0x0F<br><code>al</code>→0x02<br><code>an</code>→0x39<br><code>ar</code>→0x16<br><code>as</code>→0x3A<br> <code>be</code>→0x3B<br><code>by</code>→0x3C<br> @@ -110,9 +126,23 @@ each one a recorded syllable.</p> <pre>a = Sou_ConnectCheck(sou_last_num2, sou_num_org, sou_num2_org); if (a < 0x53 || a > 0x76) break; // it merged, or wasn't a letter — leave it a = Sou_TanboinHenkan(a, b);</pre> -<p>This gives the final letter of a word a chance to pair with the letter before it -instead of being dropped against the following space. Note the guard also drops the -whole branch if <code>a > 0x77</code> before it starts.</p> +<p>The <em>intent</em> is to give the final letter of a word a chance to pair with the letter +before it instead of being dropped against the following space. What it does is narrower. +<code>a</code> is reloaded from <code>sou_last_num2</code> — the <em>previous</em> call's +<code>b</code> — and if <code>Sou_ConnectCheck</code> finds no merge it returns that byte +unchanged, so <code>Sou_TanboinHenkan</code> speaks the previous letter a second time and the +word-final letter is never voiced at all.</p> + +<p>Worked example, <code>cat␣</code>. Window <code>(c, a, t)</code> doesn't merge, so +<code>r28 = 1</code> plays hard <code>c</code> and queues <code>a</code>; the deferred call plays +<code>a</code>. Window <code>(t, ␣, …)</code> then hits rule 3, reloads +<code>a = sou_last_num2 = 'a'</code>, fails to merge <code>at</code>, and plays <code>a</code> +again. The <code>t</code> makes no sound. The branch only pays off when the reloaded pair +<em>does</em> merge — then the merged code plays and the <code>0x53</code>–<code>0x76</code> +guard breaks out before <code>Sou_TanboinHenkan</code> can touch it.</p> + +<p>Note the guard also drops the whole branch if <code>a > 0x77</code> before it starts, and +that nothing is queued on this path.</p> <h3>4. Vowel length (<code>:2658</code>, for <code>r28 == 1</code> or <code>4</code>)</h3> <pre>if (class(a) == vowel && class(b) == consonant && c == 'e') @@ -168,7 +198,7 @@ with the first syllable of the spoken number: <code>0</code>=<code>ze</code>(ro) get codes nothing else reaches. The digraph names here are just labels for shared samples — the recording itself presumably says the number.</p> -<h2>The deferred second syllable — mode 2</h2> +<h2 id="mode2">The deferred second syllable — mode 2</h2> <p><code>Sou_SpecialRoutine10</code> (<code>:1708</code>) runs once per game frame inside <code>Na_GameFrame</code>:</p> diff --git a/docs/playback.html b/docs/playback.html index 1cf9464..73be9a2 100644 --- a/docs/playback.html +++ b/docs/playback.html @@ -33,7 +33,7 @@ into the phoneme path — the pitch and volume bumps below never apply to the pl <tr><th>Code</th><th>Char</th><th>Effect</th></tr> <tr><td><code>0x86</code></td><td>click</td><td><code>NA_SE_BEBE</code>, then mute</td></tr> <tr><td><code>0x81</code> <code>0x84</code> <code>0x85</code></td><td>space, newline, mute</td><td>mute</td></tr> -<tr><td><code>0x82</code></td><td><code>?</code></td><td>mute, and pitch × 1.24 / 1.30 / 1.13 for sequence 243 / 244 / 245</td></tr> +<tr><td><code>0x82</code></td><td><code>?</code></td><td>mute, and pitch × 1.24 / 1.30 / 1.13 for <code>sou_now_voice_seq</code> 1 / 2 / 3 — the small index <code>Na_SpecChange</code> sets alongside sequence 243 / 244 / 245, not the sequence number itself</td></tr> <tr><td><code>0x83</code></td><td><code>!</code></td><td>mute, and volume × 1.15</td></tr> <tr><td>anything else</td><td></td><td>plays; sets <code>sou_now_boin</code> (dead, see <a href="quirks.html">quirks</a>)</td></tr> </table> diff --git a/docs/quirks.html b/docs/quirks.html index bb860c9..c46fdb2 100644 --- a/docs/quirks.html +++ b/docs/quirks.html @@ -145,7 +145,7 @@ the config. See <a href="gating.html">gating</a>.</td></tr> </table> <p>Everything else in <code>extraction.md</code> §1 was re-verified against the current tree -and holds: the voice table, the 55 digraph entries, both vowel tables, the per-spec +and holds: the voice table, the 53 digraph entries, both vowel tables, the per-spec timbre values, and the spec→sequence→bank mapping.</p> <div class="pager"> diff --git a/docs/scheduling.html b/docs/scheduling.html index 581dff6..07f1e52 100644 --- a/docs/scheduling.html +++ b/docs/scheduling.html @@ -111,9 +111,12 @@ volume adjustment is skipped entirely. (What happens for other values is <a href="quirks.html">not what it looks like</a>.)</p> <p>It also contains one very specific special case: if the character is ♪ at exactly -normal scale in colour <code>rgba(50, 60, 50, 255)</code>, the NPC id is forced to 0, -suppressing the melody. This is presumably a specific piece of dialogue where a -literal music note glyph should stay silent.</p> +normal scale in colour <code>rgba(50, 60, 50, 255)</code> and the NPC id is non-zero, that id +is forced to 0. This does <strong>not</strong> silence it — <code>Na_VoiceSe</code>'s ♪ escape +only bails on <code>voice == 0xFA</code>, and <code>melody_seq_offset[0]</code> / +<code>melody_seq_size[0]</code> are a real <code>0x120</code>-byte entry. The effect is to play +the figure on instrument 0 rather than the speaker's own, presumably so one particular +line reads as a generic note instead of that character's timbre.</p> <h2>End of message</h2> |