AsahiLinux / asahi-audio

Userspace audio for Asahi Linux
MIT License
128 stars 12 forks source link

unexpected extra "metallic buzz" #17

Closed kit-ty-kate closed 4 months ago

kit-ty-kate commented 7 months ago

When playing the song Love by Gojira (spotify link for reference), between 2:50 and 3:00 the speakers output an extra bass-y vibration. It's very difficult to describe accurately but the closest i can do is some sort of "metallic buzz" sound. I've listened to this track on many devices over the years and on J316 with asahi-audio 1.6 with this particular track there seems to be something interfering somehow. Also, the same song on the same hardware but on macOS does not have this extra sound.

Most other songs sound pretty good though.

chadmed commented 7 months ago

Which version of asahi-audio are you using? We recently released 1.6 which might fix this if it's what I think it is.

kit-ty-kate commented 7 months ago

as mentionned above (sorry i should’ve put it in its own dedicated section to be more visible) I’m using asahi-audio 1.6

chadmed commented 7 months ago

Can you try setting "bypass": 1 on bassex and see if that makes it go away?

kit-ty-kate commented 7 months ago

Can you try setting "bypass": 1 on bassex and see if that makes it go away?

that looks like it yeah, but the song overall sounds a bit worse (flatter, …). I could put it back on and try to tweak the values to see which ones affect it. Do you have any hint on which values of this plugin to modify?

chadmed commented 7 months ago

amt sets the gain of the final processed signal with 1.0 being unity sat_second controls the slope of the Error function for the second harmonic sat_third ditto for the third harmonic blend sets the ratio between the two

kit-ty-kate commented 7 months ago

Funny notes from testing:

So far the changes in the settings that eliminates the metallic buzz sound between 2:50 and 3:00 are:

however the song as a whole is still a bit too buzzy compared to what it should/could be. I'll try to tweak this further.

kit-ty-kate commented 7 months ago

So far the best sound quality without artefacts i got was using:

                "control": {
                    "bypass": 0,
                    "amt": 1.0,
                    "sat_second": 0.0,
                    "sat_third": 1.0,
                    "blend": 0.0,
                    "ceil": 250.0,
                    "floor": 200.0
                }

i feel like it's missing the slightest bit of bass and the higher pitch noises like cymbals sometime can be a bit too clear and overwhelming, but I've tried to tweak everything and I have no idea how to improve that without adding the buzz back.

Overall i think the sound quality with those settings is much better and songs i've tried sound pretty good and accurate from my ears at least.

chadmed commented 6 months ago

lol, those settings basically bypass the entire effect so i think that's placebo.

what you've done there is set the blend to only do the second harmonic, then set the slope of the error function to 0 for the second harmonic (linear response, no harmonics will be generated), then set the passband to the 50 Hz between 200 and 250 Hz. it's doing nothing. the songs sound accurate because the frequency response set up by the IRs is linear, as we intended.

bankstown needs some work as i think there are a few tricks we're not doing there that are used to clean up the output/make it sound better. this is something that was on our yaks board for like 2 years and no one touched it, so i just implemented the most basic version of the missing fundamental effect that i could that was still acceptable in all my test cases on the machines i have on hand. someone with more expertise in dsp will need to step up and help out here.

chadmed commented 6 months ago

just had a listen with the j316 IRs on j314 and they seem a little boomy even with bankstown bypassed. it's possible that adding bankstown in on top of those IRs is pushing the convolver over its saturation point, which is why that bankstown test branch didn't sound any better until you had basically bypassed it.

cc @marcan

chadmed commented 4 months ago

@kit-ty-kate can you please re-test with asahi-audio 1.7 and bankstown 1.1.0?

kit-ty-kate commented 4 months ago

I'm not hearing any difference with asahi-audio 1.7 and bankstown 1.1.0 compared to the previous version.

chadmed commented 4 months ago

I've narrowed this down to the second harmonic stage in Bankstown. Setting blend to 1.0 eliminates the buzzing entirely here. I'll go raise an issue over there.

kit-ty-kate commented 4 months ago

Setting blend to 1.0 eliminates the buzzing entirely here.

Is is the blend parameter in /usr/share/asahi-audio/j316/graph.json ? If so I've just tried and setting it to 1.0 makes the bassy buzz even worse on my machine.

chadmed commented 4 months ago

Are you able to try with these parameters?

{
        "type": "lv2",
        "plugin": "https://chadmed.au/bankstown",
        "name": "bassex",
        "control": {
            "bypass": 0,
            "amt": 1.15,
            "sat_second": 1.75,
            "sat_third": 2.2,
            "blend": 1.0,
            "ceil": 200.0,
            "floor": 120.0,
        }
},
kit-ty-kate commented 4 months ago

yes! It sounds amazing and buzz free! Thank you so much!

chadmed commented 4 months ago

Glad to hear! I'll close this one off and look into why the second harmonic function introduces the buzz in the first place at chadmed/bankstown#5. It's probably something really stupid and obvious ;)