[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Looping DAC and other issues
Simon Williams asked:
>There are a few things I've been trying to figure out about DAC.522,
>which I imagine probably relate also to other DACs:
>
>1) Is the sampling rate 22K or 11K? I notice that resampling from 11025
> Hz has no effect on the sample.
DAC522 assumes a native sample rate of 11025Hz. It actually oversamples
during playback, playing each sample twice, for a pulse rate of 22050Hz.
This is done to make the "carrier" pulse much less audible (to humans).
Since SOUND.EDITOR takes 11025Hz as its base sample rate,
resampling from 11025Hz will produce absolutely no change.
If you tell SOUND.EDITOR that you are resampling from 22050Hz,
then it will produce an output sound that is every other sample from
the input file--which will sound fine if the original sound was actually
sampled at 22050 samples/second (and it contained very little sound
energy above 5500Hz--since that would be aliased down below 5500Hz.)
If the original sound was sampled at 11025Hz and you told the editor
to resample from 22050, then the output would be half the size and
would sound twice as fast (in both pitch and articulation).
Selecting any other "resample from" rate will produce proportionate
results. Small pitch and time variations can be obtained by using
"resample from" rates relatively close to 11025Hz. For example,
using 10000Hz would lower the pitch and duration by about 10%.
>2) Is the carrier frequency of digitized sound the same as the sample
> rate or half of it? I seem to recall reading that the highest pitch
> reproduced is always half of the sample rate.
The PWM pulse rate of the player (which I often abbreviate to "carrier"--
which it really isn't) is 22050Hz. This is, AFAIK, unique to DAC522.
It is possible, using the same PWM technique, to create a 6-bit SoftDAC
with a pulse rate of 11025Hz (and Scott Alfter was the first to do so),
but at the cost of the screaming 11025Hz pulse being audible to (many)
people. Considering the subjective quality tradeoff between one more
bit of resolution (half the quantizing noise) and a ear-numbing 11025Hz
screech, or one less bit and a virtually inaudible "carrier", I opted for
the latter. I think you would, too. ;-)
>3) How does DAC software 'read' sound? Is there any correlation between
> the bytes of a sound file and its waveform? I've been examining sound
> files with an eye to creating new sounds either graphically or num-
> erically, but so far nothing's clicked...
The sample bytes are _precisely_ the waveform of the sound. The
representation is "excess-128", meaning that the "zero" point of
the waveform is 128 (or $80), and 0 ($00) is the most negative value
and 255 ($FF) is the most positive. That is the waveform plotted
by SOUND.EDITOR. If you "zoom in" enough on a sound in the
editor, you can see the actual waveform.
-michael
Check out amazing quality 8-bit Apple sound on my
Home page: http://members.aol.com/MJMahon/