Re: [hatari-devel] Sound lowpass filtering?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Yes, that change is required. Without the change in samplerate for the filter, they are essentially disabled because they operate at frequencies too high to be audible in the result.

An alternative way to hear the old LowPassFilter behaviour is to use a Hatari version before 2.1.0 where the filter was accidentally disabled.

If you want to easily switch between them at runtime, one possibility is the RetroArch core adaptation I recently produced. You can just change them in the core options menu while running (with the pause while in menu disabled, this can even be an immediate switch). Builds are available here: https://github.com/bbbradsmith/hatariB/


I apologize if I acted impatient about listening, I can wait for people to evaluate things. What was frustrating is engaging in debate about the quality of the filter without acknowledging the reality of how it sounds. I don't want to simply dismiss David's work and theory that went into the LowPassFilter/PWMaliasFilter implementations, but I believe they have a serious flaw that needs to be addressed.

To me the difference between these recordings is not subtle at all. I feel like I am boasting about my ears to have to say it, but that's not my intent. The contrast between these sounds is just unignorable to me. In truth I could never stand to use Hatari before version 2.1.0. Accidentally disabling the filters improved the sound tremendously for me. Even though the high end is too bright without a filter, that problem is very minor compared to the distortion previously introduced by LowPassFilter/PWMaliasFilter. With the the proposed IIRLowPassFilter, I feel the produced sound is both more accurate to the sound of my machine (and others), and simply more pleasant to listen to.

When I say IIRLowPassFilter lacks a theoretical model, I mean that it wasn't generated from principles about the circuit like David's. It is just a standard implementation of a lowpass filter, and empirically it matches the output of the machine I can measure quite well, in a way that LowPassFilter does not. I consider it very adequate even without further re-evaluation of the circuit, and I feel it would be worth switching to in the long term.

However, yes I too would like to see it re-evaluated. I would be happy to work further in that respect. The baseline I am starting from is that I believe one of the following is true:
1. The model is missing some factor that mitigates the distortion in the real machine.
2. The model sound is accurate to some ST machines and not others.

In pursuit of #2 I have been looking for some recording of an ST that sounds like LowPassFilter, but so far I have never found anything I consider close. I am open to the possibility, but it seems unlikely to me. This filter has a distinctive sound, and when looking for Atari ST videos on YouTube, often my first reaction is "ah, this is the older Hatari" upon hearing the audio.

As stated, I do not have experience with STE or Falcon, and I also have found verifiable hardware recordings much more difficult to come by for these machines (especially Falcon), so I can't make any empirical argument about the PWMaliasFilter. I only suspect that it may have the same problem as the LowPassFilter, since it is structurally a very similar filter implementation.

-- Brad Smith

On Fri, Sep 1, 2023 at 5:57 AM Nicolas Pomarède <npomarede@xxxxxxxxxxxx> wrote:
Le 01/09/2023 à 10:19, Nicolas Pomarède a écrit :
> Le 01/09/2023 à 03:45, Brad Smith a écrit :
>
>> It's been a little bit frustrating that nobody has commented on the
>> sound recordings at all. Has anyone listened to them? Has anyone
>> analyzed them? Do you have subjective feelings about their quality as
>> I do? Do you think my evidence is wrong? Do you have recordings of
>> your own? Do you have an ST that sounds more like LowPassFilter? Has
>> anyone built my proposed changes and listened to them?
>>
>
> Hi
>
> on my side, as I wrote on atari-forum, I was in holidays away from home
> with no correct speakers to do proper listening. Back home now, I will
> try to listen to your recording asap, but I have lot of "real" work at
> the moment, very few spare time, so please allow a little more delay :)
>

So, I had time to listen to your flac recordings. I must admit that for
the first part of the audio I don't hear that much difference/distortion.

But it's true that at +12 sec there're 7 separate notes where a
difference can be heard between the different files and hatari 2.4.1
sounds more distorted than 1040stf

Just a question regarding the recordings made with Hatari : for these 4
recordings, did you also apply the change to move the filter in
YM2149_NextSample_250() (as you describe in issue #1 of your PR) ?
In case I want to do recordings myself to compare with yours, I need to
have filter applied at the same point as you did.

Nicolas





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/