You are of course throwing resolution away if you use the 7-bit or 6-bit
modes. The low bit(s) are just gone. In 9-bit mode the extra bit is just
"invented" by the system so it's still just 8-bit sound.
The balance between sample rate and sample depth is most elegantly exposed
using PWM. Roughly speaking, you can double your sample rate and half your
dynamic range [= drop 1 bit from the sample depth] and the sound quality is
equivalent [i.e. identical, assuming proper analog output stages]. PWM is
essentially 1 bit at very high speed, and it *emulates* 8 bits and 65kHz, or
9 bits at 32kHz, etc. There is no reason to choose one over the other in
principle because the DATA RATE is the same, and it's data rate that counts.
However, the analog shaping circuitry at the output stage makes a BIG
difference here. Not knowing what the output stage is exactly, the only
valid advice is to try the different modes and choose the one that sounds
best.
I don't understand where FM comes in. GBA uses Pulse Width Modulation, not
Frequency Modulation. FM uses sine waves; PWM does not.
Another hint from DSP theory: if you calculate the sounds internally at
higher than 8-bit resolution, then you should add a certain amount of noise
[dithering] before you cast the sample to 8 bits. The dithering should be a
random amount between -0.5 and +0.5. The difference is marginal at 16 bits,
but at 8 bits it is audibly noticeable. In experiments, it has been found
that people can hear a sine wave that is only 1/2 LSB large AS A SINE WAVE
when 1/2 LSB of noise is added. Without the noise added, all you hear is a
SQUARE wave. That's a big difference at low amplitudes. Think of how a
greyscale image would look with and without dithering - your ear works the
same.
HTH,
Ed xxx
-----Original Message-----
From: John Q. Pretentious [mailto:johnisaheadcase@...]
Sent: Saturday, December 01, 2001 12:19 AM
To: gbadev@yahoogroups.com
Subject: Re: [gbadev] Re: Sound Bias Register - 9bit samples????
> I read:
> > You're not throwing resolution away.
>
> if I understand it right of courswe you are
You're exchanging sample depth for sample rate. Whenever your samples are
half the resolution, their timing is twice the resolution.
You are *not* throwing resolution away. You've always got a 32khz sample at
64khz, and three multipliers (always *2) to spread around as you see fit.
> > You're just applying the time differently. I think it's rather elegant,
> > but unfortunately, I don't know enough about sound to know why you'd
> > want one over the other
>
> bitdepth = resolution = headroom (kind of)
Uh, no. Sample depth is the accuracy to which a tone is recorded. This is
the step distance between tones.
> the idea is that the more bits you use to store a single sample
> (which is basically just the volume or the voltage on the wire)
> the finer grained your resolution in the digital representaion
> will be.
> the so called time domain representation holds no frequency information
> about a sound, just levels(=amplitudes)
> sample rate OTOH defines the speed at which the conversion of said samples
> D->A or vice versa takes place.
At the most technical level, this is correct, but it belies a fundamental
misunderstanding of the characteristics of FM sound.
Rate most certainly *is* a factor in audio sample resolution. It's one of
four, of which the gameboy supports three: sample depth, sample rate,
channel count, and channel placement (the AGB supports the first three).
People argue which of sample depth or sample rate is more significant. In
my opinion, they're roughly equivalent - if *either* goes too low, things
begin to suck.
The practical effects of sample depth are the accuracy in tonality that we
percieve as "off-key" when it gets bad. In order to get a handle on this,
grab your favorite Primus CD (or a female jazz vocalist who moves through a
note slowly somewhere, or a saxophone). Rip it in MP3 at CD rate - 44.1/16.
Record it again at 44.1/8. You'll notice that your singer seems to miss her
note every so often.
In order to understand sample rate, consider how "grainy" a song sounds on
old but good condition audio tapes. Things with extremely fast timing -
especially drum beats in German techno from the 80s - will really show up
low bitrate samples. You'll get the impression that the tape just couldn't
keep up.
> As you might know the highest possible frequency that can be accurately
> represented in a discrete way is srate/2 (the Nyquist freq.)
It's curious that you know what the nyquist frequency is, that you know that
it involves sample rate, that it limits sample resolution, and that you
still don't think that sample rate is involved in audio resolution.
For those of you who don't know what the Nyquist frequency is, it's the
sample rate cut in half - the rate at which our ears will hear aliasing.
Low-bandwidth pass at the nyquist frequency and your audio will be clean,
clean, clean.
A good explanation of how the Nyquist frequency works is buried in this page
that explains Fast Fourier Transforms:
http://www.daqarta.com/0t0cfft2.htm
> so if you need high frequencies but don't care about the headroom (the
> number of distict levels) go for higher srates, if you can get by with
> frequencies below you can opt for the higher resolution.
Well, this is the part that I meant when I said I didn't know enough about
sound. It's not that I don't understand how an FM sample works - that's
pretrty easy. I just don't know when rate is desirable, and when sample
depth is desirable. I'm supposing that depth is the default, and that rate
is desirable when depth is a non-issue - say, in sampled speech, where the
tonal range is miniscule, or what have you.
- Fattrini, Alto Tenor Contralto Basso of the 5th nebula of Zorticulon X
_________________________________________________________ Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
list rules: http://www.gbadev.org/rules.txt
unsubscribe: gbadev-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/