Lowpass filtering for NES RF

Had a revelatory moment watching this video (Share is at timestamp)

When they show the real RF audio-out it was like having my ears opened. I tried using the LowpassCPS audio filter in the main audio settings, but it’s the only filter I see. Are there ways to add more?

Or is there any other method to re-create this sound?

4 Likes

You should have a lot more DSP audio filters:

These dsp files are very similar to shader presets insofar as they require no actual coding and are just metadata for mixing and matching the various DSP libraries and applying settings to them.

The “chiptune enhancer” is one I made to demonstrate that process: https://github.com/libretro/libretro-common/blob/master/audio/dsp_filters/ChipTuneEnhance.dsp

3 Likes

Reading my comment, I bungled that sentence. What I mean to say was, that’s the only “Lowpass” filter that I see. I do see a few of them, that chiptune enhancer was pretty cool.

To be perfectly honest I don’t even know what lowpass means, but I know it’s used for Genesis sound, and it’s what they referenced at that point in the video.

3 Likes

“Lowpass” means it blocks high-frequency sounds but lets low-frequency sounds “pass” through the filter. In image processing, it’s known as “blur” :slight_smile:

So, basically, the MLiG guys are saying they like their audio blurred, which is funny knowing their obsession with fidelity.

6 Likes

This strange fixation with audio fidelity has always irked me. Being an audiophile with a pretty decent stereo system I know the joys of convincing sound, but also am aware of the common mantra that the source is above all. For instance, the gaussian filter of the SNES, which produces a markedly more fuzzy sound than a pure signal would, actually hides the many flaws inherent to the audio samples. The games tend to sound best this way, at least to my ears, as compared to more clean filtering methods such as cubic. The age old argument about developer intent (see composite, scanlines etc.) springs to mind.

Now, humans are on average more visual creatures, so it is natural that most of the energy spent creating an ‘authentic’ retro gaming experience has gone towards emulating the trademark look of CRT monitors. However, in that same spirit of ‘authentic’ reproduction it seems there’s great value in presenting the sounds of older hardware in a way which reflects the possibilities of the time.

You absolutely could just slap any old low pass filter on Ninja Gaiden and leave it at that, but personally I’d be very much interested in any steps taken towards the real thing.

Basically, I’m saying that the purest, crispest audio signal = muh pixel-perfect

8 Likes

Yeah, we have at least one example of a developer depending on lower-quality sound on SNES, too, in the form of Squaresoft’s JRPG wind effects. With higher-quality interpolation, you get horrible screeching instead.

Genesis/MD often has unpleasantly loud/sibilant high-pitched sounds, too, that really benefit from some low-pass filtering, e.g. bullet hit/ricochet sounds in Thunder Force 3 (and a lot of other shooters, for that matter).

Most of the action in the chiptune enhancer DSP is just boosting the lower frequencies relative to the highs and then filtering out some of the unpleasant highs.

7 Likes

is this effect already available for NES cores or ever intended to be added up ? Really appreciate the sound accuracy.

1 Like

The DSPs are available for all cores. The only specific one currently available is the CPS1/2 low-pass, but it’s very easy to make them for whichever frequencies/behaviors anyone might want and requires zero coding.

6 Likes

replying to myself to put this low pass filter DSP out here. It seems to cut out a lot of the nastier aliasing without removing the high-pitched sounds altogether. Just copy/paste this text into a text file and call it whatever you want (I called mine IIR-LPF) with a *.dsp file extension and put it alongside your other DSPs:

filters = 1
filter0 = iir

iir_frequency = 8600.0
iir_quality = 0.707
iir_gain = 6.0
iir_type = LPF

EDIT: it just got merged into libretro-common, so it should be included in the next version of RetroArch.

10 Likes

Brilliant addition buddy. Once again really appreciate your help and contributions, definetely recommended your custom audio dsp for NES. God bless you.

2 Likes

Does the Mac/metal builds of retroarch not have the audio DSP filters? My audio directory is empty.

1 Like

Very possible, yes. I looked in the xcodeproj for the Metal build and it appears to be building them, at least, but I guess it’s not actually packaging them :confused:

2 Likes

Is there someplace I can download them or is that not possible? I’m testing out an m1 mac. It’s the best laptop I’ve owned so far… I just wish I could install all my favorite PC emulation stuff on it :frowning_face:

1 Like

they have to be compiled for the platform. I think your best bet might be to compile them on the system, if you’re up for that.

1 Like

Maybe it’s a skill I should pick up, currently compiling code sounds very advanced.

2 Likes

Do you use this preset to emulate the sound of which consoles?

1 Like

It’s not really based on anything, but it should be applicable to any console that could be hooked up via RF. It’s just a low-pass filter that starts at a relatively high value, so it only cuts out very high, screechy sounds and leaves low sounds untouched.

4 Likes

I don’t have any reason to believe it’s because of this post - and more likely there was attention brought to it by MLiG as a whole - but I did notice that the last core update for NES mentioned the audio option being added.

<3

4 Likes

Piggy backing on this: What if (using IIR.dsp) I wanted to boost frequencies below 80Hz by 10 db? :sweat_smile:

Edit: here’s what I wound up with: myIIR.dsp

    filters = 2
    filter0 = iir
    filter1 = panning

    iir_gain = 10.0
    iir_type = BBOOST
    iir_frequency = 80.0

    # Avoids clipping.
    panning_left_mix = "0.3 0.0"
    panning_right_mix = "0.0 0.3"

Adds nice punchy bass for my sub.

1 Like

sure, give it a shot. I did some bass boost on my chiptune enhancer preset, IIRC, so you might be able to crib from that a bit.

3 Likes