Re: [hatari-devel] Sound lowpass filtering?

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


C10 and R8 in your schematic are part of the Atari STF
(also in my Atari 520 ST sold in Canada to me in 1985 without a TV  RF modulator).
The YM2149 driving C10 and R8 appears to be asymmetric. This is
reflected in "Paulo's psgquart table". See line 438 and 592 in hatari/src/sound.c

Note that C10 is only present in the aforementioned computer so this filter may
be removed from those computers. However, the filter is present with different
coefficients because some people figured some filtering was needed to sound
right. I also figured that asymmetrical filtering masked some downconverting aliasing.

See line 407++ and 560++ in hatari/src/sound.c for source code and comments.
See the log for this file, and the developers mailing list around the dates noted in the log
for conversations among many people contributing to the topic.

On Fri, Sep 1, 2023 at 11:13 PM Brad Smith <rainwarrior@xxxxxxxxx> wrote:
> They produce separate exponential decay curves for rising and falling edges of the square wave they filter.

I'm trying retrace the steps to derive this behaviour from the schematics, but I am having trouble getting there.

I found several schematics available here: https://docs.dev-docs.org/

'Atari 520ST Schematic (Rev N)' appears to have the same part numbers and values described in sound.c:
https://github.com/hatari/hatari/blob/c0265b9eedd5a0a78e2e5f6477cea487da330241/src/sound.c#L407

I don't have a formal background in electrical engineering, so I would definitely appreciate any more experienced insight that could help me understand. In an effort to figure it out I'm trying to find this result with LTSpice simulation, but I've failed to reproduce it. Is this the correct circuit? Have I set this up wrong, or omitted something important? Is LTSpice capable of simulating the effect described?

The schematic to me looks very close to a normal class A amplifier. I'm trying to figure out what mechanism here could produce one filter on a rising signal, and another filter on a falling one, but I'm lacking the insight to see what could cause that.

Apologies for asking for an explanation, because maybe this should be obvious to someone with more education in the subject. My experience in this area generally comes from the other direction: listening to the sounds, comparing the resulting frequency spectra and waveforms, and creating a simulation that matches that as closely as I can. I know standard filter implementations and what simple circuits they correspond to, but these two filters are novel to me, and I don't have any reference to match them with. I have tried searching for information about a "piecewise selective filter" but I was only led back to this code. I can very clearly see how the code applies a different filter on rising and falling signal, but I don't know why.

Though, because I've been unable to reproduce the result with hardware recordings as well, my suspicion is that this circuit does not behave as that model suggests, but even if it is a false conclusion it would be helpful to know how we got to it.

-- Brad Smith


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