This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

What is the best way to simulate voice acting on the NES?

What is the best way to simulate voice acting on the NES?
by on (#31915)
What do you guys think would be a good way to simulate (or even implement) English voice acting on an NES game?

Many NES games that try to fake voice acting use PSG channels, alternating pitch and volume. Some of these games (Famicom Tantei Club 1 and 2) play it at the same pitch, but Jesus - Kyofu no Bio Monster seems to play at a "gibberish" pitch pattern, while Metal Slader Glory (Japanese) seems to play at pitches dependent on the character outputted. Although Metal Slader Glory's would be a little trickier to produce accurately with English, and I'd think you would need a whole new set of data for accurate sounds. I'm also thinking about having 1-3 more DPCM (or even RAW PCM if permitted) voice samples per actor instead of PSG channels, which otherwise use the same techniques as the PSG channels.

Obviously, true voice acting (with RAW PCM) for most/all dialogue is impractical...and is probably still impractical even if saved for a few scenes. But true voice acting might be much more practical if the game was for the PowerPak...since IIRC it could theoretically access the CF card and update PRG RAM midgame. Though we have no source code from bunnyboy to know how yet...

by on (#31917)
"Animalese" is a crude speech synthesizer used in Animal Crossing for Nintendo GameCube and Animal Crossing: Wild World for Nintendo DS. It works by using short (about 4 or 5 frames) sample of the sound that each letter makes, and then just playing them one after the other. If you want to clone Animalese on the NES, you could record all the samples at rate $C (16.9 kHz), or about 192 bytes per letter. A complete set of samples might fit in a single MMC3 bank per actor type.

Or you can try to reverse-engineer Software Automatic Mouth if you can find it.


EDIT: I just did a mock-up of what Animalese might sound like (ogg).

by on (#31936)
Obviously the best would be to use $4011 and keep lossy encoded samples in your ROM. Typically you use one nybble per sample, which represent the deltas used in your samples. If you want the output to sound decent you'll have to makes nonlinear (squared) deltas.
All you have to do to decode them is take a single nybble, read a lockup table, add it to the previous output and output it trough $4011.
The lookup table would look like this :
.db -49, -36, -25, ...., -4, -1, 0, 1, 4, 9, 16, .....

To encode it, calculate the difference of one sample with its previous one, and take it's rounded up square root (more specifically if you have a negative number you take the negative square root of the equivalent positive number).

This method uses 4 times more space that DPCM, and consumes all CPU time, but is guaranted to sound WAY WAY better than DPCM for the same sampling rate.

by on (#31942)
Bregalad wrote:
This method uses 4 times more space that DPCM, and consumes all CPU time, but is guaranted to sound WAY WAY better than DPCM for the same sampling rate.

It even sounds marginally better than DPCM at the same bitrate (1/4 the sampling rate); I've tried it. But if you do use $4011 writes, you lose compatibility with PocketNES.

by on (#31945)
I thought we were past the time when we cared about supporting inaccurate emulators... Regardless of whether they have a good reason to be inaccurate or not.

If it's a small thing, I don't see why one wouldn't add support to inaccurate emulators, as long as this doesn't make the program behave erroneously on the real hardware. But if adding said support requires one to ditch features or causes sub-optimal results, then it becomes a bad thing.

by on (#31953)
If PocketNES were just an emulator on the PC, there would be other choices, but it's a NES-like platform on a handheld portable system. It's kind of like supporting PAL and NTSC, where each requires different programming in some cases (or even NES versus Famicom, with their slight power-up differences).