Pulseeffects: [Request] Add convolver DSP effect

Created on 10 Feb 2018  路  20Comments  路  Source: wwmm/pulseeffects

As a ViperFX for Android user, I was guessing if it would be possible to add a convolver effect to PulseEffects. That would be very useful for audio manipulation. Searching a bit on the net I found something (https://github.com/bmc0/dsp/wiki/System-Wide-DSP-Guide). I know that PulseEffects uses GStreamer as a backend, but after taking a look at some GStreamer mailing lists, it seems that convolution is possible.
What would you think?

enhancement help wanted

All 20 comments

I tried to add the convolver from Linux Studio Plugins http://lsp-plug.in/?page=manuals&section=impulse_responses_stereo. GStreamer is capable of loading it and every parameter can be accessed except the ones used to load the impulse response files for the left and right channels. Without being able to set the impulse responses there was no point in adding it to PE.

This plugin exposes these two parameters through http://lv2plug.in/ns/ext/parameters/. And as far as I could see GStreamer does not have support for this protocol yet.

I will take a look at the link you provided. I did not know about it. But in my opinion the ideal solution would be to add support in GStreamer for LV2 Parameters. Besides the fact that Linux Studio Plugins is already a PE dependency their convolver seems to be quite complete. But unfortunately I do not have the necessary knowledge to do that. Someone with a deeper understanding of GStreamer and LV2 plugins development would have to take this step.

Could you post here what you found in GStreamer mailing lists?

Here it is https://lists.freedesktop.org/archives/pulseaudio-discuss/2009-August/004619.html and https://lists.freedesktop.org/archives/gstreamer-bugs/2013-April/102041.html

They talk about an "already implemented" convolver, but unfortunately without much details :(

What he means is that the built-in Pulseaudio equalizer implementation is essentially a convolver. But even if they exposed this convolver as a Pulseaudio plugin it wouldn't help us because GStreamer would not be able to use it.

What about filing a bug at Bugzilla? If you want I can file it, though I don't know on which GStreamer subsection I have to file it (if you try to file a bug in the GStreamer project, you'll be asked to select from the various part of GStreamer where your bug/feature request has to be placed, and I don't know quite anything about it...)

It has to be in the gst-plugins-bad section. I will file it

Thanks 馃槃

It seems that the bug report got ignored 馃様

Not all is lost :-)
screenshot from 2018-07-09 20-46-49
As it is not a simple task to use the existent convolvers for Linux in GStreamer I decided to take a look at their source codes and put my hands in the dirty :D. The convolver now in master is the first plugin I wrote in my life. It is not finished yet but can be used by people willing to try and give feedback. As I never used a convolver before I don't know if the effect quality is the way it is supposed to be. Sometimes I have the feeling that a little of stereo width was lost. But I can clearly listen to the reverberation effect of impulse responses measured on theater and concert hall.

The code is based on zita-convolver and is inspired on the code of http://tomszilagyi.github.io/plugins/ir.lv2/ and https://github.com/x42/convoLV2/. It has low latency but not zero because zita needs buffers with power of 2 size for that and that is not what GStreamer gives. So some buffering was necessary. I will expose the block size parameter to the user so he can have some control in the trade-off between cpu usage and latency.

For now only stereo impulse response files are supported. Files with any other number of channels are ignored. The convolution is done in parallel stereo mode. Left input channel convolved with the left impulse channel and so on.

In any case it seems better than to have nothing

Wooo this is so cool! Looking forward to try it :)

I have updated the Run-Directly-from-Repository section from the wiki with updated instructions to run without installing in case anyone wants to try before the next release

A few more changes
screenshot from 2018-07-10 23-29-24

I have just release PE 4.1.4:
screenshot from 2018-07-13 20-22-15
screenshot from 2018-07-13 20-24-35
screenshot from 2018-07-13 20-22-50
With this we can close this issue :-) In case of problems or suggestions please open another issue

@wwmm Is convolver missing?
deepinscreenshot_desktop_20180714211906

This is odd. Even if the plugin is not compiled for some reason(like zita not being installed) you should still have the convolver entry in the interface. It feels like the file sink_input_effects_ui.cpp in your source is outdated and does not have the convolver interface code

Is there anything printed in the terminal when you run PE?

In my computer I am using PE compiled from the package I maintain for Arch Linux and everything is fine. So it does not seem that I have forgotten to add anything in the latest tarball

Oh, I'm sorry, there is convolver. I forgot to install the newest pulseeffects package that I had built and looked for convolver in the old version.

No problems :-)

Was this page helpful?
0 / 5 - 0 ratings