---------- Forwarded message ---------
From: David Savinkoff
Date: Tue, Jul 27, 2021 at 4:57 PM
Subject: Re: [hatari-devel] Improved YM2149 cycle accuracy
To: Nicolas Pomarède <npomarede@xxxxxxxxxxxx>
On Tue, Jul 27, 2021 at 6:01 AM Nicolas Pomarède wrote:
Hi
As for YM2149_Next_Resample_Nearest(), I don't think it will give the
best result...
see EDIT (below)
I was thinking about antialiasing filters, and came up with two:
1) Running average filter (very cpu efficient)
The filter length must always be an odd number of samples.
The middle sample is added in twice. Best to get a running sum
then add the middle sample, then divide by the number of samples,
then use the sample. The running sum is always updated at 250 KHz
by adding in a new sample, and subtracting the oldest sample.
I would make the running sum length = 250000*3/44100
Adding in the middle sample and averaging is done every 250000/44100
samples so that the output is decimated to 44100 Hz.
EDIT: Maybe this one will take experimentation to find what sounds best.
2) Fourth order IIR Chebyshev, Low pass filter at 16KHz with
1.5dB passband ripple. This filter uses two biquads and runs at 250KHz.
Regular 32 bit float math so that the compiler can take advantage of SSE
instructions.
Output samples are taken every 250000/44100 samples so that the output
is decimated to 44100 Hz.
EDIT: 0.5% passband ripple, not 1.5dB.
See www.dspguide.com