wwmm / easyeffects

Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications
GNU General Public License v3.0
6.39k stars 267 forks source link

[Feature Request] Implement Head Related Impulse Respose (HRIR) support for the Convolver Effect #2783

Open mastr-ch13f opened 9 months ago

mastr-ch13f commented 9 months ago

Would it be possible to implement:

From what I can understand, Zita-convolver library seems to support 64 audio channels in/out.

Edit: (I think that's how it works)

violetmage commented 9 months ago

What would be the purpose of using an HRIR/HRTF if you only have a stereo stream that you would need to upmix?

wwmm commented 9 months ago

As far as I know the hrir file is supposed to be used when taking a multichannel input and processing it to generate a stereo audio that carries the surround experience. In EasyEffects we have only a stereo pipeline. I do not see how hrir files could be used.

stefa168 commented 4 months ago

Pretty interested to see this feature implemented as well!

TheBestKmanEver commented 2 months ago

this can be achieved in openal. it takes .mhr files to run. you can use .sofa files or .def files for the creation of the HRTF with 'makemhr' (part of openal), shoot me a message if you want to know how to set this up.

wwmm commented 2 months ago

this can be achieved in openal. it takes .mhr files to run. you can use .sofa files or .def files for the creation of the HRTF with 'makemhr' (part of openal), shoot me a message if you want to know how to set this up.

But doesn't HRTF need multichannel audio as input?

TheBestKmanEver commented 2 months ago

this can be achieved in openal. it takes .mhr files to run. you can use .sofa files or .def files for the creation of the HRTF with 'makemhr' (part of openal), shoot me a message if you want to know how to set this up.

But doesn't HRTF need multichannel audio as input?

nope. HRTF works based on how the human ear works with lots of math HRIR is recorded from either dummy heads or human subjects, 1 mic in either ear with multiple sine sweeps recorded at various locations allowing you to have a full sphere of audio, HRTF uses Stereo for it's rendering as you're going to be using it on headphones anyway, everything gets mixed into HRTF, games may need you to enable a 3D audio feature to run, movies can work aswell, (has to be setup right in the player). HRTF is also able to make a mono signal sound like it is all around you

if you're refering to how HeSuVi works, that is more using what's called Ambisonics than actual HRTF (yes HRTF is still a form of Ambisonics)

wwmm commented 2 months ago

HRTF uses Stereo for it's rendering as you're going to be using it on headphones anyway, everything gets mixed into HRTF

Yes. But at least a few years ago when I tried to use HRTF in Pulseaudio the way to configure it was feeding surround audio to the plugin so it created a stereo sound that simulated the surround experience that was coming from the input.

HRTF is also able to make a mono signal sound like it is all around you

So what openal is doing in this case is simulating a surround sound without any relation to what is actually happening in the source material. Not ideal but it may be useful in the right circumstances. Is there a code example somewhere?

TheBestKmanEver commented 2 months ago

https://github.com/kcat/openal-soft you can probably get more info here you are able to use multi channel input but you arent required to