Update

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andrew Davie

I've been throwing a whole lot of CPU power at trying to resolve the fits for the sounds. This has been an iterative process; part Claude part me. Typically I have claude "solve" a particular sound with annealing, then I eyeball what's wrong and ask Claude to add various components (buzz, glide, noise) at various parts, and then repeat. Mostly it works. Some sounds are intractable though.  Typically the components are visible to the eye, once you know what you're looking at, but some hide themselves amongst the noise floor and resolution limits.  Some sounds I just have no idea what's happening mechanically, and so those will remain poorly fit.

**SpeakJet emulation: what's happened since 0.4.3**

Since the 0.4.3 release of the SpeakJet libraries (C for Stella, Go for Gopher2600), the work has been a long run of measuring the emulation against recordings of two real AtariVoxes and fixing what doesn't match. Across all 127 sounds, the average error against the real chip has dropped by about 41 %, and the median sound is now roughly twice as close as it was in 0.4.3. 78 sounds are measurably better, 9 slightly worse, and the rest about the same. The effects have improved most: several that were badly wrong are now close to indistinguishable on the spectrogram (PE and PO -90 %, TS -85 %, C4 -97 %, A5 -94 %, C9 -82 %, B5 -84 %).

The first big change was how we judge a sound. Earlier releases were tuned against numeric scores that, it turned out, could be gamed: a search would happily trade the right structure for a better number. I insisted we score by what you can see. The yardstick is now the difference picture between our spectrogram and the chip's, a red/blue map of where we're too loud or too quiet, plus a spectrum-line comparison. Every sound has a gallery page showing the chip, 0.4.3 and the current version side by side, and nothing ships unless that picture agrees. That one decision drove most of what followed.

The second was drawing. For many effects, the automatic searches simply couldn't find the structure: they'd smear a sweep into a wash, or miss a tone entirely. So I drew them. A small web page shows the chip's spectrogram, often in a "sharp" view that makes faint lines visible, and I trace the lines and boxes by hand. The fitting tools turn the drawing into the chip's own parameters (tones, sweeps, noise bands, pulse trains), and the search then tunes levels within that drawn structure without being allowed to wander off it. C9 is a good example: four chirps, each faint on the way up and loud on the way down, invisible in the normal view, but obvious once drawn. That one sound went from the worst in the library to mid-table.

239_C9.png
The C9 as "solved" by the system. The component structure is very obscure.

Screenshot 2026-11-12 at 3.04.22 pm.png
C9 in "sharp" resolution allowed me to see the actual structure in the spectrogram, and draw the lines.

Screenshot 2026-11-12 at 3.04.02 pm.png
C9 in "normal" resolution - the structure is not apparent at all.

Claude (Anthropic's AI, working as my engineer on this) built and ran the machinery: the scorers, the searches, the fitters, the queues that work through every sound overnight, and the C and Go changes, which must stay sample-identical (parity is checked on every change, typically within 3e-5). My part was direction and judgement. I decided what "right" means, drew the structures, spotted problems in the pictures that the numbers missed, and called a halt when something was heading the wrong way. Several of the best fixes came straight from me pointing at a picture: "there's a missing block from 135 ms", "that column at 140-155 shouldn't be there". Claude then had to diagnose why.

Those diagnoses are where much of the new knowledge came from. B5's missing block turned out to be the chip holding a ~60 Hz tone under its main line after the glide ends. The stray column was our glide tone's own harmonics: as it swept below 100 Hz at full level, the output stage's nonlinearity threw energy up to 170-500 Hz, while the real chip fades the glide as it descends. M0's red blob was our noise band leaking below 1 kHz where the chip's doesn't, fixed with a high-pass the engine already had but the sound wasn't using. In each case the fix was small once the cause was known, and in each case no amount of blind searching had found it.

We also did a full review: every one of the 127 sounds read from its picture and written up with what's wrong, where, by how much, and the likely cause. The pattern was clear. About half the remaining error sat in the first and last 15 ms of sounds: onsets too hard, endings that hold on where the chip fades, voiced stops whose closure bar is too bright. From that review came a list of structural edits the search may now try on its own: an end fade, an onset head, a tone that changes level across a part, a held tone added inside a part, a noise high-pass, a gap between two tones, and more. Before, the search could only tune numbers within a fixed structure. Now each sound first tries these edits, keeps the ones that help, and then searches from there. On the R-family robots that alone gave gains the old search never found (R4 -29 %, R6 -29 %).

Some of what we learned was that an idea was wrong, and that's just as useful. Several of the robot sounds and arching sweeps showed stripes that looked like the chip's pulse rate curving rather than gliding linearly. Claude built a curved pulse-rate glide into both engines, then measured the real chip's pulse rate over time on both units before adopting it. The chip's glides are linear, to within a few Hz, so the change was reverted and the stripes traced to endpoint and level errors instead. Likewise, an apparent "release tilt" across the library (highs dying before lows at the end of sounds) turned out not to be a single mechanism once measured over 115 sounds: our ends track the chip's closely, with the error concentrated in about 30 sounds that need individual fixes.

We found faults in the measurement itself, and fixed them. A search stretched M0 to half again its real length, because the score didn't look past the chip's end; there's now a length guard. A change to how the score is computed silently made a few earlier installs look worse than 0.4.3, so every sound is now re-checked against 0.4.3, and any that's worse is restarted from it. Recording rumble below 100 Hz turned out to dominate the score for a handful of stop consonants (KE, JH, EK, OK), meaning the search there was chasing noise. That's flagged, not yet fixed.

What's left is fairly well mapped. The voiced stops (BO, OB, DE, DO) are the main weak group: their closure bar carries vowel formants that the chip's doesn't. The nasals lack the anti-resonance real nasal speech has, which the three-formant voice can't produce. A few robot sounds (R5, R8, R9) and noise effects (C8, B0) are held back until their underlying mechanisms are understood, under a standing rule: never tune a sound whose mechanism is known to be wrong. A long overnight queue is now running every sound through the new structure-first search, with a "worst sound first" loop beside it.

The broad lesson for anyone doing this kind of emulation: the score is a tool, not the goal. The biggest gains came from looking at the picture, drawing what the chip actually does, and checking every theory against both real units before believing it. Nothing goes in on the strength of a number alone. The next release will carry all of this. The table budget has been raised to 16 KB to make room, and the sound is being kept faithful to the real AtariVox, clock images and all, rather than to an idealised chip.


In any case, progress... and I hope to release a new version in a few days.

237_C7.png

The image shows what I work from -- the original hardware in the top row;  v0.4.3 usually in the middle row, and the current search in the bottom row.  On the right side we have the difference spectrograms; ideally these are completely blank, but in this complex sound there's quite a bit of residuals. The idea is to reduce V (the diff on the spectrogram) to 0, and to a lesser extent L (the line match on the left side graphs) to 0.  Some sounds are relatively straightforward to match, but this example shows quite complex structure as it goes along.  Nonetheless, despite not being *perfect*, the search/system has produced a recognisable (even very good) parametric representation of the original sound.

Here's a table of the improvements over 0.4.3...  note that V is a visual of the spectrogram, and L is a match to the line-draw.

Here is every sound against 0.4.3 (V is the diff panel, L the spectrum lines; lower is better on both). The figures are from the rescore at 13:52, so B0's new run since then isn't in them.

**Overall:** V mean 38.85 -> 22.93 (-41 %), median 26.02 -> 12.13 (-53 %); L mean 2.36 -> 1.89 (-20 %). 78 sounds are better, 9 worse, 40 about the same.

code name     V 0.4.3 ->    now     %       L 0.4.3 -> now     %
128  IY       12.13 ->   12.13     +0%     1.83 ->  1.83    +0%
129  IH        1.38 ->    0.39    -72%     1.04 ->  1.06    +2%
130  EY        2.80 ->    0.70    -75%     1.19 ->  1.12    -6%
131  EH        1.08 ->    1.02     -6%     0.91 ->  0.89    -3%
132  AY        1.02 ->    0.85    -17%     1.03 ->  0.87   -15%
133  AX        8.72 ->    8.72     +0%     1.17 ->  1.17    +0%
134  UX        2.38 ->    0.89    -63%     1.03 ->  0.98    -4%
135  OH        2.87 ->    0.28    -90%     1.03 ->  0.93   -10%
136  AW        2.45 ->    0.10    -96%     1.13 ->  0.89   -21%
137  OW        1.20 ->    0.94    -22%     0.95 ->  0.94    -1%
138  UH        5.83 ->    5.83     +0%     0.84 ->  0.84    +0%
139  UW        3.20 ->    1.20    -62%     0.85 ->  0.95   +11%
140  MM       15.49 ->    8.82    -43%     2.84 ->  2.97    +5%
141  NE       20.35 ->   12.06    -41%     1.80 ->  1.79    -0%
142  NO        7.19 ->    7.19     +0%     1.85 ->  1.85    +0%
143  NGE      16.96 ->    3.37    -80%     2.03 ->  1.48   -27%
144  NGO       8.07 ->    7.30    -10%     1.89 ->  1.95    +4%
145  LE        8.78 ->    8.78     +0%     0.96 ->  0.96    +0%
146  LO       13.43 ->    1.28    -90%     0.95 ->  1.00    +6%
147  WW        4.95 ->    4.98     +0%     1.02 ->  1.02    +0%
148  RR        1.44 ->    0.93    -36%     0.92 ->  0.96    +5%
149  IYRR      3.48 ->    0.67    -81%     0.93 ->  0.69   -26%
150  EYRR      0.72 ->    0.17    -76%     0.95 ->  0.86   -10%
151  AXRR      4.74 ->    3.60    -24%     0.91 ->  0.82   -10%
152  AWRR      7.00 ->    4.27    -39%     1.26 ->  1.14   -10%
153  OWRR     15.12 ->    0.17    -99%     1.15 ->  0.88   -23%
154  EYIY      3.53 ->    1.95    -45%     1.11 ->  0.69   -38%
155  OHIY      8.24 ->    6.54    -21%     0.82 ->  0.98   +20%
156  OWIY     16.21 ->    0.64    -96%     1.52 ->  0.80   -47%
157  OHIH      9.53 ->    3.18    -67%     0.72 ->  0.87   +20%
158  IYEH      6.75 ->    3.64    -46%     0.94 ->  0.61   -35%
159  EHLL      5.03 ->    0.75    -85%     0.78 ->  0.70   -10%
160  IYUW      9.98 ->    2.52    -75%     1.02 ->  0.90   -12%
161  AXUW     30.29 ->   21.82    -28%     1.46 ->  1.42    -3%
162  IHWW      2.67 ->    1.86    -30%     1.16 ->  1.07    -8%
163  AYWW      4.48 ->    1.16    -74%     0.89 ->  0.88    -1%
164  OWWW     11.36 ->    2.30    -80%     0.92 ->  0.93    +0%
165  JH       45.44 ->   45.44     +0%     4.63 ->  4.63    +0%
166  VV       11.75 ->   11.75     +0%     1.51 ->  1.51    +0%
167  ZZ       12.87 ->   10.87    -16%     1.48 ->  1.36    -8%
168  ZH       31.43 ->   16.97    -46%     1.72 ->  1.57    -9%
169  DH       32.59 ->   19.67    -40%     1.51 ->  1.05   -30%
170  BE       70.08 ->   34.67    -51%     1.63 ->  1.69    +3%
171  BO       64.24 ->   64.24     +0%     2.33 ->  2.33    +0%
172  EB      106.17 ->   52.14    -51%     2.19 ->  1.93   -12%
173  OB       74.04 ->   74.04     +0%     1.62 ->  1.62    +0%
174  DE       82.80 ->   75.00     -9%     1.61 ->  1.27   -21%
175  DO       69.05 ->   70.20     +2%     1.93 ->  1.97    +2%
176  ED       50.22 ->   50.22     +0%     1.81 ->  1.81    +0%
177  OD       61.05 ->   51.26    -16%     2.10 ->  1.69   -20%
178  GE       26.02 ->   26.02     +0%     1.61 ->  1.61    +0%
179  GO       19.34 ->   14.83    -23%     1.93 ->  2.39   +24%
180  EG       13.93 ->    6.27    -55%     2.46 ->  1.51   -39%
181  OG       40.31 ->   29.00    -28%     1.79 ->  1.77    -1%
182  CH       50.91 ->   28.58    -44%     2.72 ->  3.08   +13%
183  HE       33.77 ->   26.67    -21%     2.50 ->  2.23   -11%
184  HO       23.73 ->   11.38    -52%     2.44 ->  2.27    -7%
185  WH       18.78 ->   18.65     -1%     2.78 ->  2.78    +0%
186  FF       31.16 ->   31.16     +0%     2.51 ->  2.51    +0%
187  SE       57.99 ->   43.76    -25%     3.64 ->  3.40    -7%
188  SO       34.98 ->   26.62    -24%     3.46 ->  3.49    +1%
189  SH       44.97 ->   46.97     +4%     3.46 ->  3.32    -4%
190  TH       41.83 ->   41.68     -0%     2.87 ->  2.44   -15%
191  TT       44.17 ->   33.95    -23%     1.16 ->  1.93   +66%
192  TU       72.67 ->   56.99    -22%     3.35 ->  3.41    +2%
193  TS      121.36 ->   17.73    -85%     2.95 ->  1.81   -38%
194  KE       60.24 ->   60.34     +0%     2.44 ->  2.45    +0%
195  KO       18.22 ->   18.22     +0%     4.36 ->  4.36    +0%
196  EK       29.68 ->   15.19    -49%     5.21 ->  2.36   -55%
197  OK       51.30 ->   51.30     +0%     4.94 ->  4.94    +0%
198  PE      220.83 ->   13.92    -94%    14.05 ->  2.64   -81%
199  PO      220.90 ->   31.07    -86%    14.00 ->  2.33   -83%
200  R0       89.20 ->   19.04    -79%     3.60 ->  1.83   -49%
201  R1       73.25 ->   31.98    -56%     4.10 ->  3.56   -13%
202  R2       77.12 ->   75.71     -2%     2.06 ->  2.02    -2%
203  R3       76.92 ->   75.94     -1%     3.30 ->  3.03    -8%
204  R4      100.06 ->   52.28    -48%     4.08 ->  2.55   -37%
205  R5      109.21 ->  110.95     +2%     5.03 ->  4.58    -9%
206  R6      102.11 ->   69.92    -32%     3.44 ->  2.15   -38%
207  R7       99.82 ->   96.59     -3%     2.77 ->  2.07   -25%
208  R8       81.83 ->   54.12    -34%     4.42 ->  3.14   -29%
209  R9       79.31 ->   81.14     +2%     4.44 ->  4.34    -2%
210  A0       22.49 ->    6.65    -70%     1.86 ->  0.64   -65%
211  A1       17.53 ->    2.32    -87%     1.08 ->  0.32   -70%
212  A2        8.96 ->    2.07    -77%     0.94 ->  0.57   -39%
213  A3       51.43 ->   46.41    -10%     1.86 ->  2.22   +19%
214  A4       65.45 ->   36.44    -44%     4.15 ->  1.61   -61%
215  A5       87.51 ->    5.64    -94%     4.62 ->  0.54   -88%
216  A6       27.77 ->    4.40    -84%     3.59 ->  2.37   -34%
217  A7       91.15 ->    9.54    -90%     1.76 ->  2.21   +26%
218  A8       42.02 ->   43.94     +5%     1.61 ->  1.50    -7%
219  A9        6.72 ->    3.50    -48%     1.30 ->  1.13   -13%
220  B0       32.91 ->   31.48     -4%     2.59 ->  2.23   -14%
221  B1       18.93 ->    6.84    -64%     2.55 ->  2.73    +7%
222  B2       42.09 ->   21.14    -50%     2.44 ->  1.15   -53%
223  B3       12.02 ->    0.14    -99%     2.62 ->  2.02   -23%
224  B4        8.46 ->   11.07    +31%     1.92 ->  1.77    -8%
225  B5       99.38 ->   15.94    -84%     1.59 ->  1.87   +18%
226  B6       63.10 ->   49.79    -21%     3.46 ->  3.59    +4%
227  B7       59.71 ->   46.09    -23%     2.00 ->  1.47   -26%
228  B8       53.75 ->   17.00    -68%     2.16 ->  2.58   +19%
229  B9       66.54 ->   58.77    -12%     2.95 ->  2.00   -32%
230  C0       38.48 ->   26.48    -31%     1.26 ->  0.47   -63%
231  C1       63.20 ->   40.11    -37%     1.91 ->  1.44   -24%
232  C2       78.29 ->   42.74    -45%     1.31 ->  0.61   -53%
233  C3       61.47 ->   46.48    -24%     2.21 ->  2.30    +4%
234  C4       87.66 ->    2.49    -97%     1.08 ->  0.77   -28%
235  C5      117.38 ->   60.20    -49%     2.20 ->  1.83   -17%
236  C6       52.74 ->   54.93     +4%     1.01 ->  1.09    +8%
237  C7       57.49 ->   32.85    -43%     2.10 ->  2.03    -3%
238  C8      119.02 ->   65.79    -45%     4.19 ->  3.48   -17%
239  C9      132.06 ->   23.29    -82%     4.60 ->  1.79   -61%
240  D0        0.00 ->    0.00     +0%     2.36 ->  2.22    -6%
241  D1        0.00 ->    0.00     +0%     3.74 ->  3.53    -6%
242  D2        0.00 ->    0.00     +0%     1.34 ->  1.34    +0%
243  D3        0.00 ->    0.00     +0%     1.44 ->  1.44    +0%
244  D4        0.06 ->    0.00   -100%     2.91 ->  3.11    +7%
245  D5        0.17 ->    0.00   -100%     2.32 ->  1.86   -20%
246  D6        0.15 ->    0.00   -100%     1.54 ->  1.52    -2%
247  D7        0.20 ->    0.00   -100%     2.78 ->  2.81    +1%
248  D8        0.85 ->    0.82     -3%     1.62 ->  1.65    +2%
249  D9        1.50 ->    1.81    +21%     3.46 ->  3.55    +3%
250  D10       3.12 ->    2.92     -6%     2.18 ->  1.79   -18%
251  D11       1.00 ->    1.15    +15%     1.66 ->  2.06   +24%
252  M0       34.08 ->   28.49    -16%     4.55 ->  4.28    -6%
253  M1       41.83 ->   24.06    -42%     4.65 ->  4.47    -4%
254  M2        6.46 ->    0.31    -95%     0.74 ->  0.70    -4%

**Worse on V than 0.4.3:**
- **224 B4:** +31 %, though its L improved 8 %.
- **249 D9 and 251 D11:** +21 % and +15 %, but on V values of 1-2, so tiny in absolute terms.
- **218 A8, 236 C6, 189 SH:** +4-5 %.
- **205 R5, 209 R9, 175 DO:** +2 %.

**Worse on L:**
- **191 TT:** +66 %. This comes from the hand onset added on 2026-11-09.
- **217 A7, 179 GO, 213 A3, 225 B5, 228 B8:** +18-26 %, each while V improved by a large margin.

**Unchanged from 0.4.3:** about 20 sounds, IY, AX, BO, OB, ED, GE, KE, KO, OK, JH, FF among them. The extended queue hasn't reached them yet.

JetSetIlly

Quote from: Andrew Davie on 12 Nov 2026, 03:55 PMMostly it works. Some sounds are intractable though.  Typically the components are visible to the eye, once you know what you're looking at, but some hide themselves amongst the noise floor and resolution limits.  Some sounds I just have no idea what's happening mechanically, and so those will remain poorly fit.

While I'm pleased with the progress the library has made, I was quietly worried at the amount of work Claude was putting into this. A "correct" emulation shouldn't require that amount of work. I think the results of this emulation method are now good enough IMO.
https://github.com/JetSetIlly/Gopher2600
@JetSetIlly@mastodon.gamedev.place
@jetsetilly.bsky.social

SpiceWare

I've found using Claude to get this working to be quite interesting as I've been using AI more and more for work.

The Houston Arcade Expo starts tomorrow, so if any new Vox Probes are needed I probably won't get to them until Sunday evening.