Audio Filter "highgain" mislabeled?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
cymansap
Prole
Posts: 5
Joined: Mon Feb 26, 2018 1:04 am
Contact:

Audio Filter "highgain" mislabeled?

Post by cymansap »

Hi, so I was fumbling about with the the audio filters in Love and thought it was a little strange that there was no "cutoff" setting. So I messed with the settings a bit, and noticed that I am almost completely sure that the "highgain" setting actually controls the cutoff of the filter, however I assumed it referred to resonance. I even looked at the audio output in a frequency analyzer and was able to recreate the sound of changing """highgain""" of the love filter by changing cutoff of a filter in my DAW.

It seems misleading to call this "highgain", especially when calling it "Volume of high frequency audio"https://love2d.org/wiki/Source:setFilter

If it were up to me I would call these settings "lowcut" and "highcut" as they are referred to in the equalization effect. see:https://love2d.org/wiki/EffectType

Furthermore, using "bandpass" doesn't really get a bandpass effect unless you set both the "lowgain" and "highgain" to the same value. Only setting "highgain" gets a lowpass sound, and only setting "lowgain" gets a highpass sound. So why even have the filter type option? Couldn't you just use "bandpass" for everything? Just seems like another layer of complexity.

Sorry this is kind of rambley, I just thought that this part of love seemed counter-intuitive. It could at least be clarified in the wiki.
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Audio Filter "highgain" mislabeled?

Post by zorg »

Löve gives you a relatively 1:1 mapping of what OpenAl(Soft) gives you in terms of audio effects.

That said, here's the developer/maintainer talking about this issue: https://github.com/kcat/openal-soft/issues/164

They do admit the filters are more akin to ~shelf filters instead of ~pass filters; That means, that modifying the high gain for a "lowpass" or the low for a "highpass" will modify the apparent cutoff frequency. (And both will vary the bandpass band centerpoint, even if it's not that noticeable)... i think, for the most part, i only skimmed it; that's why it works similarly to what you'd define an actual cutoff frequency (which is hardcoded)

Note that there's also no resonance/Q setting for them either.

In short, filters are limited if you want to use the OALS ones, but the terminology as given is fine.

I agree that the wiki on these things is a bit limited, but it can be openly edited... for the most part; graphical illustrations specifically to hard to get stuff like audio effects might be beneficial.

That said, you can create your own filters as i did in lua, Löve's performant enough for that kind of thing thankfully! :3

(And believe it or not, a few of us actually brainstormed a lot about the terminology that should be used for löve)
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
cymansap
Prole
Posts: 5
Joined: Mon Feb 26, 2018 1:04 am
Contact:

Re: Audio Filter "highgain" mislabeled?

Post by cymansap »

Alright, apologies for my ignorance. It sounded like a pass filter, so i assumed it was a pass filter.

Thanks for the clarification, zorg!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 206 guests