Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equalizer frequency response visualization #515

Closed
j4r3kb opened this issue May 26, 2019 · 6 comments
Closed

Equalizer frequency response visualization #515

j4r3kb opened this issue May 26, 2019 · 6 comments

Comments

@j4r3kb
Copy link

j4r3kb commented May 26, 2019

It would be nice to see the frequency response curve after applying equalization - just like it is in Equalizer APO.
If I take my settings from Equalizer APO and do the same in Pulseeffects what settings should I choose to get the same result?
I know there is Mode setting 'APO (DR)' but what about 'Type' and 'Slope'?

@wwmm
Copy link
Owner

wwmm commented May 26, 2019

I agree. And a few months ago I was taking to the Linux Studio Plugins author https://lsp-plug.in/?page=manuals&section=para_equalizer_x32_lr about it. Unfortunately it is not simple to do that. Not only with his equalizer but with many others the information necessary to plot these curves is very deep in the equalizer code. I do not have access to it from GStreamer programming API. He considered the idea of trying to expose this information using some kind of LV2 extension. But I did not encourage him to invest his time doing that because at this moment GStreamer support for LV2 plugins is very limited. And he would probably need to use extensions that GStreamer does not support. It would be work done for nothing.

As his equalizer has its own interface where these curves are plotted he suggested to try to load it instead of writing a custom interface as I am doing now. But I would have to write a built-in LV2 host in PulseEffects to be able to do that. It is not a simple task. And to be honest I do not like the idea of having to drag the mouse to change controls as it is usually done in audio plugins interface. I prefer to scroll and I don't know if the native plugin interface supports that.

The recommended way to use APO settings is to choose APO (DR) as mode like you noticed. If you are going to set the band as Bell(often called peak in other equalizers) or something else like Low Pass or High Pass depends on how these bands are set in APO. I don't know how the filter is implemented in Linux Studio Plugins but my guess is that you probably will let the slope at x1. As it is explained here lsp-plugins/lsp-plugins#29 Equalizer APO uses simple textbook filters. So it probably has no slope control. If necessary you could ask about this directly to the equalizer's author in this page https://github.com/sadko4u/lsp-plugins. But it is probably x1.

@sadko4u
Copy link

sadko4u commented May 29, 2019

Information about how do UI controls of native interface behave is available here:
https://lsp-plug.in/?page=manuals&section=controls

About frequency response: yes, it's hard to deliver the frequency reponse of the filter to the non-LV2 host. Maybe it is possible if implementing the GStreamer plugin format wrapper. But I currently have no time and possibility to work with GStreamer.

@wwmm
Copy link
Owner

wwmm commented Jun 20, 2023

The latest master branch is capable of showing the native equalizer ui. There are lots of rough edges to fix but we can finally see the frequency response curves. This issue can be closed.

At this moment only LSP plugins are supported because as my code is right now only plugins capable of managing the window on their own will work. @sadko4u I think I am facing a memory leak when closing and reopening the plugins ui. Probably because there is something I should be doing but I am not. This is the function I wrote to free the plugin window

void Lv2Wrapper::close_ui() {
. First I call the plugin ui description cleanup an then dlclose. What else is necessary for the plugin to free its window resources?

I did not do any serious testing for the leak. Just opening and closing the plugin window in sequence while looking at the memory consumption in gnome process manager.

@wwmm wwmm closed this as completed Jun 20, 2023
@sadko4u
Copy link

sadko4u commented Jun 20, 2023

Hi! What version of plugins do you use?
There was a cairo-related memory leak on custom fonts' cache.
In latest release (1.2.7) the glyph rendering mechanism has been replaced by own implementation with direct usage of freetype library.

@wwmm
Copy link
Owner

wwmm commented Jun 20, 2023

Hi! What version of plugins do you use?

Version 1.2.7 here on Arch Linux. Whatever it is the source of the leak the sanatizer does not catch it. So it is probably one of those that would be seen only in valgrind.

As at this moment I am able to load only LSP native ui it is a little hard to figure out if the leak is on my side or the plugin side.

@sadko4u
Copy link

sadko4u commented Jun 20, 2023

You can build LSP plugins witth make config ... DEBUG=1 option. This will give nice stack traces for valgrind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants