diff options
Diffstat (limited to 'docs/playback.html')
| -rw-r--r-- | docs/playback.html | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/docs/playback.html b/docs/playback.html index 73be9a2..4addb30 100644 --- a/docs/playback.html +++ b/docs/playback.html @@ -118,16 +118,25 @@ r29 != 0x84</code>).</p> <p>Each voice sequence's subtrack sits in a spin loop:</p> -<pre>L_0019: delay 1 frame - macro_read_port0 - branch_rel_not_eq_zero L_0019 ; wait until Sou_VoiceStart writes the port - set_dyntbl D_0026 - dyntbl_call ; index the table with the phoneme code - branch L_0019</pre> +<pre>loop: delay 1 tick + MACRO_SET 1 ; publish "I am sequence 1/2/3" … + PORT1_WRITE_MACRO_REG ; … to port 1 (the load-race handshake) + MACRO_READ_PORT0 ; value ← port 0, port 0 ← -1 + branch loop if value < 0 ; port empty + SET_DYNTBL 0x0026 + DYNTBL_CALL ; call routine dyntbl[phoneme code] + branch loop</pre> -<p>The dynamic table has 128 entries pointing at 10-byte routines -<code>C1 <instrument> / 88 <note> / FF</code>. Entry <em>v</em> selects instrument -<strong><em>v</em> − 1</strong>. Entry 0 is an immediate <code>FF</code> — nothing.</p> +<p>The dynamic table has 128 entries pointing at routines of the shape +<code>C1 <instrument> / 88 <layer addr> / FF</code>, where the note layer holds the +actual note, delay and velocity. Entry <em>v</em> selects instrument +<strong><em>v</em> − 1</strong>; entry 0 is an immediate <code>FF</code> — nothing. The +full annotated disassembly, the per-code note/delay/velocity map, and the tick math are +on <a href="disc.html">the disc page</a>. Two headlines from it: dialogue phonemes play +at semitone 44 / 41 / 39 (sequences 243 / 244 / 245) against a pitch table with unity at +48, so each bank is pitched down 4–9 semitones from its recordings; and port reads are +destructive (the port resets to −1), which is why one <code>Sou_VoiceStart</code> write +triggers exactly one syllable.</p> <h3>Per-frame parameter push</h3> @@ -177,15 +186,19 @@ deferred syllable's parameters land one frame late.</p> bank id (5 for all three), and all have zero drums and zero SFX. 119 instruments = phoneme codes <code>0x01</code>–<code>0x77</code> exactly.</p> -<p>Bank 157 stopping at 83 is not an omission: instruments 0–82 cover codes -<code>0x01</code>–<code>0x53</code>, and the phonology engine never produces a code above -<code>0x52</code> apart from <code>0x77</code>. The missing range -<code>0x53</code>–<code>0x76</code> is the <a href="editor.html">editor's letter-name block</a>, -which spec 3 can never reach. The only thing spec-3 voices genuinely lack is -<code>you</code>.</p> +<p>Bank 157 stopping at 83 is not an omission, and nothing is lost. The phonology +engine's maximum output is <code>0x52</code> plus <code>0x77</code>; instruments 0–81 +cover <code>0x01</code>–<code>0x52</code>, and the missing +<code>0x53</code>–<code>0x76</code> range is the +<a href="editor.html">editor's letter-name block</a>, which spec 3 can never reach. +For <code>you</code> (<code>0x77</code>), sequence 244's dynamic table explicitly routes +the code to <strong>instrument 82</strong> — the bank's 83rd and last instrument, which +sits above the phonology range and is reachable by nothing else. Bank 157 carries one +extra instrument precisely to be its <code>you</code>.</p> -<p>Sample details are in <code>../extraction.md</code>: N64 VADPCM, tuning 0.6891 -(22050 Hz), order 2, two predictors, no loop, ~190 ms each.</p> +<p>Sample details are on <a href="disc.html">the disc page</a>: N64 VADPCM, tuning +0.689062 (22050 Hz at a 32000 Hz mixer), order 2, two predictors, no loop, +32–407 ms each (mean ≈ 190 ms).</p> <div class="pager"> <span><a href="phonology.html">← 4. The phonology engine</a></span> |