[GUIDE] Framework DSP — better Linux audio

I finally got a chance to listen. I’m not sure which of the presets I like best on speakers. I think the Hifiscan sounds cleaner, but quieter.

What is interesting is switching between presets on my headset made my sinuses itch. I’m going to attempt a similar exercise as you did, but for my headset.

Try using GitHub - jaakkopasanen/AutoEq: Automatic headphone equalization from frequency responses presets for your headphones)

1 Like

That’s a great resource. Thanks!

Sway here too. Do you also use Waybar? And if so, does it also shows you 100% volume as soon as you start easyeffects and doesn’t change anymore when adjusting volume or muting?

Yes, I believe that’s caused by easyeffects being an additional sink, but I did not yet try to fix or work around this.

1 Like

what commands do you use to change your volume?

I use this:

bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle

Those work fine for me, controlling the volume of the speakers. It just does not show on waybar.

same as @halemmerich

Found this: https://github.com/Alexays/Waybar/issues/2499

Inserting "ignored-sinks": ["Easy Effects Sink"], at the start of the pulseaudio module section in my waybar config seems to fix waybar displaying the wrong volume.

2 Likes

maybe try alsa backend instead:

bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pipewire sset Master 5%-
bindsym XF86AudioMicMute exec --no-startup-id amixer -D pipewire sset Capture toggle
bindsym XF86AudioMute exec --no-startup-id amixer -D pipewire sset Master toggle
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pipewire sset Master 5%+

Nice catch!
Works for me so far. Thank you very much for this hint!!

There is another thing I now do. When a new sink appears (e.g. plugging in HDMI) the effects are still applied making it sound wrong on my big sound system. So I removed -l HifiScan+EEGuide from the start command so I am now only starting easyeffects --gapplication-service in the background. Easy Effects seems to restore the last loaded configuration anyway.
The pipewire tab in Easy Effects has automatically loaded presets so I made an additional empty preset without any effects in it and added two autoload entries. One for the Family 17h/19h HD Audio Controller Analog Stereo sink, that loads the framework specific preset while the other one for Rembrandt Radeon High Definition Audio Controller Digital Surround 7.1 (HDMI) loads the empty profile.
This now switches nicely between the profiles when plugging into my AV receiver with HDMI.

1 Like

These IRs sound pretty good, except for a very annoying +7dB peak around 1850hz. Is this something you have experienced at all?

Hmm, it is on the response curve, but I don’t notice it making anything worse — I’ve noticed no distortion or perceivable volume change artifacts around those frequencies… how exactly is it annoying to you?

upd: I’ve also just did manual testing (set a tone generator to 1850Hz with EE off), and it does appear to sound really quiet for max volume

Do you by chance work with metals or place your laptop near metal shavings? 'Cause I’ve had weird distortions caused by metal shavings stuck in speakers, and it resolved after I carefully went around the perimeter of both speakers with a magnet wrapped in a soft tissue, and collected them all.

The speakers don’t appear to have any visible accumulation of metal shavings but by chance I have some nice magnets arriving in a few days, so I can double check. Here’s a (bad) recording of what your HiFiScan preset sounds like for me: https://gc.gy/1852.flac. With an added filter around that frequency it sounds passable (everything is an improvement over the stock speaker sound :smile:)

This is the best profile I’ve used yet. I have a few comments on how I tweaked the config to my liking.

I noticed that the Filter effect was cutting away audible bass frequencies. I decreased the cutoff frequency as well as increased the slope. This made the bass come through much better.

I’ve (personally) found that the Bass Enhancer is not needed, as the bass comes through well enough already. In my config below, I’ve left the effect in, but disabled, as there’s no serious issues with it, just that I didn’t like the sound of it.

In terms of IRs, the 27dB IR is indeed best. The problem that it “cuts volume too much” is not a problem, we simply have to increase the gain. Note that the gain has to come before the compressor, not the limiter, or you will hear very audible clipping artifacts. In my config, I simply added the gain at the output of the Convolver.

The gain unfortunately gives very audible artifacts in the bass frequencies, so I set the Makeup for Band 1 of the Multiband Compressor to 0 dB, which resolved the distortion.

In total, the sound is much bigger, with the bass louder, and the trebles sound clearer to me as well.

This is my current config (replace %CFG% with the path to your config file):

{
    "output": {
        "bass_enhancer#0": {
            "amount": 4.0,
            "blend": 0.0,
            "bypass": true,
            "floor": 10.0,
            "floor-active": true,
            "harmonics": 10.0,
            "input-gain": 0.0,
            "output-gain": 0.0,
            "scope": 200.0
        },
        "blocklist": [],
        "convolver#0": {
            "autogain": true,
            "bypass": false,
            "input-gain": 0.0,
            "ir-width": 100,
            "kernel-path": "%CFG%/irs/IR_22ms_27dB_5t_15s_0c.irs",
            "output-gain": 6.0
        },
        "filter#0": {
            "balance": 0.0,
            "bypass": false,
            "equal-mode": "IIR",
            "frequency": 60.0,
            "gain": 0.0,
            "input-gain": 0.0,
            "mode": "RLC (BT)",
            "output-gain": 0.0,
            "quality": 16.0,
            "slope": "x16",
            "type": "High-pass",
            "width": 1.0
        },
        "limiter#0": {
            "alr": false,
            "alr-attack": 5.0,
            "alr-knee": 0.0,
            "alr-release": 50.0,
            "attack": 2.0,
            "bypass": false,
            "dithering": "None",
            "external-sidechain": false,
            "gain-boost": true,
            "input-gain": 0.0,
            "lookahead": 4.0,
            "mode": "Herm Thin",
            "output-gain": 0.0,
            "oversampling": "Half x4(2L)",
            "release": 8.0,
            "sidechain-preamp": 0.0,
            "stereo-link": 100.0,
            "threshold": 0.0
        },
        "multiband_compressor#0": {
            "band0": {
                "attack-threshold": -16.0,
                "attack-time": 150.0,
                "boost-amount": 6.0,
                "boost-threshold": -72.0,
                "compression-mode": "Downward",
                "compressor-enable": true,
                "external-sidechain": false,
                "knee": -12.0,
                "makeup": 0.0,
                "mute": false,
                "ratio": 5.0,
                "release-threshold": -100.0,
                "release-time": 300.0,
                "sidechain-custom-highcut-filter": false,
                "sidechain-custom-lowcut-filter": false,
                "sidechain-highcut-frequency": 500.0,
                "sidechain-lookahead": 0.0,
                "sidechain-lowcut-frequency": 10.0,
                "sidechain-mode": "RMS",
                "sidechain-preamp": 0.0,
                "sidechain-reactivity": 10.0,
                "sidechain-source": "Middle",
                "solo": false,
                "stereo-split-source": "Left/Right"
            },
            "band1": {
                "attack-threshold": -24.0,
                "attack-time": 150.0,
                "boost-amount": 6.0,
                "boost-threshold": -72.0,
                "compression-mode": "Downward",
                "compressor-enable": true,
                "enable-band": true,
                "external-sidechain": false,
                "knee": -9.0,
                "makeup": 5.0,
                "mute": false,
                "ratio": 3.0,
                "release-threshold": -100.0,
                "release-time": 200.0,
                "sidechain-custom-highcut-filter": false,
                "sidechain-custom-lowcut-filter": false,
                "sidechain-highcut-frequency": 1000.0,
                "sidechain-lookahead": 0.0,
                "sidechain-lowcut-frequency": 500.0,
                "sidechain-mode": "RMS",
                "sidechain-preamp": 0.0,
                "sidechain-reactivity": 10.0,
                "sidechain-source": "Middle",
                "solo": false,
                "split-frequency": 250.0,
                "stereo-split-source": "Left/Right"
            },
            "band2": {
                "attack-threshold": -24.0,
                "attack-time": 100.0,
                "boost-amount": 6.0,
                "boost-threshold": -72.0,
                "compression-mode": "Downward",
                "compressor-enable": true,
                "enable-band": true,
                "external-sidechain": false,
                "knee": -9.0,
                "makeup": 5.0,
                "mute": false,
                "ratio": 3.0,
                "release-threshold": -100.0,
                "release-time": 150.0,
                "sidechain-custom-highcut-filter": false,
                "sidechain-custom-lowcut-filter": false,
                "sidechain-highcut-frequency": 2000.0,
                "sidechain-lookahead": 0.0,
                "sidechain-lowcut-frequency": 1000.0,
                "sidechain-mode": "RMS",
                "sidechain-preamp": 0.0,
                "sidechain-reactivity": 10.0,
                "sidechain-source": "Middle",
                "solo": false,
                "split-frequency": 1250.0,
                "stereo-split-source": "Left/Right"
            },
            "band3": {
                "attack-threshold": -24.0,
                "attack-time": 80.0,
                "boost-amount": 6.0,
                "boost-threshold": -72.0,
                "compression-mode": "Downward",
                "compressor-enable": true,
                "enable-band": true,
                "external-sidechain": false,
                "knee": -9.0,
                "makeup": 5.0,
                "mute": false,
                "ratio": 4.0,
                "release-threshold": -100.0,
                "release-time": 120.0,
                "sidechain-custom-highcut-filter": false,
                "sidechain-custom-lowcut-filter": false,
                "sidechain-highcut-frequency": 4000.0,
                "sidechain-lookahead": 0.0,
                "sidechain-lowcut-frequency": 2000.0,
                "sidechain-mode": "RMS",
                "sidechain-preamp": 0.0,
                "sidechain-reactivity": 10.0,
                "sidechain-source": "Middle",
                "solo": false,
                "split-frequency": 5000.0,
                "stereo-split-source": "Left/Right"
            },
            "band4": {
                "attack-threshold": -12.0,
                "attack-time": 20.0,
                "boost-amount": 6.0,
                "boost-threshold": -72.0,
                "compression-mode": "Downward",
                "compressor-enable": true,
                "enable-band": false,
                "external-sidechain": false,
                "knee": -6.0,
                "makeup": 0.0,
                "mute": false,
                "ratio": 1.0,
                "release-threshold": -100.0,
                "release-time": 100.0,
                "sidechain-custom-highcut-filter": false,
                "sidechain-custom-lowcut-filter": false,
                "sidechain-highcut-frequency": 8000.0,
                "sidechain-lookahead": 0.0,
                "sidechain-lowcut-frequency": 4000.0,
                "sidechain-mode": "RMS",
                "sidechain-preamp": 0.0,
                "sidechain-reactivity": 10.0,
                "sidechain-source": "Middle",
                "solo": false,
                "split-frequency": 4000.0,
                "stereo-split-source": "Left/Right"
            },
            "band5": {
                "attack-threshold": -12.0,
                "attack-time": 20.0,
                "boost-amount": 6.0,
                "boost-threshold": -72.0,
                "compression-mode": "Downward",
                "compressor-enable": true,
                "enable-band": false,
                "external-sidechain": false,
                "knee": -6.0,
                "makeup": 0.0,
                "mute": false,
                "ratio": 1.0,
                "release-threshold": -100.0,
                "release-time": 100.0,
                "sidechain-custom-highcut-filter": false,
                "sidechain-custom-lowcut-filter": false,
                "sidechain-highcut-frequency": 12000.0,
                "sidechain-lookahead": 0.0,
                "sidechain-lowcut-frequency": 8000.0,
                "sidechain-mode": "RMS",
                "sidechain-preamp": 0.0,
                "sidechain-reactivity": 10.0,
                "sidechain-source": "Middle",
                "solo": false,
                "split-frequency": 8000.0,
                "stereo-split-source": "Left/Right"
            },
            "band6": {
                "attack-threshold": -12.0,
                "attack-time": 20.0,
                "boost-amount": 6.0,
                "boost-threshold": -72.0,
                "compression-mode": "Downward",
                "compressor-enable": true,
                "enable-band": false,
                "external-sidechain": false,
                "knee": -6.0,
                "makeup": 0.0,
                "mute": false,
                "ratio": 1.0,
                "release-threshold": -100.0,
                "release-time": 100.0,
                "sidechain-custom-highcut-filter": false,
                "sidechain-custom-lowcut-filter": false,
                "sidechain-highcut-frequency": 16000.0,
                "sidechain-lookahead": 0.0,
                "sidechain-lowcut-frequency": 12000.0,
                "sidechain-mode": "RMS",
                "sidechain-preamp": 0.0,
                "sidechain-reactivity": 10.0,
                "sidechain-source": "Middle",
                "solo": false,
                "split-frequency": 12000.0,
                "stereo-split-source": "Left/Right"
            },
            "band7": {
                "attack-threshold": -12.0,
                "attack-time": 20.0,
                "boost-amount": 6.0,
                "boost-threshold": -72.0,
                "compression-mode": "Downward",
                "compressor-enable": true,
                "enable-band": false,
                "external-sidechain": false,
                "knee": -6.0,
                "makeup": 0.0,
                "mute": false,
                "ratio": 1.0,
                "release-threshold": -100.0,
                "release-time": 100.0,
                "sidechain-custom-highcut-filter": false,
                "sidechain-custom-lowcut-filter": false,
                "sidechain-highcut-frequency": 20000.0,
                "sidechain-lookahead": 0.0,
                "sidechain-lowcut-frequency": 16000.0,
                "sidechain-mode": "RMS",
                "sidechain-preamp": 0.0,
                "sidechain-reactivity": 10.0,
                "sidechain-source": "Middle",
                "solo": false,
                "split-frequency": 16000.0,
                "stereo-split-source": "Left/Right"
            },
            "bypass": false,
            "compressor-mode": "Modern",
            "dry": -100.0,
            "envelope-boost": "None",
            "input-gain": 0.0,
            "output-gain": 0.0,
            "stereo-split": false,
            "wet": 0.0
        },
        "plugins_order": [
            "filter#0",
            "bass_enhancer#0",
            "convolver#0",
            "multiband_compressor#0",
            "stereo_tools#0",
            "limiter#0"
        ],
        "stereo_tools#0": {
            "balance-in": 0.0,
            "balance-out": 0.0,
            "bypass": false,
            "delay": 0.0,
            "input-gain": 0.0,
            "middle-level": 0.0,
            "middle-panorama": 0.0,
            "mode": "LR > LR (Stereo Default)",
            "mutel": false,
            "muter": false,
            "output-gain": 0.0,
            "phasel": false,
            "phaser": false,
            "sc-level": 1.0,
            "side-balance": 0.0,
            "side-level": 0.0,
            "softclip": false,
            "stereo-base": 0.30000000000000004,
            "stereo-phase": 0.0
        }
    }
}
1 Like

Awesome thread! I just set this up, and what a huge difference. Thanks for the simple script, cab. I went from stock audio to using gracefu’s preset, and I can’t believe I was living that way before! So much better!!

2 Likes

Just got to try it — it’s really nice! Bass indeed (IMO) sounds a lot better than on HifiScan+EEGuide preset — and I liked it more overall, so I am switching to it)

You can PR it to the repo, so people get it installed too! <3
Would be also nice to have this comment copied over to readme as a piece of documentation

If you want, I can just add it myself too

Thanks for the PR offer. You can add it yourself, it’s probably easier for everyone involved :slight_smile: