Re: Re: [hatari-devel] YM2149 + C10 lowpass filter mapping |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
On Friday 16 December 2011 05:21, Nicolas Pomarède wrote:
> Le 16/12/2011 12:21, David Savinkoff a crit :
> > Hi Nicolas,
> >
> > I've pondered over these patches for a couple of days and and
> > believe the C10 capacitor filter is ready for inclusion in Hatari.
> >
> > The audio.c patch is the same as before, and the sound.c
> > patch has prettier comments.
> >
> > This filter is better than the previous (unused) filter, so at least
> > sound.c should be patched (if the filter selecting method in
> > audio.c is unacceptable).
> >
> > I've listened to the mad_plus demo, sh11inv demo, blubber demo
> > and key clicks to hear the theoretical sound difference between
> > the ST and the STe (I don't have an STe). I think the demos
> > sound better with some of the dry harmonics filtered.
> >
> > A two-channel bank-switched IIR filter is now used to model the
> > YM2149 + C10 components. This is faster and way better than before.
> >
> > The YM2149 is filtered at 7.7 KHz when it charges capacitor C10,
> > and filtered at 2.1 KHz when R8 discharges C10. This is exactly
> > what happens on a real ST.
> >
> > David
>
> Thanks,
>
> I will try to test it and apply it this week end.
>
> Just one question : on STF, why do you turn the filter only for 44100
> and 48000 Hz, but not for higher or lower freq ? Is 50066 good enough,
> it doesn't require a filter ? Are freqs below 44.1 kHz too "noisy", so
> the filter won't improve result anyway ?
>
I chose 44.1 and 48KHz sampling rates for testing, and because
these are standard frequencies that represent the STf. More code
can be added for different frequencies, minimally impacting speed.
C10's tolerance is probably +/- 10% so 48KHz is within the range
of the 44.1Khz filter (50066 KHz is ok too).
A filter for 22.05 KHz sampling rate is not unreasonable.
Thanks,
David
>
> Just wondering, what is the "mathematical" reason for this ?
>
> Nicolas