Jump to content





humanoid

Posted by SpiceWare, in 2600 samples, Frantic 30 May 2011 · 599 views

I did some testing for sample playback. I used 2 different samples for the word "humanoid", one from the Berzerk samples used in older versions of MAME, the other uses the Mac's built in speech synthesis with the Zarvox voice (with speaking rate set half way between Normal and Fast). I chose the humanoid sample as it was the longest in duration of the Bezerk samples.

The Berzerk sample seems a bit noisy which is why I decided to try the Mac's built in Zarvox voice. Also I would like to add a phrase that's not in Berzek as the attract mode phrase "Coin detected in Pocket" is meaningless on a console. I'd like to replace it with "Reset detected on console".

Berzerk sample
Attached File  15-humanoid.wav (13.53KB)
downloads: 106

Zarvox sample
Attached File  humanoid.wav (26.95KB)
downloads: 88


Using Switch, a free audio format converter for the Mac, I down-sampled the wav files to the RAW format with unsigned 8 bit data at a sample rate of 6000. This results in a file just under 4K for the humanoid sample. I then wrote a custom program, raw_to_dpc, that converts the RAW data to the Atari's required 4 bit, as well as optionally dropping bytes to further downsize the samples (source for raw_to_dpc is in the attached source in the samples directory). The commands that converted the Berzerk samples are:
./raw_to_dpc 1 15-humanoid.raw 15-humanoid_1.raw	<- outputs every byte
./raw_to_dpc 2 15-humanoid.raw 15-humanoid_2.raw	<- outputs every other byte
./raw_to_dpc 3 15-humanoid.raw 15-humanoid_3.raw	<- outputs every 3rd byte
./raw_to_dpc 4 15-humanoid.raw 15-humanoid_4.raw	<- outputs every 4th byte

The 4K samples sound quite good, though I won't be able to use that for Frantic as the sample buffer must be in the Display Data bank, which must also hold the data needed to draw the screen. 1K samples don't sound good at all. Hopefully I'll be able to use a 2K buffer, but will drop down to 1.5K if needed.

Berzerk ROMs
Attached File  berzerk_1K.bin (32KB)
downloads: 55
Attached File  berzerk_1.5K.bin (32KB)
downloads: 51
Attached File  berzerk_2K.bin (32KB)
downloads: 61
Attached File  berzerk_4K.bin (32KB)
downloads: 60

Zarvox ROMs
Attached File  zarvox_1K.bin (32KB)
downloads: 50
Attached File  zarvox_1.5K.bin (32KB)
downloads: 47
Attached File  zervox_2K.bin (32KB)
downloads: 47
Attached File  zarvox_4K.bin (32KB)
downloads: 50

Source (includes audio samples - which includes all the words for Berzerk)
Attached File  DigitalAudio.zip (403.59KB)
downloads: 74




A custom DPC+ would need to use a power-of-two sized sample space, so it could be 2k or 4k and you could just use what you need. Let me know what is best. You can still start the table at any offset of 32 bytes if that helps.
  • Report
I think 2K will be the way to go then. Unless I'm mistaken, the index into the 32 byte sample just loops - ie: only resets to 0 after reading #31. If so, we'll need something to reset the index back to byte 0 so that the words don't start playing back "mid-word" when the sample buffer is filled in with the next word to play back.

I've decided to go with Zarvox for now so I can add custom phrases. It might be interesting to record samples off the AtariVox, though it'll be a while before I'm ready for that.
  • Report
The lower sampling rates are introducing aliasing. If you first run the .wav through a low pass filter, ideally, one that is very steep and cuts off all frequencies above half the sampling rate, it may sound acceptable even at 1k, or perhaps less.

EDIT: And when I say the sampling rate, I mean the rate at which the 2600 plays it back.
  • Report
good to know as the 2K and 1.5K samples were taking up too much room.

Hmm - looks like there's one included with OS X, just have to figure out where & how to use it! Will research it more after work.
http://testtone.com/...low-pass/review
  • Report
How often will you be updating AUDV ? NTSC 2600 line rate is 15.7kHz, so you would low pass filter below 7.8kHz and use a 15.7kHz sample rate.

Just for reference, telephones use 8kHz sampling.
  • Report
I'm currently updating it it every scan line using one of the incremental data fetchers, which simulates what we'll eventual be doing using the DPC+ music routines. The 1K sample uses 24 as the increment, so it updates once every 256/24 = 10.7 scanlines. 1.5K uses 36 (7.1 scanlines), while 2K uses 48 (5.3 sl) and 4K uses 96 (2.7 sl)
  • Report

Search My Blog

Recent Entries

Recent Comments

Latest Visitors

0 user(s) viewing

0 members, 0 guests, 0 anonymous users