== Overview ==
Voiced (Sawtooth) <-------- Digital Filters --------->
________ ______
| RANDOM |---| AMPL |--o
|________| |______|
Unvoiced (Noise) (when PI=?)
Unvoiced (Noise) (when PI=-16) = Missing Specifications =Digital Filters (processed on each 8kHz sample) ==Each of the four filter stages works like so: fm_cos = cos(+2*pi * fm_Hz/8096Hz)*2 bw_exp = exp(-1*pi * bw_Hz/8096Hz) _____ _____ ---sample----------------->| |------------------------->| |---+---> _______________ | ADD | ______________ | ADD | | +-->|*-bw_exp*bw_exp|-->|_____| +-->|*fm_cos*bw_exp|-->|_____| | | |_______________| _____ | |______________| _____ | +-----------------------|OLDER|<--+----------------------| OLD |<--+
The MEA8000 datasheet contains very little information about the voice generator.* The internal timings and formulas aren't well described.* And, the content of the internal Parameter-Translation table is unknown.* Note: The source code for the MESS emulator might contain some useful info. |_____| |_____|
== Unsorted Information Fragments Pitch Generator (Sawtooth) (active when PI<>-16) ==Based on 3 registers: SAW_LEVEL is probably signed 13bit, P is probably unsigned 9bit, PI is signed 5bit. The following is processed every 125us (8kHz): SAW_LEVEL=(SAW_LEVEL+P) AND 1FFFh ;sawtooth (-1000h..+0FFFh) sample = SAW_LEVEL * AMPLITUDE ;volumeAnd, additionally, every 8ms (125Hz): P=(P+PI) AND 1FFh ;the "AND 1FFh" is assuming that P is only 9bit wide
The device contains an internal 3.84MHz oscillator == Noise Generator (but can be also driven by external oscillator, or external TTL clock of max 4MHzRandom). The device internally divides the 3.84MHz (and outputs 1.28MHz on CLK OUT pin for general purposeactive when PI=-16).==The internal sample rate following is processed every 125us (8kHz (after applying the AMPL,PITCH,FM,BW stuff), the 8kHz samples are then resampled to 64kHz : NOISE_LEVEL=random(with linear interpolation between the samples-1000h..+0FFFh), and the 64kHz samples are then passed to the DAC. ;randomBandwidth sample = SAW_LEVEL * AMPLITUDE ;volumeThe exact random algorithm is "4 KH" unknown (4000 hours? probably means 4000 hertzone information fragment implies that it is done by some ADD/MULTIPLY logic) (not sure if that is true, it may also be simple SHIFT/XOR or so).
The == Linear Interpolations (AMPL/FM/BW) ==Changes to AMPL, FM, BW, and FD values are translated via an internal "Code to Parameter ROM" applied by interpolation (the content of that ROM is unknown, but it's possibly non-linearie. not abruptly)(ie.PITCH is directly passed to it takes whatever time until the PITCH register without translation.PI new setting is probably sign-expanded and added to PITCH at whatever ratereached. Setting PI to whatever (?) value selects unvoiced noise mode.Theoretically, the device can output only <either> sawtooth <or> noise... however, looking at the block diagram, interpolation speed is unknown; it looks as if it can output both added togetheris merely described to depend on FD... so, maybe Probably it does fade-out/fade-in 's meant to be the whole FD period, ie. the sound sources when switching from noise to sawtooth or vice-versanew Target value isn't reached until the END of the frame).
Changes to PI,AMPL,FM,BW are applied by interpolation == DAC Output ==The 8kHz samples (ie. not abruptly) (ie. it takes whatever time until coming from the new setting is reachedfilters) (the are resampled to 64kHz samples using linear interpolation speed , for example, if each "_" is unknown; it is merely described to depend on FD).a 8kHz sample: _ ______ _____ 8kHz __ _____ _____ ---> 64kHz __/\____/ \____The MEA8000 is similar 64kHz samples are then passed to an 8bit D/A converter. According to the PCF8200 (french datasheet, the difference is that the PCF8200 has 5kHz bandwidth, uses 40bit speech frames, and five filter stages; with BW1=3bit, BW2=3bit, FM4=3bit, FM5=1bit, BW5=2bit, and has selectable male/female parameter tables, and 11bit DAC, and additional 8bit DAC factor; which is sent after the 8bit pitch; and 12.8msinternally consists of two 4bit DACs (one for LSBs, 25.6ms, 38.4ms, 64ms durationsone for MSBs)whose outputs are merged together via 1:16 resistors or so.
Pitch is the step, ie. Sample=Sample+Pitch (=sawtooth)Oscillator ==Each The device can be driven by a 3.84MHz crystal, or external TTL clock of the 4 filters memorizes an OLD and OLDER max 4MHz). The 8kHz samplerate, timings, and pitch/filter frequencies in this doc apply for the recommended 3.84MHz.bandwidth is 4kHzDAC is 8bit