Genesis Plus GX, Where is the Audio Lowpass Filter?


#22

If you’re on windows x64 could you try this test version and see if any value is good enough?
We’ve been trying to activate the lowpass filter but the behaviour isn’t as expected within Retroarch.

In Core Options put “Audio Filter” on “Lowpass”, then you can tweak the “Lowpass range” value to find something good.
I feel like 0.4 is probably it but I can’t do the measurement you’re doing to be sure of that. (it could do some strange stuff)

Don’t forget to disable the DSP. :slight_smile:


#23

Thanks!
EQ works but Lowpass does not.
Maybe something wrong with the code?

EDIT:
Lowpass range should run from 0x0000 to 0xFFFF which is 0-65535.
The default setting is 0x9999 (39321) which is 60% of 65535.


#24

It works here, make sure you don’t have HighShelfDampen.dsp active.

EQ has some strange issues with the High value.


#25

Sorry, it doesn’t work.
There is no difference between Disable and Lowpass for me, only EQ works.

EDIT:
Alright found the problem, 0.1-0.4 work correctly, but 0.5-0.9 have absolutely no effect.
Are you sure you got the hex values correct?


#26

There’s a problem for sure, we don’t know what it is and we even asked upstream but it’s still unresolved.
I just wanted to ask you if you think that any value gives a good result, then we could put that value by default for a “LowPass ON/OFF” option in the meantime.


#27

0.4 is spot on.
EQ option is unnecessary, as you said just keep Lowpass On/Off.
What value in 0xXXXX hex corresponds to 0.4?


#28

that sharp dip though… i think if this was how genxplus is doing resampling, could be a reason the developer thinks that the 60% was what he though was as close as how genesis should sound.


#29

That ‘sharp dip’ at 15kHz is -30db below the fundamental, so it is nothing you will hear or should care about.
But there is always the possibility that it was intentionally programmed in.

@Tatsuya79
Please consider fixing the Range option because some genesis models have more filtering, yet some others have less.

What value 0.4 corresponds to?
Lowpass range should run from 0x0000 to 0xFFFF which is 0-65535.
The default setting is 0x9999 (39321) which is 60% of 65535.


#30

0.4 * 65536, so it’s supposed to be 40% but we got 60% instead.
It reacts in the opposite way it’s supposed to work, we haven’t found why, and EQ is even stranger.


#31

Try using ‘unsigned short’ instead of ‘int’ in the conversion of this line:

config.lp_range = (int) (atof(var.value) * 65536);


#32

Nope, no difference…


#33

Does entering manually the Q16.16 value works as expected?
In other words, does 0x9999 (60%) work if you enter it manually in config.lp_range?
If it does work, then there is a problem with the /* Sloppy Float to Q16.16 conversion */ section.


#34

No it does the same thing.
Probably some sound buffer thing that isn’t working together with retroarch or something.
We couldn’t figure it out, but we’re not sound experts. :expressionless:

I’ve just added the value that gives the good result anyway (0x6666) and removed the EQ.


#35

Care to do one more measurement?


#36

Genesis-Plus-GX’s author eke-eke has helped fixing the ‘Low Pass range’ option in the libretro port. It will work as intended now. The changes are already on @hunterk’s fork, which will land on the libretro fork too.

@James-F - love the content posted on this thread. Hopefully with this all working, you can find a value quantitatively matches the model 1. Adding more values to the range e.g. 0.65, 0.55 is trivial, so that can be added straight away if needed.


#37

Oh man that sounds so much better, totally gets rid of that harsh ear scraping. Thank you so much for this.


#38

I had a hunch that this value is treated as Signed instead of Unsigned in the code somewhere, mainly because 0.4 is around half the full value and that’s where it stopped working.

The values that matches the JAP Model 1 VA1 console is still 40.
Later Genesis/MegaDrive consoles have more filtering than the original JAP Model1, therefor 40 is a good default start, but please add 0.05 intervals in future build for even more accurate adjustment.

If the brickwall filtering at 15kHz could be fixed it would be ideal because it may have some effect on the overall curve.
Maybe it’s because GenPlusGX still runs in 44.1kHz while Retroarch is 48kHz?

EDIT: “Audio Resampler Driver” has huge effect on how the Lowpass filter behaves.
All measurement taken with Sinc, 48000, xaudio.
Yep, it is the 44.1kHz to 48kHz conversion that causes the steep down-slope at 15kHz.

I vote for removing the EQ function altogether, it’s unnecessary and buggy.

EDIT:
JAP Model1 VA1, USA Model1 VA3 and PAL Model1 VA4 all have absolutely identical measured frequency response.

Big thanks to all the people who helped solve/implement this.


#39

Hi could you please merge it to main repo so we can test it?


#40

I’ll clean it up and submit it when we’re sure it’s ready to go. I don’t want to bugger the real repo with dozens of experimental commits.


#41

my test confirms that 0.6 is the correct value for the default, as far as how the close the curves are in spectrum analyser. dev said it can be configurable since how the megadrive sounded depends on its revision and others might have remembered it differently…

i say no no to equalizer, its just suppose to be some sort of tone controls and currently its not working(as dev said). dsp can do the equalizing but lowpass should be core option as its as close as a megadrive model1 sounds, compared to playing with dsp filters.

IMHO