Re: [hatari-devel] Sound lowpass filtering?

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


Le 03/09/2023 à 04:51, Brad Smith a écrit :
Thank you for the explanation. I think I now understand where the theory comes from.

So rather than being a voltage source, you treat the YM as a variable resistor, which connected with C10 forms a lowpass filter whose cutoff changes with that variation. This does explain why the effect would not by in my LTSpice simulation attempt, since I was looking at the circuit, and treating the YM as a simple voltage input source. I had just used the 0.96V to 1.35V range listed in its datasheet.

So OK, I can follow that reasoning based on this assumption about the YM's output.

 > Note this model doesn't change the pull-up filter coefficients for
 > the many different pull-up resistances. Instead it simply accounts
 > for 1000 ohm pull-down, and a single lower resistance pull-up.

This feels like a large omission to me. Shouldn't we expect a different resistance at each level of the YM output then? We have 3 channels each with 32 levels. The approximation with only 2 steps seems like it should be valid for 1 square wave at 1 specific level, but the difference should be weaker at a lower amplitude, and stronger at a higher one. With 3 channels playing music, the levels will be rising and falling continually between many intermediate levels as the waveforms interact.

What is the 2 step approximation's point of reference? Is it for 1 square at full volume?

I'm not sure what the impact of this omission should be, but in the future I'll try to simulate the difference to investigate. I think the disparity in the results must be due to more than just this, but it could be a significant factor.

Hi

on the ST there's also the specific case that the 3 YM output are wired together, creating some feedback from one channel to other channel.

This explains why there were several "volume tables" used in games/demos to convert 8 bit samples into 3 volume levels, using real voltage measure of the 4096 possible levels, while on the opposite on other computers (MSX and also CPC IIRC) the 3 YM outputs are not wired together making it much easier to build a conversion table.

Maybe this wiring on the ST is also affecting how final output is filtered / altered (at scart or rca) ?

In all cases, thanks for investigating on this :)

Nicolas



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