[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RT.SYNTH -- anybody tried it?
sicklittlemonkey wrote:
What improvements are you playing with?
I'm very interested in sound improvement for emulation.
Catakig's author, Colin Klipsch had some help from a DSP
engineer,
Ha! That would be me! ;-)
I thought it was admirable that he was willing to work to
get it right.
and the results are amazing. But he had to change
the clock speed of his emulator slightly to make it work.
Seems he's been too busy with RL to do more emulation stuff.
>
I purchased a book on DSP (now also 8838 km from my
current location) so I understand the principles, but building
a performant filter seems to be something of an art, really.
If anyone has the knowledge to implement one, any tips
would be welcome.
Well, the principles are pretty simple. The Apple II speaker
port, toggled by software, is a precisely timed sequence of
transitions between zero and full-scale. This sequence must
be converted into a (1-bit) sample stream at a rate sufficient
to capture its full detail, namely 1MHz.
This high-speed sample stream then needs to be digitally
low-pass filtered down to below the Nyquist frequency of
whatever PCM output is being used--typically 44.1kHz or
22.05kHz, and then resampled at that lower rate.
Those samples are then played back using the host machine's
sound card.
Where most implementers go wrong is 1) not capturing the
speaker transitions to 1 microsecond accuracy, and 2) not
low-passing them before resampling.
The digital low-pass filter can be a relatively simple
FIR filter, with a roll-off of at least 18-30 dB/octave,
so that any remaining signal energy above half the sample
rate is way down--like, 30dB or more. Otherwise, aliasing
can make it sound pretty bad.
Note that downsampling from 1MHz 1-bit samples to 22kHz
8- (or 16-)bit samples is a factor of 50 or 25 reduction
in the number of samples, but the low-pass must be done
*before* downsampling (that's where all the "intermediate"
sample values come from). Machines are plenty fast enough
now to do this easily, but a decade ago, it would have been
an issue.
-michael
Music synthesis for 8-bit Apple II's!
Home page: http://members.aol.com/MJMahon/
"The wastebasket is our most important design
tool--and it is seriously underused."