Re: [hatari-devel] YM2149 + C10 lowpass filter mapping |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
On 16/12/2011 22:48, David Savinkoff wrote:
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. DavidThanks, 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.
HelloThanks, I applied your patch ; when testing with YM50K demo by Paulos Simoes, with the default Chinese Dream song, I notice that noise is reduced, which is a good thing, but volume sounds a little lower on the other hand.
I can't compare now the sound with a real STF, but it's true that on my STF the sound was much "sharper" when measured at the output of the ym, when compared to what you get on the scart cable's pin, after going through the filters.
Well, users will judge :) In the end, there could be an option in the UI to override the automatic low pass filter, so users can choose what they prefer. We'll see later.
Nicolas
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |