> > Um, er. The *envelopes* can be 3 or 4-bit resolution, like the docs
imply.
> > However, the VOLUME registers (ie, sound registers 0 thru 5) only
provide
> > 3-bit resolution when envelopes are enabled (normally they would provide
> > 4-bits resolution ... it's as if the SAA has gone thru registers 0 to 5
> and
> > ANDed with 0xee before using them, whenever envelopes are enabled).
Weird
> > biscuits.
> >
> You must be a 007 agent to explore this. :-)

If you sit down and do the math, you actually notice the discrepancies :
The Philips data sheet states that, with envelopes enabled and the 'maximum
amplitude' envelope selected as active, the real maximum total amplitude
generated by the SAA is 7/8ths that normally available.
Now, let's say that the envelope controllers work by generating a value
between 0 (zero envelope amplitude) and 15 (max envelope amplitude)
Now, let's also say that the amplitude controllers (registers 0 thru 5 on
the SAA-1099) work by generating a value between 0 (zero amplitude) and 15
(max amplitude).

Finally, let's say that the total amplitude equals amplitude
register*(envelope amplitude/16)

With envelopes disabled, the maximum amplitude is therefore 15

What happens when envelopes are enabled?
With the envelope controller set to generate a 'maximum amplitude' envelope
(waveform 001) the envelope controller generates an output value of '15'
With maximum amplitude register, this also generates an output value of '15'
This would suggest that the total amplitude equals 15*(15/16) = 14.0625
But we already KNOW that the maximum total amplitude should be 7/8ths of
what the max is withOUT envelopes (i.e., it should be 15  * (7/8ths) =
13.125)

You know the rest... 14.0625 is NOT equal to 15*(7/8)
But 14*(15/16)    [WHERE 14 == 15 AND 0xEE]  IS equal to 15*(7/8)

I even tried this out using a Sam, a PC with a soundcard, and a copy of Cool
Edit 96 to act as an oscilloscope. Whaddaya know, amplitude controller
resolution is effectively halved whenever envelopes are in effect.

So, despite what you may think, or have been told, audio sample generation
on the SAA-1099 is limited to just 3-bit audio.

Which is why, generally, it sounds kinda crappy.


Because of this, SAASound.dll actually implements full 4-bit audio (full!
hah!)
because it sounds better. I *dont* think I will put in an option to emulate
3-bit audio ... who would want that? (except purists, I suppose)

D a v e

Reply via email to